Gazebo | Ignition | Community
Ask Your Question

Change model position in simulation [closed]

asked 2017-06-28 12:18:13 -0600

blevesque gravatar image

Hi all, I need to teleport models in my simulation after their spawn. Do you know if it is possible to write a Python script or a C++ class allowing to change model position during simulation ? If it is possible do you have some advices or ideas. Thanks

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by blevesque
close date 2017-06-30 03:55:36.832538

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-28 20:24:54 -0600

alpha gravatar image

In a gazebo plugin, you can

math::Pose initPose(math::Vector3(0, 0, 1.0), math::Quaternion(0, 0, 0));

in a python script, you can use this topic /gazebo/set_model_state

edit flag offensive delete link more


I found a solution using this. Thanks !

blevesque gravatar imageblevesque ( 2017-06-30 03:55:06 -0600 )edit

Question Tools

1 follower


Asked: 2017-06-28 12:18:13 -0600

Seen: 1,391 times

Last updated: Jun 28 '17