Namespace substitution in tf2 frame names
@mjcarroll is already working on this.
Since May 1, 2025.
- Dominant language
- C++
- Stars
- 153
- Forks
- 256
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 14
Description
Description
Similar to the substitution in ROS 2 topic names, I would like to replace the ~ with the namespace in frame names. This would make multi-robot configuration much easier, without needing to change existing nodes or require support from the node maintainer for namespaces.
Motivation
When running multi-robot systems with many different namespaces, we currently have host-specific config files that override the frame parameters for each node and replace them with the properly namespaced ones. This would all be gone. Instead, it would just be a "~/odom" in the general config to get the odom frame of a robot.
Design / Implementation Considerations
When doing a tf2_lookup / transform etc..., it would check for a ~ as the first character and substitute it with the namespace.
Additional Information
I didn't know about the name substitution in topic names until I looked at the source code, and now the only missing part is the TF frame names.
I would be more than happy to implement it myself, but ideally, you guys could give me a hint in the right direction as to where to implement it, so that all components use it.
https://discourse.ros.org/t/proposal-namespace-shorthand-support-in-ros-2-parameter-values/43295
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.