Home | Tutorials | Wiki | Issues
Ask Your Question
0

Setting initial joint position

asked 2018-07-25 08:55:55 -0600

gpldecha gravatar image

updated 2018-07-25 12:19:21 -0600

How can I specify that my robot model spawned starts in a specific state ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-07-25 09:36:52 -0600

updated 2018-07-26 15:38:31 -0600

If you are launching from ROS,

<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model"
  args="-param robot_description -urdf -model robot
        -J ARM/Shoulder/X5_9 1.1" />

spawns this *.urdf into Gazebo with the ARM/Shoulder/X5_9 joint set to an initial position of 1.1 radians.


*.urdf (fragment):

...
<joint name="ARM/Shoulder/X5_9" type="revolute">
  <parent link="hebi_x5_9_16Z"/>
  <child link="a_2038_02_6Z"/>
  <axis xyz="-2.77554010017e-17 -1.66533454e-16 1.0"/>
  <dynamics damping="0.5" friction="0.06"/>
  <limit effort="100" lower="0" upper="+1.1" velocity="100"/>
  <origin rpy="0.0 -2.77555756e-17 0.0" xyz="-5.63687556453e-17 2.34257058104e-17 0.03"/>
</joint>
...

Note: If you want to dig deeper, check out these lines in ~/gazebo_ros/gazebo_interface.py: https://github.com/ros-simulation/gaz...

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-07-25 08:55:55 -0600

Seen: 437 times

Last updated: Jul 26