ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Spawning a robot arm with desired joint angles

asked 2016-06-09 09:19:12 -0500

Laurens Verhulst gravatar image

updated 2016-06-10 02:11:10 -0500

I am trying to spawn a Kinova Mico arm in a gazebo simulation and Rviz. It spawns with all the joints at a value of 0. This means that they spawn in collision state, shown below. Both in rviz and they spawn in the same state. image description

I am trying to execute movement from the real hardware arm, so rotating the joints in the URDF model is not a solution to solving this problem. How can I spawn the robot with rotated joints?


Added the suggested answer but didn't fix anything.

  <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
    -model mico 
    -param robot_description 
    -J mico_joint_1 0
    -J mico_joint_2 1.5708
    -J mico_joint_3 1.5708
    -J mico_joint_4 0
    -J mico_joint 5 0
    -J mico_joint_6 0
    -z 1.0" 
    respawn="false" output="screen"/>

I also get this message:

[INFO] [WallTime: 1465542497.231790] [0.000000] temporary hack to **fix** the -J joint position option (issue #93), sleeping for 1 second to avoid race condition.
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-06-10 06:17:11 -0500

Laurens Verhulst gravatar image

updated 2016-06-10 06:17:30 -0500

Ok found the answer here on github. It was indeed -J joint_name joint_angle. However, you have to wait til all the controllers are initiated and then execute the spawn command. It's a work-around apparently.

edit flag offensive delete link more

answered 2016-06-09 09:51:01 -0500

Yes, you can. See for instance the spawn_thor_mang_default.launch file.

As visible there, you can provide -J JOINT_NAME JOINT_ANGLE as options to the spawn_model service.

edit flag offensive delete link more


Thanks, I will give it a try.

Laurens Verhulst gravatar image Laurens Verhulst  ( 2016-06-10 01:48:56 -0500 )edit

Unfortunately this didn't fix the issue.

Laurens Verhulst gravatar image Laurens Verhulst  ( 2016-06-10 02:09:21 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2016-06-09 09:19:12 -0500

Seen: 1,517 times

Last updated: Jun 10 '16