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

WIP: Prefix description #183

Open
wants to merge 3 commits into
base: noetic-devel
Choose a base branch
from

Conversation

fmauch
Copy link

@fmauch fmauch commented Nov 7, 2021

The current husky description does not allow to add a tf_prefix to the robot.

In certain situations, however, this might be desired, e.g. when setting up multi-master systems with a shared /tf topic to contain data from all robots.

I've hacked together tf prefixes in all places where they were relevant for my current use case, the state of this PR should be considered as "works for me".

I would love to go the extra mile to finish this in a quality that could be merged into this repository, but first I wanted to clarify whether this is desired or not. An opinion from the maintainers would be welcome here :-)

I tried to follow the scheme of using environment variables to parameterize everything instead of using xacro macros with arguments as I would be used to from other descriptions I've worked with.

@fmauch
Copy link
Author

fmauch commented Nov 9, 2021

Note: One has to adapt the control.yaml file, as well to respect the new joint and link names.

In our use case we have our own bringup package, anyway, so we copied it and adapted it there.

@civerachb-cpr
Copy link
Contributor

Thanks for submitting this. I've assigned our senior software dev to take a look. I don't know if we'll be merging this directly into the noetic-devel branch, but it's certainly a feature improvement that merits a discussion on our end.

@fmauch
Copy link
Author

fmauch commented Nov 12, 2021

Nice to hear that there is interest in this topic. A bit off-topic but related: we're currently doing the same for the spot driver/description. I can open a PR there, as well.

fmauch and others added 2 commits February 11, 2022 13:58
This way, the description can easily used in a multi-robot setup.
Those tests build the description with all possible accessories and starts
a robot_state_broadcaster with them. If the generated description is not
correct in terms of producing a valid kinematic chain this test will fail.
@fmauch fmauch marked this pull request as ready for review February 11, 2022 12:59
@fmauch
Copy link
Author

fmauch commented Feb 11, 2022

Finally working with this again I'd like to finish this PR. We've been using that setup successfully in a multi-robot scenario and it worked out really fine for us.

I also took the liberty to implement launchfile tests with loading the description. I found this quite useful while developing since there are a lot of switches in the URDF and I wanted to make sure that every component combination would work as expected when defining a tf_prefix.

From my point of view this is now ready to get reviewed. @tonybaltovski as you have been asked to review this by @civerachb-cpr it would be nice if you could find the time to have a look at this.

@gxfgit

This comment was marked as spam.

@mikepurvis
Copy link
Member

I feel like we used to have tf_prefix in Husky a long time ago and ended up dropping support for it, partly on the basis of this guidance from upstream:

http://wiki.ros.org/tf2/Migration#Removal_of_support_for_tf_prefix

Are people doing multiple Husky instances in a single simulation/tf-tree? You certainly can do that, but another popular method is to run one ROS Master and Gazebo instance per robot, and then sync the positions between them as "ghosts" so that the lasers and cameras and so on see each other.

@rgariepy
Copy link
Contributor

rgariepy commented Jun 15, 2022 via email

@fmauch
Copy link
Author

fmauch commented Jun 30, 2022

Are people doing multiple Husky instances in a single simulation/tf-tree? You certainly can do that, but another popular method is to run one ROS Master and Gazebo instance per robot, and then sync the positions between them as "ghosts" so that the lasers and cameras and so on see each other.

This is not only intended for simulation, but we use a multi-robot setup (Husky, Spot, ANYmal) on a collaborative planetary exploration scenario. We do in fact use a multi-master system, but since our robots are not only mere clumps of metal floating around in space, synchronizing their poses only doesn't really fulfill everything. For example, one robot might detect an object that needs to be inspected / manipulated by another robot, which requires localizing this object in a common coordinate system. TF is simply the right tool to handle this IMHO.

Since ros/robot_state_publisher#169 it would also be possible to implement this using the joint_state_publisher's tf_prefix parameter which would still require adapting things like the frames used for the EKF. I guess, this should be sufficient for most situations.

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.

None yet

5 participants