ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

How to set initial pose to UR5 in Gazebo

asked 2016-08-22 04:50:02 -0500

J_Schaefer gravatar image

updated 2016-08-22 05:58:48 -0500

Hello,

I have a simulation with an UR5 in Gazebo. How can I say, that the robot should start in a given pose?

I tried what was answered in How do I set the inital pose of a robot in gazebo? , just like this:

<!-- push robot_description to factory and spawn robot in gazebo -->
     <node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model"
         args="-urdf -param robot_description
         -model robot
         -z 0.0
         -shoulder_lift_joint 0 1.57 0"
         respawn="false" output="screen" />

There should be a -J label just like:

<!-- push robot_description to factory and spawn robot in gazebo -->
     <node name="spawn_gazebo_model" pkg="gazebo_ros" type="spawn_model"
         args="-urdf -param robot_description
         -model robot
         -z 0.0
         -J shoulder_lift_joint 1.57"
         respawn="false" output="screen" />

This didn't work for me. I have ROS Indigo. Regarding to spawn_model -J initial joint positions not working #93, the -J-argument does not work in Indigo.

Do you have any suggestions?

Best regards,

J_Schaefer

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-11-30 18:31:00 -0500

jorge gravatar image

Check at the last comments on the issue #93: at least on kinetic, it works if you start Gazebo paused and then add the -unpause to the spawn_model to start it.

edit flag offensive delete link more

Comments

thank a lot! it works

shannonleeeee gravatar image shannonleeeee  ( 2019-08-27 08:17:22 -0500 )edit

I am not using gazebo, but i still want to have an initial pose when starting up my arm in RViz, is it possible to do so using ros2 control ? I saw in ros2 control xacro that there is a "initial value" param which can be set under <state_interface> tag of each joint. I want to be able to set this parameter using a config file instead of setting it in control xacro. Any suggestions?

bhooshan_deshpande gravatar image bhooshan_deshpande  ( 2023-03-29 14:05:08 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2016-08-22 04:50:02 -0500

Seen: 2,244 times

Last updated: Nov 30 '16