Hello Erinc,
Still, there are some changes to be done, you need to adjust dimensions.
All ROSbot dimensions are stored in ROSbot
class in hFramework, but to edit them there is no need to edit whole hFramework.
Copy file ROSbot.h
from hFramework into ROSbot default firmware.
Then go to lines 117-120
float robot_width = 0.195; // meters
float wheel_radius = 0.0425; //meters
float tyre_deflection = 1.042;
float diameter_mod = 1.24;
You will need to adjust above values to your wheels. First two of them are strictly geometrical values:
-
robot_width
is distance between wheels centres
-
wheel_radius
is radius of wheels used
Last two will depend on some factors, you may need to make some experiments to determine their values:
-
tyre_deflection
is coefficient for compensation of tyre flexibility, value 1.00 means rigid tyre, higher values means more flexible tyre. For mecanum wheels you could start with 1.00.
-
diameter_mod
is coefficient for compensation of slippage while turning, it depend on friction coefficient between tyres and floor surface.
When adjusting tyre_deflection
parameter drive ROSbot in a straight line and check if distance reported by odometry is equal to distance travelled on floor.
For diameter_mod
parameter turn ROSbot in place and check if angle reported by odometry is equal to angle on floor.
The more accurate your measurements will be, the better odometry you will get.
Regards,
Łukasz