Gazebo | Ignition | Community
Ask Your Question

How can I reset the simulation properly in Gazebo 4 with ROS Indigo?

asked 2015-04-22 07:26:55 -0500

Ahmet Sezgin Duran gravatar image


I'm using ROS Indigo on Ubuntu 14.04. Trying to work with simulation for a project. I need to reset the simulation and start over for quick testing. If I use Gazebo 2.x series with ROS Indigo, resetting simulation works without any problem, I can move robots again.

But when I use Gazebo 4, for example launching with this:

roslaunch gazebo_plugins multi_robot_scenario.launch

After moving robots and resetting the simulation, movement doesn't work. I've to launch the simulation all over again.

Any ideas? (Let me know if I need to provide any information, logs etc.)

edit retag flag offensive close merge delete


Can you post your world file? How are you resetting simulation? How are you driving your robots?

nkoenig gravatar imagenkoenig ( 2015-04-22 11:34:54 -0500 )edit

I'm using **`gazebo_plugins`** package's `multi_robot_scenario.launch` file, here take a look: Resetting is done in Gazebo, Edit, Reset World (Ctrl + R shortcut). Movement is simple, just sending Twist commands to related topic, take a look at gist:

Ahmet Sezgin Duran gravatar imageAhmet Sezgin Duran ( 2015-04-26 06:50:40 -0500 )edit

Can you check if the wheels are spinning (turn on joint visualization)? If they are spinning, then something may have happened to the physics update calculations. If they are not spinning, then it's likely the twist message was not received somehow.

nkoenig gravatar imagenkoenig ( 2015-05-04 11:34:27 -0500 )edit

@nkoenig I checked, they're not spinning.

Ahmet Sezgin Duran gravatar imageAhmet Sezgin Duran ( 2015-05-27 03:47:34 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2015-05-04 05:38:15 -0500

winston gravatar image

There is an inherited member function Reset() from ModelPlugin class. Take a look at Gazebo model plugin API. I think you should check whether there is something wrong in the Reset() function in you plugin file; you can just modify this function to satisfy your specific need.

edit flag offensive delete link more

answered 2015-04-23 08:39:07 -0500

scpeters gravatar image

I'm guessing the plugins are not properly implementing the Reset method. Which plugins are you using?

edit flag offensive delete link more


I suggest you @scpeters put your answer into a comment since it is more like a request for furthur information than a final helpful answer. :)

winston gravatar imagewinston ( 2015-05-04 05:33:36 -0500 )edit

Good point. It looks like you've provided a better version of the answer, so I up-voted it.

scpeters gravatar imagescpeters ( 2015-05-04 14:08:27 -0500 )edit

Question Tools


Asked: 2015-04-22 07:26:55 -0500

Seen: 5,465 times

Last updated: May 04 '15