Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Programmatically restart simulation with different object poses

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 state distribution. I have tried to change object pose by calling the /gazebo/set_model_state service, but on the next simulation step, the pose changes back.

What would be the best way to do this? I am using Gazebo 7 with ROS.

Programmatically restart simulation with different object poses

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 state 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.

What would be the best way to do this? I am using Gazebo 7 with ROS.

Programmatically restart simulation with different object poses

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 any link) and it did not work :(

What would be the best way to do this? I am using Gazebo 7 with ROS.

Programmatically restart simulation with different object poses

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 any link) and the base link), but it did not work :(prevent the behavior.

What would be the best way to do this? I am using Gazebo 7 with ROS.