Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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:

image description

Since in the physical world caster wheels can accommodate any diff_drive 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 (<mu1> and <mu2>) in the github package are set to 0.0. Given this setting the robot behaves correctly (as a diff_drive unit), but this looks really ugly in the simulation. I am hoping your answer will allow the friction value to be put back to 1.5 (the value for rubber), while not altering the diff_drive behavior, and will allow Gazebo to visualize the cool motion the castor performs as the robot drives around.

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.

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:

image description

Since in the physical world caster wheels can accommodate any diff_drive 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 (<mu1> and <mu2>) in the github package are set to 0.0. Given this setting the robot behaves correctly (as a diff_drive unit), but this looks really ugly in the simulation. I am hoping your answer will allow the friction value to be put back to 1.5 (the value for rubber), while not altering the diff_drive behavior, and will allow Gazebo to visualize the cool motion the castor performs as the robot drives around.

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 castor links and joints I have seen the castors vibrate, cause the robot to move, sway side to side on the z axis, and make the robot sway side to side (like a ship in water). Instead of focusing on things I do wrong, I created a minimalistic package on github, 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/Gazebo_caster_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 <mu1> and <mu2> friction tags are at 0.0, and if both those values are set to 1.5, the robot will begin to roll. in the minimalistic example the problem I am seeing is that the wheels are moving, and they should not be.

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 behavior in Gazebo is correct, but the caster behavior is not, and this is what I called "ugly".

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:

image description

and I have kept the links and joints in the urdf faithful to the physical device:

image description

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:

image description

Since in the physical world caster wheels can accommodate any diff_drive 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 (<mu1> and <mu2>) in the github package are set to 0.0. Given this setting the robot behaves correctly (as a diff_drive unit), but this looks really ugly in the simulation. I am hoping your answer will allow the friction value to be put back to 1.5 (the value for rubber), while not altering the diff_drive behavior, and will allow Gazebo to visualize the cool motion the castor performs as the robot drives around.

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 castor caster links and joints I have seen the castors casters vibrate, cause the robot to move, sway side to side on the z axis, and make the robot sway side to side (like a ship in water). water), and prevent the diff_drive motion. Instead of focusing on things I do wrong, I created a minimalistic package on github, 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/Gazebo_caster_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 <mu1> and <mu2> friction tags are at 0.0, and if both those values are set to 1.5, 1.5 (the values for rubber), the robot will begin to roll. in the minimalistic example the problem I am seeing is that the wheels are moving, and they should not be.be. if the friction is set correctly (along with whatever else is missing) the robot should just stand there and not move.

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 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:

image description

and I have kept the links and joints in the urdf faithful to the physical device:

image description

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.

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:

image description

Since in the physical world caster wheels can accommodate any diff_drive 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 (<mu1> and <mu2>) in the github package are set to 0.0. Given this setting the robot behaves correctly (as a diff_drive unit), but this looks really ugly in the simulation. I am hoping your answer will allow the friction value to be put back to 1.5 (the value for rubber), while not altering the diff_drive behavior, and will allow Gazebo to visualize the cool motion the castor performs as the robot drives around.

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 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 diff_drive 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/Gazebo_caster_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 <mu1> and <mu2> friction tags are at 0.0, and if both those values are set to 1.5 (the values for rubber), the robot will begin to roll. in the minimalistic example the problem I am seeing is that the wheels are moving, and they should not be. if the friction is set correctly (along with whatever else is missing) the robot should just stand there and not move.

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:

image description

and I have kept the links and joints in the urdf faithful to the physical device:

image description

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.

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:

image description

Since in the physical world caster wheels can accommodate any diff_drive 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 (<mu1> and <mu2>) in the github package are set to 0.0. Given this setting the robot behaves correctly (as a diff_drive unit), but this looks really ugly in the simulation. I am hoping your answer will allow the friction value to be put back to 1.5 (the value for rubber), while not altering the diff_drive behavior, and will allow Gazebo to visualize the cool motion the castor performs as the robot drives around.

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 diff_drive 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/Gazebo_caster_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 <mu1> and <mu2> friction <mu1></mu1> and <mu2></mu2>friction tags are at 0.0, and if both those values are set to 1.5 (the values for rubber), the robot will begin to roll. in In the minimalistic example the problem I am seeing is that the wheels are moving, and they should not be. if the friction is set correctly (along with whatever else is missing) the robot should just stand there and not move.

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:

image description

and I have kept the links and joints in the urdf faithful to the physical device:

image description

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.