How can I reset the simulation properly in Gazebo 4 with ROS Indigo?
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.)
Asked by Ahmet Sezgin Duran on 2015-04-22 07:26:55 UTC
Answers
I'm guessing the plugins are not properly implementing the Reset
method. Which plugins are you using?
Asked by scpeters on 2015-04-23 08:39:07 UTC
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. :)
Asked by winston on 2015-05-04 05:33:36 UTC
Good point. It looks like you've provided a better version of the answer, so I up-voted it.
Asked by scpeters on 2015-05-04 14:08:27 UTC
I'm using it from gazebo_plugins package, without modification. Here's the xacro file:
Asked by Ahmet Sezgin Duran on 2015-05-27 03:48:52 UTC
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.
Asked by winston on 2015-05-04 05:38:15 UTC
Comments
Can you post your world file? How are you resetting simulation? How are you driving your robots?
Asked by nkoenig on 2015-04-22 11:34:54 UTC
I'm using
gazebo_plugins
package'smulti_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
Asked by Ahmet Sezgin Duran on 2015-04-26 06:50:40 UTC
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.
Asked by nkoenig on 2015-05-04 11:34:27 UTC
@nkoenig I checked, they're not spinning.
Asked by Ahmet Sezgin Duran on 2015-05-27 03:47:34 UTC