Changed to 10cm wheels - what should I change for odometry?

Hi everyone,

We replaced the wheels of our ROSbot 2.0 for 10 cm. mecanum wheels.

To ensure there are no odometry based move_base failures, what should I change in the software to accomodate 10 cm wheels?

Thanks in advance,
Erinc

[ WARN] [1565264337.177748400]: Clearing costmap to unstuck robot (3.000000m).
[ WARN] [1565264342.278022137]: Rotate recovery behavior started.

Also, I usually get this warning where there is no obstacle, could my new wheels be the case?

Hello Erinc,

Current ROSbot control algorithm allows only for driving forward/backward and rotate.
Mecanum wheels have different kinematic model which allows also for driving sideways, to use this feature it will be necessary to take into account possible new movement directions and drive wheels accordingly.
It will be necessary to implement your own control algorithm for ROSbot to ensure it drives properly.

Regards,
Łukasz

Hi Łukasz,

Thanks for the answer. If I were to disregard the mecanum functionalities and just use the wheels for regular movement, is there still any change in code that I have to make?

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

1 Like

Hi Łukasz,

I’m trying to improve the odometry of my ROSbot by tunning the diameter_mod param into the ROSbot.h of my project. I work with the Husarion web IDE and my ROSbot firmeware is the default firmeware customised.
It seems that this library is not take into account during the compilation and the behavior of my ROSbot still always the same despite different diameter_mod values.

Am I missing something to set ROSbot.h of my project to be used by default ?

It is also required to add ROSbot.cpp to your project.

Regards,
Łukasz

Easy ! Thank you for the support