Ask Your Question

Turtlebot simulation vs. pr2_controller_manager

asked 2012-08-16 02:04:07 -0500

ZdenekM gravatar image

updated 2012-08-16 04:36:08 -0500

Hi all,

we have modified version of Turtlebot and right now I'm working on modifications to it's simulator. There is arm with dynamixel servos. I've added arm's URDF to robot description and I've also added controller_manager:

  <controller:gazebo_ros_controller_manager name="gazebo_ros_controller_manager" plugin="">

But when starting simulation, there are errors like this (produced by

Gazebo ROS Create plugin. NaN in d1. Step time: 0.03. WD: 0.07. Velocity: -nan
Gazebo ROS Create plugin. NaN in d2. Step time: 0.03. WD: 0.07. Velocity: -nan

and also the model of arm is not visible (just base of arm). Errors are there even if no one controller is spawned. If I set alwaysOn to false for gazebo_ros_controller_manager, the stop complaining and arm's model is normally visible.

Any ideas? Thanks.


I tried to use diffdrive_plugin instead of gazebo_ros_create and it's better - now controllers can be started without problems (and it's possible to obtain data on xyz_controller/state topics) but when the robot is spawned into Gazebo, arm disappears...

edit retag flag offensive close merge delete


Here you can find my urdf: (updated)

ZdenekM gravatar image ZdenekM  ( 2012-08-16 04:38:53 -0500 )edit

Hi ZdenekM,I am trying to create urdf of the robotic arm which driven by dynamizel servos so what's the PID gain that you have used.Your urdf file is removed on the link above.

brkk gravatar image brkk  ( 2013-04-25 11:25:23 -0500 )edit

Hi. URDF is available here: I used it for Gazebo simulation in Electric but now I'm migrating packages to Groovy and simulation is still something what must be done.

ZdenekM gravatar image ZdenekM  ( 2013-04-26 00:56:54 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-08-16 19:52:12 -0500

hsu gravatar image

The <safety_controller> might be the culprit. When <gazebo_ros_controller_manager> is on, the safety controllers are active even if no custom controllers are loaded. You have to tune k_position and k_velocity to keep the simulation stable. As a simple test, setting k_position and k_velocity to zero should stabilize the simulation if they are the culprit.

edit flag offensive delete link more


Thanks for hint! I tried it but simulation is still unstable. Now I can see robot with arm for short moment and then it fly away :-) With steptime 0.0001 and quickStepIters 1000 simulation works (I can command joints) but it's too slow.

ZdenekM gravatar image ZdenekM  ( 2012-08-16 23:15:08 -0500 )edit

It seems that problem was solved by tuning PID gains of controllers. They were too high.

ZdenekM gravatar image ZdenekM  ( 2012-08-17 00:57:54 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2012-08-16 02:04:07 -0500

Seen: 370 times

Last updated: Aug 16 '12