ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Turtlebot (and other objects) unintentionally moving by itself in Gazebo

asked 2018-12-05 07:00:01 -0500

manox gravatar image

When I start a simulation of the Turtlebot in Gazebo, it is slowly moving by itself (linear and angular). If I check the 'odom' messages published by Gazebo, there is always a small twist (linear x und angular z). After some minutes you can clearly see the changed pose in the Gazebo GUI. This is also happening to some other simple objects spawned in Gazebo (like cylinders). I already testet other friction values in the robot and world URDFs, but without success.

To reproduce the issue, you can simply run the turtlebot_world.launch from turtlebot_gazebo package and take a look at the 'odom' messages:

roslaunch turtlebot_gazebo turtlebot_world.launch &
rostopic echo /odom

System: Ubuntu 16.04 (kernel 4.15), ROS Kinetic (all involved packages on latest version, Gazebo 7).

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-12-06 19:12:49 -0500

tfoote gravatar image

updated 2018-12-07 02:53:28 -0500

gvdhoorn gravatar image

There does appear to be a small amount of drift in the turtlebot at rest with it rotating slightly. After 200 seconds I see that it has a slight rotation (a few degrees) , but is pretty much in the same position. Is that what you're talking about? If so I'd suggest looking more at improving the contact stability than the friction. If you look at the contact points on the ground you'll see that there's a continuous oscillation between the wheels that can cause small numerical integration errors to accumulate.

image description

example odom

header: 
  seq: 20117
  stamp: 
    secs: 201
    nsecs: 190000000
  frame_id: "odom"
child_frame_id: "base_footprint"
pose: 
  pose: 
    position: 
      x: 1.59948835343e-07
      y: 6.79624858795e-07
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: -0.0384809462098
      w: 0.999259334096
  covariance: [0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.05]
twist: 
  twist: 
    linear: 
      x: 6.49424452091e-06
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: -0.000414815298426
  covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---
edit flag offensive delete link more

Comments

Yes that's what I meant. The contact point instability is a good pointer, but how to prevent it? Edit: It's been some time and I still haven't found a solution. Has anyone found anything out yet?

manox gravatar image manox  ( 2018-12-10 03:41:01 -0500 )edit

so you do NOT know how to fix it?

kane_choigo gravatar image kane_choigo  ( 2020-04-09 03:32:15 -0500 )edit

I am having the exact same issue, i tried to tune the kp and kd values of the ODE contact joints but by robot still "vibrates".

Rellum gravatar image Rellum  ( 2022-08-30 06:48:57 -0500 )edit

Ran into this same issue, seem to have fixed it by setting the kp and kd values of not only the wheels of my robot but also the ground. In my case I had an "Arena" model that my robot drove around in, and had to add <contact> <ode> <kp>1e15</kp> <kd>1e13</kd> </ode> </contact>into the collision part of the sdf for it. (This was a useful reference: https://classic.gazebosim.org/tutoria... )

FinniM gravatar image FinniM  ( 2023-04-13 17:29:15 -0500 )edit
1

answered 2020-06-10 09:24:38 -0500

felipeduque gravatar image

I believe it's the same issue in this question:

https://answers.ros.org/question/3138...

I was facing the same issue with my PAL Robotics' TIAGO simulation. All I had to do was increase the wheels' mass by 10 and its inertia matrix values by 100 in the URDF files. Now there is virtually no drift of this kind.

Beware however that if you drastically increase the mass of, e.g., the base, the links that connect it to the wheels may collapse, since they were designed to handle a much lighter load. That's why I think the wheels are the safest component to alter because they normally won't rest over any fragile component.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2018-12-05 07:00:01 -0500

Seen: 1,921 times

Last updated: Jun 10 '20