Robotics StackExchange | Archived questions

Gazebo - Parent to child relative pose of a fixed joint keeps changinge

I have the following code

        math::Pose lidarPose = this->model->GetChildLink("LidarLink")->GetRelativePose();

My model is defined as such

<joint name='LidarJoint' type='fixed'>
  <parent>BoatLink</parent>
  <child>LidarLink</child>
  <pose frame=''>0 0 0 0 -0 0</pose>
  <physics>
    <ode>
      <limit>
        <cfm>0</cfm>
        <erp>0.2</erp>
      </limit>
      <suspension>
        <cfm>0</cfm>
        <erp>0.2</erp>
      </suspension>
    </ode>
  </physics>
</joint>

<model name='Lidar'>
  <link name='LidarLink'>
    <pose frame=''>0.490483 -0.009608 0.58868 0 0 0</pose>
    <inertial>
      <mass>0.1</mass>
    </inertial>
</model>

<model name='Boat'>
<link name='BoatLink'>
  <pose frame=''>-4e-06 -5e-06 0 0 -0 0</pose>
</model>

But in my code the lidarPose keeps on changing when the robot moves. Btw the model refers to a plugin to the Boat which is BoatLink. It's a fixed joint shouldnt it be the same

Asked by soulslicer on 2016-10-28 23:44:13 UTC

Comments

Answers

Do you need both links to be in different models? You could place both links in the same model, along with the joint, and it should work.

Also, note that the relative pose is the pose of the link with respect to the model, not the pose of the child link with respect to the parent link of a joint.

Asked by chapulina on 2016-10-31 10:57:30 UTC

Comments