ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Canot change parent child relationship between base_link and base_footprint

asked 2023-07-19 11:16:14 -0600

iamsdevaprasad gravatar image

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 base_footprint disappears instead of becoming parent to base_link what to do , please help. Thank you.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2023-07-20 12:15:29 -0600

iamsdevaprasad gravatar image

updated 2023-07-20 13:47:08 -0600

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 ...

edit flag offensive delete link more
0

answered 2023-07-19 20:52:41 -0600

updated 2023-07-19 20:57:02 -0600

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"

edit flag offensive delete link more

Comments

Thanks for the answer, but it didn't work. Any other tips ...

iamsdevaprasad gravatar image iamsdevaprasad  ( 2023-07-19 21:08:28 -0600 )edit

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...

iamsdevaprasad gravatar image iamsdevaprasad  ( 2023-07-19 21:21:35 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2023-07-19 11:16:14 -0600

Seen: 159 times

Last updated: Jul 20 '23