"Teleport" robot using set_model_state

asked 2014-10-10 17:37:26 -0500

ntenenz gravatar image

updated 2014-10-21 13:55:00 -0500

SL Remy gravatar image

I have a robot in a multi-floor world. For lack of a better term, I'm trying to teleport the robot down a floor. I'm using get_model_state and set_model_state to first get the robot's pose and then duplicate it at a different z height. Doing so with physics on, the robot is unable to penetrate the floor. Trying with physics off is successful, but the robot "jumps" back up when I turn it back on. Interestingly, when I delete the upper floor while physics is off, turn physics back on, and replace the deleted floor, the robot still jumps back up. Is there any way to achieve what I'm trying to do (short of building a full elevator model)? Am I missing something obvious here?

edit retag flag offensive close merge delete

Comments

I don't know if you solve your problem. But another way to do that is to make all the floors at the same height (on your world's ground). Then I use a python script to move my robot on the x and y axis. The script is using gazebo/set_model_state, gazebo/get_model_state, gazebo/pause_physics and gazebo/unpause_physics.

Brosseau.F gravatar imageBrosseau.F ( 2016-05-30 02:15:23 -0500 )edit