Now I will write down the math for all to see and make fun of if there is something wrong. The math is done because it is required for the driver. As stated on the home page, the motor I think I have looks like this: http://hobby.npcrobotics.com/store/npc-b81/ .
The motor page says that it has 180 RPM max output with a 18:1 ratio gearbox. The Roboclaw needs to be calibrated, which requires QPPS (quadrature pulses per second). The calibration program is written for a Windows environment. To calculate QPPS, the top speed of the motor (in seconds, not minutes) has to multiplied by encoder ticks per revolution.
Some assumptions have to be made:
1. The motor matches the specs found on the website.
2. The RPM's are measure at the gearbox output shaft.
3. The equations used are correct.
Theoretically, the formula should be:
RPM(revolutions per minute)/60(seconds/minute) => RPS
RPS(revolutions per second)*Gearbox ratio => Motor_RPS
Motor_RPS*encoder ticks per revolution => QPPS
So...
180RPM/60 (seconds) = 3RPS
3 RPS*18 = 54 Motor_RPS
54 Motor_RPS*600 ticks per revolution = 32,400 QPPS
After calibration, the information should be saved to the Roboclaw motor controller.
The ROS Roboclaw driver: https://github.com/sonyccd/roboclaw_ros requires more information for the robot.
The next formula needed is to solve for ticks per meter. This should be the amount of revolutions that the wheel has to turn to travel one meter multiplied by the amount of ticks per revolution. The amount of revolutions that the wheel has to travel is dependent on the size of the wheel. To determine the size of the wheel to find the number of revolutions per meter, the diameter of the wheel will be used. Because it is in meters, and the measurement tools are in inches, it will need to be converted.
The formula should be:
Radius_Inches => Radius_Meters
Radius*2*pi (or Diameter * pi) => Circumference
1 Meter / Circumference => # Wheel Revolutions per Meter
# Wheel Revolutions per Meter*Gearbox ratio => Motor_Rev per Meter
Motor_Rev per Meter*encoder ticks per revolution => ticks per Meter
Math!
6.5 Radius_Inches = 0.1651 Radius_Meters
0.1651 Radius_Meters*2*pi = 1.04 Meters
1 Meter/ 1.04 Meters = 0.96153846153846153846153846153846 Wheel Revolutions per Meter
0.96153846153846153846153846153846 Wheel Revolutions per Meter*18 = 17.307692307692307692307692307692 Motor Revolutions per Meter
17.307692307692307692307692307692 Motor Revolutions per Meter*600 ticks per revolution = 10384.615384615384615384615384615 ticks per Meter
or simply: 10,385 ticks per Meter
The next parts of information needed is the distance between the wheels (base_width) in meters and max speed for the robot (max_speed).
The base width is 0.49 meters.
The max speed a lawn mower robot should go is about 0.5 meters per second. The theoretical max speed should be 3.12 meters per second.
2/08/2017
This is what the Roboclaw calibration program for Windows looks like.