Using the "ROSbot" class movement functionalities with Mecanum wheels

Hi everyone,

We have just started to develop a program for our ROSbot 2.0.
In order to have flexibility in its movement, we have upgraded ROSbot’s wheels to mecanum ones.
However, the ROSbot::setSpeed assumes the mere ability to move in the X axis.

My question is, is there any other functionality implemented in the framework that we can use for mecanum wheels?
If not, what would you suggest as an extension to the existing library that would allow for mecanum movement? (i.e. extending the class with Vector based movement etc.)

If there’s any public information I’m missing regarding this topic, feel free to point to it, and I’ll check it out.
Thanks for your help in advance.

Hello erugo,

At the moment, we do not provide support for mecanum wheels.
Mecanum wheels induce different kinematic model for ROSbot, you will need to extend ROSbot class with support for appropriative controls.
You could read this paper for example of controlling mecanum wheeled robot.


Hi Łukasz,

Thanks for your answer.
This could be a long shot; if I can, I would like to come up with something that’s useful to other people. Do you have any suggestions to come up with something that could be contributed?

If you wish to contribute to hFramework, you are welcome.

It should be enough to edit ROSbot::setSpeed() and ROSbot::odometryUpdater() methods or preferably add similar methods to support mecanum kinematics.
First one is for setting wheel speed, this method itself would be enough for steering ROSbot by hand.
If you want it to be controlled by path planner, then loopback from odometryUpdater() will be required.

When implementing your version of ROSbot::setSpeed(), please keep in mind that for setting single wheel speed we are using void Wheel::setSpeed(float speed), this value is expressed in encoder ticks per second. The Wheel class has internally implemented PID controller and it is enabled by default.

Feel free to ask if you need any clarifications or guidance for the code.