0
$\begingroup$

Rosanswers logo

Hi All

I have a urdf description for a robot which includes two Universal Robot UR5 arms, but the default configuration with all joint angles at 0 results in a self-collision.

Can I set the initial pose of the robot in Gazebo via configuration, in the urdf or elsewhere? A previous answer, http://answers.ros.org/question/9889/set-revolute-joint-start-angle/, suggests launching Gazebo paused, setting via a Gazebo service, and then un-pausing, but that seems rather complex for what I'd have thought must be a fairly standard requirement.

It would also be helpful to have it open into a pre-set pose when running MoveIt+RViz (no hardware or Gazebo), so via the urdf would be ideal. I don't want to add an origin yaw to the urdf, as the urdf will then not correspond exactly to the hardware.

Any advice; is calling gazebo/set_model_configuration the best bet?


Originally posted by Nic_G on ROS Answers with karma: 11 on 2016-11-15

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Launching Gazebo paused, setting the model configuration via a gazebo service, then unpausing is the best I have found. However, you can do this completely from the launch file, as "spawn_model" has an option to unpause gazebo.

  <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
    args="-urdf -model rrbot -param robot_description
          -J joint1 1.0
          -unpause"/>

Note: If you have to spawn multiple models I would not use this method. The order of node launching isn't guaranteed, thus you might unpause gazebo before you intend.


Originally posted by bsaund with karma: 161 on 2017-02-08

This answer was ACCEPTED on the original site

Post score: 6

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.