Gazebo | Ignition | Community
Ask Your Question
0

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

Hi,

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

Comments

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: https://github.com/ros-simulation/gazebo_ros_pkgs/blob/d8471f25c0323670be994a4c554903ff06df0bd7/gazebo_plugins/test/multi_robot_scenario/launch/multi_robot_scenario.launch 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: https://gist.github.com/marjinal1st/17a114c081dbadf3b2f2

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
1

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
0

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

Comments

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

Stats

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

Seen: 5,505 times

Last updated: May 04 '15