4 wheel robot differential controller
I have designed simple a 4-wheel robot and I want to make it move. The controller below is located in "myrobot.gazebo" file and it works with 2 wheels and a caster. Is it possible to modify the controller so it can control 2 wheels on each side?
<gazebo>
<plugin name="differential_drive_controller" filename="libgazebo_ros_diff_drive.so">
<legacyMode>false</legacyMode>
<alwaysOn>true</alwaysOn>
<updateRate>20</updateRate>
<leftJoint>left_wheel_hinge</leftJoint>
<rightJoint>right_wheel_hinge</rightJoint>
<wheelSeparation>0.4</wheelSeparation>
<wheelDiameter>0.1</wheelDiameter>
<torque>20</torque>
<commandTopic>cmd_vel</commandTopic>
<odometryTopic>odom</odometryTopic>
<odometryFrame>odom</odometryFrame>
<robotBaseFrame>chassis</robotBaseFrame>
</plugin>
</gazebo>
Asked by kallileo on 2018-01-21 01:17:04 UTC
Answers
You would have to modify the source code of the diffdrive controller (better to make a new plugin yourself and use diffdrive as a base).
It shouldn't be much work, you'd just need to obviously add the rear wheels to the plugin and apply the velocity the same way as it is applied to the front wheels.
If you're not familiar on how to make your own plugin then I suggest you read this tutorial: http://gazebosim.org/tutorials/?tut=plugins_hello_world
Good luck!
Asked by Raskkii on 2018-01-23 02:44:17 UTC
Comments
Thankyou so much.
Asked by tooght on 2018-01-27 14:53:16 UTC
Comments
hi @VEGETA did you find the answer to this question? I have found some examples for this problem. However, they are all made using 2 wheels. And I think it's very difficult to make a 4 or 6-wheel robot using these examples. I have a robot with 6 wheels right now and I want to make it move.
https://goo.gl/9wknlr
https://goo.gl/JtEWFC
https://goo.gl/UUVdzA
Asked by tooght on 2018-01-21 13:52:59 UTC