Quantcast
Channel: Gazebo: Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 7017

Programmatically restart simulation with different object poses

$
0
0
I am trying to create a reinforcement learning like simulation, where after each trial (episode) the simulation is restarted and the object pose is sampled from some initial pose distribution. I have tried to change the object pose by calling the /gazebo/set_model_state ROS service, but on the next simulation step, the pose changes back. I have found a question that address the same issue that I have: http://answers.gazebosim.org/question/7113/linksetworldpose-not-behaving-as-expected/ but it does not work for me. I have a model with a link connected through a fixed joint and when I try to detach and re-attach the joint, it still does not work - the hand gets back to the previous state. I have tried both Model::SetLinkWorldPose() SetLinkWorldPose() and Model::SetLinkWorldPose() (for the base link), but it did not prevent the behavior. What would be the best way to do this? I am using Gazebo 7 with ROS.

Viewing all articles
Browse latest Browse all 7017