ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
There is a ros service call: /gazebo/set_model_configuration
that sets joint angles for a robot. However, for PR2, you might have to call /pr2_controller_manager/switch_controller
before and after to disable and re-enable affected mechanism controllers trying to hold positions; otherwise the joints configured will try to return to the previous state immediately after the call.
Beware that the /gazebo/set_model_configuration
service has a bug in the current released version, causing it to be "twitchy". I have since patched it in trunk, and am looking to make a release soon.
Please reference gazebo for documentation on the service call. There is a rough example I've put together for testing here as well.
As a python example, I've added a flag in the spawn_model
script:
rosrun gazebo spawn_model -J <joint_name joint_position> - optional: initialize the specified joint at the specified value ...
Lastly, with regards to saving/resuming simulation state, we don't have anything implemented so far. Most likely by G-turtle.
2 | No.2 Revision |
There is a ros service call: /gazebo/set_model_configuration
that sets joint angles for a robot. However, for PR2, you might have to call /pr2_controller_manager/switch_controller
before and after to disable and re-enable affected mechanism controllers trying to hold positions; otherwise the joints configured will try to return to the previous state immediately after the call.
Beware that the /gazebo/set_model_configuration
service has a bug in the current released version, causing it to be "twitchy". I have since patched it in trunk, and am looking to make a release soon.
Please reference gazebo for documentation on the service call. There is a rough example I've put together for testing here as well.
As a python example, I've added a flag in the spawn_model
script:
rosrun gazebo spawn_model -J <joint_name joint_position> - optional: initialize the specified joint at the specified value ...
Lastly, with regards to saving/resuming simulation state, we don't have anything implemented so far. Most likely by G-turtle.
3 | No.3 Revision |
There is a ros service call: /gazebo/set_model_configuration
that sets joint angles for a robot. However, for PR2, you might have to call /pr2_controller_manager/switch_controller
before and after to disable and re-enable affected mechanism controllers trying to hold positions; otherwise the joints configured will try to return to the previous state immediately after the call.
Please reference gazebo for documentation on the service call. There is a rough example I've put together for testing here as well.
As a python example, I've added a flag in the spawn_model
script:script, so you can start your robot with certain joints at a certain position, for example:
rosrun gazebo spawn_model -urdf -param robot_description -model pr2 -J <joint_name joint_position> - optional: initialize the specified joint at the specified value ...
head_tilt_joint 0.2 -J head_pan_joint 0.5
Lastly, with regards to saving/resuming simulation state, we don't have anything implemented so far. Most likely by G-turtle.
4 | No.4 Revision |
There is a ros service call: /gazebo/set_model_configuration
that sets joint angles for a robot. However, for PR2, you might have to call /pr2_controller_manager/switch_controller
before and after to disable and re-enable affected mechanism controllers trying to hold positions; otherwise the joints configured will try to return to the previous state immediately after the call.
Please reference gazebo for documentation on the service call. There is a rough example I've put together for testing here as well.
As a python example, I've added a flag in the spawn_model
script, so you can start your robot with certain joints at a certain position, predefined positions, for example:
rosrun gazebo spawn_model -urdf -param robot_description -model pr2 -J head_tilt_joint 0.2 -J head_pan_joint 0.5
Lastly, with regards to saving/resuming simulation state, we don't have anything implemented so far. Most likely by G-turtle.