Respawn/Move robot in Gazebo [closed]

asked 2012-01-31 01:03:32 -0500

DimitriProsser gravatar image

I have a complex robot that I'm simulating in Gazebo. It's currently running 5 hokuyo laser scanners, an IMU, a prosilica camera, and two custom joint controllers for the wheels and the pan/tilt of the camera. The current goal is simply to be able to move the robot back to the starting position in Gazebo without having to restart the entire simulator.

The first thing that I tried was simply to use the service set_model_state to set the robot back to the start. This didn't work because it causes the robot to fly off into space immediately after the service returns.

The second method was to delete the model and respawn it. To do this, I first stop all of my custom controllers, unload them, and then delete the model. This all works fine. The next step is to spawn the robot again, then restart the controllers. This works, but I've just noticed that every time I do this, it increases the memory usage of Gazebo. I feel as if Gazebo is failing to unload some of the sensor plugins on the robot (hokuyos, etc.).

So my question, has anyone accomplished this before? If anyone has any ideas, or knows anything about this memory problem, I would greatly appreciate the help. Thanks.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-09-09 15:07:34


did you try to use set_model_state service and spawn the robot with z coordinate different than zero?
Maurizio88 gravatar image Maurizio88  ( 2012-02-09 01:21:04 -0500 )edit