Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I would like to complete in whet @chapulina said with a hands on example. I created a two wheel robot and a plugin that implements two of the three methods explained.

Depending on what you want you can use the PID control or the simple one. PID are of course more realistic and perform much better in that sense, but you have the issues related to PIDs, specially gazebo getting really crazy if the values exceed what its physically possible.

If you just want something that moves, then you can use the NON PID option, which is directly moving the joints.

Also remember that if you only want to move a two wheeled robot, you always have the Differential Drive Option. But I understand that explaining how this is done opens the door to move any number of joints.

I created this super simple two wheeled robot: image description

I created a ModelPlugin, here you have the cpp code:

set_speed_joint_plugin.cpp

Here you have the model sdf using that plugin:

model.sdf

And here the world that we use:

simple.world

Here I leave you also the GIT with all the code:

The ROSJECT with the whole project ready to use

And a VIDEO explaining a bit more in detail each element of the plugin.

Hope it helped.

I would like to complete in whet what @chapulina said with a hands on example. I created a two wheel robot and a plugin that implements two of the three methods explained.

Depending on what you want you can use the PID control or the simple one. PID are of course more realistic and perform much better in that sense, but you have the issues related to PIDs, specially gazebo getting really crazy if the values exceed what its physically possible.

If you just want something that moves, then you can use the NON PID option, which is directly moving the joints.

Also remember that if you only want to move a two wheeled robot, you always have the Differential Drive Option. But I understand that explaining how this is done opens the door to move any number of joints.

I created this super simple two wheeled robot: image description

I created a ModelPlugin, here you have the cpp code:

set_speed_joint_plugin.cpp

Here you have the model sdf using that plugin:

model.sdf

And here the world that we use:

simple.world

Here I leave you also the GIT with all the code:

The ROSJECT with the whole project ready to use

And a VIDEO explaining a bit more in detail each element of the plugin.

Hope it helped.