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

Revision history [back]

click to hide/show revision 1
initial version

Hi,

Just to close the issue and inform others of the methods, if anyone else has the same requirements and are looking for answers:

I managed to reset the simulation, odom frame and the "ground-truth" (in this case, gazebo world frame) and get the odometry to forget its collected data and start from (0,0) for every iteration of the runs, by writing a bash script to cycle through the runs. The bash script restarts the simulation in a separate terminal and launches the application using rosrun in another terminal.

The gazebo topics such as "gazebo/reset_simulation" and "gazebo/reset_world" only seem to reset the pose of the robot in simulation. The word "reset" in these topics seems to be misleading because the rest of the factors/parameters such as odometry/sensor states do not get re-initialised with reset. In order to reset practically everything, ROS has to be stopped and restarted and there is no clean way to do this from within the application. The bash script seems to be the cleaner approach. Apart from this, there are methods where the launch files can be written to do the stop and start. However, if tests where multiple runs are being performed are being executed, the launch files would still need to be controlled from bash scripts or another application. Hope this helps !! Regards, rsmitha.