Caster wheel sample code
Hello,
Can you please provide a urdf sample for a correctly working caster wheel setup? I have not been able to find such a resource anywhere, and it's a resource that I think is badly needed (considering how many robots use castor wheels).
I have created a repository on github to accompany this question, and this repository contains the following:
- xacro to build a simplified urdf robot model with two caster wheels and two drive wheels
- gazebo diff_drive plugin
- everything needed to launch the robot model in a new world
- instruction on how to build and launch the project, and how to drive the model around.
I striped everything out of the repository that does not relate to this question. It can be found here: https://github.com/Toronto-Robotics-club/Gazebo_castor_sample
Here is what it looks like:
Since in the physical world caster wheels can accommodate any diffdrive motion on a flat surface (assuming a heavy enough robot on a smooth surface) it should be possible simulate this in Gazebo. At present the friction tags (
I tried for about 14 hours, and playing around with all these tags: (http://gazebosim.org/tutorials/?tut=ros_urdf#%3Cgazebo%3EElementsForLinks) I either made the castor wheels bounce, vibrate, turn when they should not, or get in the way of the diff_drive behavior (prevent the correct motion).
Thanks for your help.
EDIT #1
Can you describe what's the wrong behavior you're seeing?
I have tried making this work for a while, and between all the edits I have made to the tags related to the caster links and joints, I have seen the casters vibrate, cause the robot to move, sway side to side on the z axis, make the robot sway side to side (like a ship in water), and prevent the diffdrive motion. Instead of focusing on things I do wrong, I created a minimalistic package on github (exclusively for this question), and it's probably best to start from there as it's a clean slate. If you grab the package from github (https://github.com/Toronto-Robotics-club/Gazebocaster_sample) and run it (with wireframe view), you will see that the wheel part of the caster unit is rotating. It should not be rotating. at present the
You say it "looks really ugly", how so?
I have set the friction tags at 0, which allows the diff drive plugin to work correctly. By correctly I mean the robot reacts correctly to Twist data that I manually publish. What looks ugly is that the castor wheels are not rotating about the vertical axis, and are not rotating about the y axis. The robot's motion behavior in Gazebo is correct, but the caster simulation behavior is not, and this is what I called "ugly". This may sound strange, but the motion of casters as the robot drives around looks kind of cool.
Also, did you check that the caster steering axes are where you'd expect?
Sorry, I am not sure what steering axes are. I have kept the values in the urdf very similar to the physical items. for example the image below shows the similarity in the orientation of the parts:
and I have kept the links and joints in the urdf faithful to the physical device:
Considering that the robot is about 25kg in the URDF (which is the correct weight of the physical unit), and that the drive wheels are rubber (lots of grip), the castor wheels in real life never get in the way of any motion the drive wheels are carrying out. I wish for this real life behavior of the casters to be represented in the simulation.
Asked by TorontoRoboticsClub on 2020-02-18 11:22:40 UTC
Comments
Can you describe what's the wrong behavior you're seeing? You say it "looks really ugly", how so? Also, did you check that the caster steering axes are where you'd expect?
Asked by chapulina on 2020-02-21 11:12:08 UTC
@chapulina Could you please see edit #1 in the question? Thanks for your time, and please let me know what other information I may provide.
Asked by TorontoRoboticsClub on 2020-02-22 14:18:41 UTC