Ask Your Question
1

Can I set initial joint positions in Gazebo/MoveIt via configuration?

asked 2016-11-15 10:22:43 -0600

Nic_G gravatar image

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/... , 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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2017-02-08 18:01:48 -0600

bsaund gravatar image

updated 2019-04-05 08:37:01 -0600

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2016-11-15 10:22:43 -0600

Seen: 1,493 times

Last updated: Apr 05