Canot change parent child relationship between base_link and base_footprint
I have changed a part of the code from
<joint name="base_footprint_joint" type="fixed">
<parent link="base_link"/>
<child link="base_footprint"/>
<origin xyz="0 0 0" rpy="0 0 0"/>
</joint>
<link name="base_footprint">
</link>
to
<joint name="base_footprint_joint" type="fixed">
<parent link="base_footprint"/>
<child link="base_link"/>
<origin xyz="0 0 0" rpy="0 0 0"/>
</joint>
<link name="base_footprint">
</link>
this before changing to this after changing
but the basefootprint disappears instead of becoming parent to baselink what to do , please help. Thank you.
Asked by iamsdevaprasad on 2023-07-19 11:16:14 UTC
Answers
This might be a stupid answer, but have you tried this?
<link name="base_footprint">
</link>
<joint name="base_footprint_joint" type="fixed">
<parent link="base_footprint"/>
<child link="base_link"/>
<origin xyz="0 0 0" rpy="0 0 0"/>
</joint>
Although my spider sense tells me that you should modify your setup so that gazebo publishes the transform "odom -> base_footprint" instead of "odom -> base_link"
Asked by Martin Peris on 2023-07-19 20:52:41 UTC
Comments
Thanks for the answer, but it didn't work. Any other tips ...
Asked by iamsdevaprasad on 2023-07-19 21:08:28 UTC
Although my spider sense tells me that you should modify your setup so that gazebo publishes the transform "odom -> base_footprint" instead of "odom -> base_link"
I know about it , but not sure how to do it...
Asked by iamsdevaprasad on 2023-07-19 21:21:35 UTC
I have found the answer to change the child link for odom frame it should be done in robot.gazebo file where you have added the differential drive plugin , not in robot.xacro file.
To be more precise what you have to do is
<joint name="base_footprint_joint" type="fixed">
<parent link="base_footprint"/>
<child link="base_link"/>
<origin xyz="0 0 0" rpy="0 0 0"/>
</joint>
<link name="base_footprint">
</link>
change this part of code in robot.xacro.
Then go to robot.gazebo and in diff drive plugin change.
<robotBaseFrame>base_footprint</robotBaseFrame>
now the tf graph goes as odom-->base_footprint-->base_link ...
Asked by iamsdevaprasad on 2023-07-20 12:15:29 UTC
Comments