Spawning a robot arm with desired joint angles
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.
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?
EDIT:
Added the suggested answer but didn't fix anything.
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
args="-urdf
-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.