Mobile robot slides and joints continuously moving when spawn

Hi all,

I am creating a 4 wheel front-steered model, and the expected behaviour is the robot remains stationary until move command is induced. However, my model slide to one side each time I spawn it.

I have attempted (but failed) several solution as follow:-

1. Change the moment of inertia parameter for the chassis. (This only make the slide slower. But it didnt eliminate the issue)
2. Change the fdir
3. Change the kp value of the joint
4. Add mu constant to the surface
5. Update to Gazebo 9.13.1. I am currently using ROS Kinetic.

Below is the information of the friction tags in my axle.urdf.xacro.

    <ode>
<mu>1.0</mu>
<mu2>1.0</mu2>
<kp value="10000000.0" />
<kd value="1.0"/>
<fdir1>1 0 0 </fdir1>
<minDepth>0.0</minDepth>
</ode>


Currently my link and joint looks like this

front tyre: base_link < chassis < steering < axle < wheel

rear tyre: base_link < chassis < axle < wheel

I think there is some parts that I did wrong, or I misunderstand the solution given by others in this Gazebo Answer. Thus I appreciate it if you could point me to the parts that I did wrong or any ideas that may help. I have added the urdf to my git repository. I have attempted to post this in gazebo answers, however, up until now probably there isnt any luck with the answer. I thank you in advanced.

edit retag close merge delete

Sort by » oldest newest most voted

Actually I just got it to work using a SDF model of the robot using the following tags:

  <collision name="collision_castor_wheel_center">
<pose>-0.00063 0.02907 -0.03606 1.5708 0 1.5708</pose>
<geometry>
<cylinder>
<length>0.0164</length>
</cylinder>
</geometry>

<surface>
<friction>
<ode>
<mu>1.01</mu>
<mu2>1.01</mu2>
<fdir1>0 0 1</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0.0</restitution_coefficient>
<threshold>100000.0</threshold>
</bounce>
<contact>
<ode>
<soft_cfm>0.0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>100000.0</kp>
<kd>1.0</kd>
<max_vel>100.0</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
<laser_retro>0</laser_retro>
</collision>


The gazebo tags to set the physics are not working.

Try to change the parameters and check if they were modified by using the following command and searching for the link of interest:

 gz model -m [robot_name] -i 

more