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

Properly restarting the gazebo simulation for iterative learning

asked 2016-09-20 14:16:33 -0600

curranw gravatar image

updated 2016-09-21 15:47:32 -0600

I've seen this question posted many times, but with no definitive answer (and they are old). To name a few:

1 2 3

However, many of these solutions don't really answer the question. reset_world seems to break all of the controllers. Just calling it with the pr2 model leads to a flow of red errors.

What I'm using now is the SetModelConfiguration service call. This works well...at the beginning. However, after the 10th or so experiment, the robot arm beings to "fling around" after the service call. After 20 or so experiments, the whole robot starts rocking as it gets called. It's as if the model is colliding with itself. I'm wondering why this is.

Thoughts: Could it be the effort controller? To test this I set all of the efforts to 0 between experimental runs, and give the controllers a second or two to settle before calling SetModelConfiguration. This didn't help.

Is gazebo storing some sort force? It seems like the controller would remove that. I use the "/gazebo/clear_body_wrenches" and the "/gazebo/clear_joint_forces" service calls to reset all forces, but that doesn't help either.

I'm out of ideas!

Here is a video showing when I use "SetModelConfiguration" 10 times with the same joint angles. Eventually it settles. I am giving no motor commands at this point, it's simply where the arm "settles" after resetting the joints.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-09-26 16:33:34 -0600

curranw gravatar image

Installing the newest version of gazebo fixed this issue. Gazebo 7 works great.

http://gazebosim.org/tutorials?tut=in...

http://gazebosim.org/tutorials?tut=in...

http://gazebosim.org/tutorials?tut=ro...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-09-20 14:16:33 -0600

Seen: 811 times

Last updated: Sep 26 '16