Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tf pub for each robot (support namespace) #45

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

finani
Copy link
Contributor

@finani finani commented Aug 5, 2024

Add tf pub for each robot (support namespace)

I wanted to use mvsim with nav2 for multi-agent scenario.
Since Nav2 supports namespace, tf topics should also be separated like other topics.
However, every robot's tf & tf_static is published as /tf & /tf_static in mvsim.
Therefore, I added tf & tf_static pub for each robot and topics become completely independant for each namespace.

before

  • r1, r2
topic name frame id
/tf /r1/odom, /r2/odom, ...
/tf_static /r1/base_link, /r2/base_link, ...

after

  • r1, r2
topic name frame id
/tf /r1/odom, /r2/odom, ...
/tf_static /r1/base_link, /r2/base_link, ...
/r1/tf /r1/odom, ...
/r1/tf_static /r1/base_link, ...
/r2/tf /r2/odom, ...
/r2/tf_static /r2/base_link, ...

If you want to check tf, use rqt_tf tree

ros2 run rqt_tf_tree rqt_tf_tree /tf:=/<namespace>/tf /tf_static:=/<namespace>/tf_static

@jlblancoc
Copy link
Member

Awesome! Looks good to me. Can you please just check the missing ci test on clang format?

@finani
Copy link
Contributor Author

finani commented Aug 5, 2024

Sure!
I updated. Thanks!

@jlblancoc jlblancoc enabled auto-merge August 5, 2024 09:49
@jlblancoc jlblancoc merged commit efb4683 into MRPT:develop Aug 5, 2024
5 checks passed
@jlblancoc
Copy link
Member

Thanks!

@jlblancoc
Copy link
Member

@finani could you please take a look at the build errors after this PR in ROS? e.g.

Perhaps a missing edit to be committed? Unfortunately, CI in the PRs doesn't catch up with the ROS node yet...

@finani
Copy link
Contributor Author

finani commented Aug 5, 2024

Oh.. I will check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants