Home | Tutorials | Wiki | Issues
Ask Your Question
0

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

asked 2016-10-28 23:44:13 -0500

soulslicer gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-10-31 10:57:30 -0500

chapulina gravatar image

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.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-10-28 23:44:13 -0500

Seen: 609 times

Last updated: Oct 31 '16