# Revision history [back]

After inserting the model, I saved a couple of .world instances. In some of these the joint axis was properly located. I found that the difference between those where the axis was properly located and those where the axis wasn't was due to the <link> <pose> in the <state> element in the .world file being different to the <pose> for the link in the .model description. After changing this value in my .world files, making it equal to my .model elements the axis was correctly located.

.model file link description - note the pose values (with ** for emphasis)

<link name="Gripper">
<pose>  1.60148 **1.212** -0.654121 0 0 0</pose>
<visual name="Gripper_visual">
<geometry>
<mesh>
<uri>file://gazebo_ros_plugin/models/meshes/gripper_v2_movable.stl</uri>
<scale>2 1 1</scale>
</mesh>
</geometry>
<pose> 0 0.00 0 0 0 0</pose>
<material>
<script>Gazebo/Yellow</script>
</material>
</visual>
<collision name="Gripper_collision">
<geometry>
<mesh>
<uri>file://gazebo_ros_plugin/models/meshes/gripper_v2_movable.stl</uri>
<scale>2 1 1</scale>
</mesh>
</geometry>
<pose> 0 0 0 0 0 0</pose>
</collision>
<inertial>
<inertia>
<ixx>0.00182</ixx>
<ixy>0.0000</ixy>
<ixz>-0.000192</ixz>
<iyy>0.00907</iyy>
<iyz>0</iyz>
<izz>0.007607</izz>
</inertia>
<pose> 0.000 0.000 0.0 0 0 0</pose>
<mass>2.447</mass>
</inertial>


These need to reflect the .world file <state> values, if they do not then there will be issues with correct location of axes:

<state world_name='default'>
<sim_time>0 0</sim_time>
<real_time>0 53614</real_time>
<wall_time>1371509281 132633228</wall_time>
<model name='HMM_version2'>
<pose>0.000000 0.000000 2.000000 0.000000 0.000000 0.000000</pose>
<pose>1.621480 **1.212000** 1.345880 0.000000 0.000000 1.570000</pose>
<velocity>0.000000 0.000000 0.000000 0.000000 0.000000 0.000000</velocity>
<acceleration>0.000000 0.000000 0.000000 0.000000 0.000000 0.000000</acceleration>
<wrench>0.000000 0.000000 0.000000 0.000000 0.000000 0.000000</wrench>

There seems to be three locations for implementing joint <pose> in the model. I have stuck to using only that related to links and leaving other poses as "0 0 0 0 0 0". It probably doesn't matter eitherway, but sticking to adjusting pose in only one location, either <joint> or <link> saves confusion and eases debugging.