Home | Tutorials | Wiki | Issues
Ask Your Question
0

Change model position in simulation [closed]

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

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
2

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

alpha gravatar image

In a gazebo plugin, you can

math::Pose initPose(math::Vector3(0, 0, 1.0), math::Quaternion(0, 0, 0));
this->model->SetWorldPose(initPose);

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

edit flag offensive delete link more

Comments

I found a solution using this. Thanks !

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

Question Tools

1 follower

Stats

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

Seen: 454 times

Last updated: Jun 28 '17