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

Implement new PoseBroadcaster controller #1311

Merged
merged 17 commits into from
Oct 26, 2024

Conversation

RobertWilbrandt
Copy link
Contributor

This PR implements a new broadcasting controller based on the PoseSensor semantic component introduced in ros-controls/ros2_control#1775.

As described in the PoseSensor PR, my primary use-case for this is the publishing of tcp poses from robot arms. This can be more accurate than calculating forward kinematics, as robot calibrations etc. can be considered by the robot. Settings on the robot side concerning tool offsets etc. can also be included by this (at least for UR and kuka RSI). The ROS 1 ur_robot_driver used to publish this transform directly from within the hardware interface, but in ROS 2 there is not yet a standard way for providing this information. A PR for the UR ROS 2 driver already exists at UniversalRobots/Universal_Robots_ROS2_Driver#1108.

This controller publishes poses directly as geometry_msgs::msg::PoseStampeds and as tf transforms (can be disabled).

pose_broadcaster/doc/userdoc.rst Outdated Show resolved Hide resolved
pose_broadcaster/pose_broadcaster.xml Outdated Show resolved Hide resolved
pose_broadcaster/src/pose_broadcaster.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@fmauch fmauch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! As @RobertWilbrandt wrote, we tested this in the UR driver already.

@bmagyar
Copy link
Member

bmagyar commented Oct 9, 2024

Would you see use of this being a chainable controller at the same time?

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

Attention: Patch coverage is 92.12121% with 13 lines in your changes missing coverage. Please review.

Project coverage is 80.58%. Comparing base (f96d2fc) to head (8491b06).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pose_broadcaster/src/pose_broadcaster.cpp 84.21% 8 Missing and 4 partials ⚠️
pose_broadcaster/test/test_pose_broadcaster.hpp 93.75% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1311      +/-   ##
==========================================
+ Coverage   80.37%   80.58%   +0.21%     
==========================================
  Files         105      109       +4     
  Lines        9387     9551     +164     
  Branches      824      830       +6     
==========================================
+ Hits         7545     7697     +152     
- Misses       1570     1578       +8     
- Partials      272      276       +4     
Flag Coverage Δ
unittests 80.58% <92.12%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...se_broadcaster/test/test_load_pose_broadcaster.cpp 100.00% <100.00%> (ø)
pose_broadcaster/test/test_pose_broadcaster.cpp 100.00% <100.00%> (ø)
pose_broadcaster/test/test_pose_broadcaster.hpp 93.75% <93.75%> (ø)
pose_broadcaster/src/pose_broadcaster.cpp 84.21% <84.21%> (ø)

... and 1 file with indirect coverage changes

@RobertWilbrandt
Copy link
Contributor Author

I don't have much experience with chaining controllers, but this sounds like a good extension. I can work on that and extend this PR.

@bmagyar bmagyar merged commit 7c89c17 into ros-controls:master Oct 26, 2024
15 of 21 checks passed
@fmauch
Copy link
Contributor

fmauch commented Oct 29, 2024

@bmagyar This should probably be backported? The semantic component has already been backported.

@christophfroehlich
Copy link
Contributor

@Mergifyio backport humble iron

Copy link
Contributor

mergify bot commented Oct 29, 2024

backport humble iron

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 29, 2024
(cherry picked from commit 7c89c17)

# Conflicts:
#	doc/controllers_index.rst
mergify bot pushed a commit that referenced this pull request Oct 29, 2024
christophfroehlich added a commit that referenced this pull request Nov 1, 2024
* Implement new PoseBroadcaster controller (#1311)

(cherry picked from commit 7c89c17)

# Conflicts:
#	doc/controllers_index.rst

* Update controllers_index.rst

* Fix API in tests

* Add hardware_interface_testing dependency

---------

Co-authored-by: RobertWilbrandt <[email protected]>
Co-authored-by: Christoph Fröhlich <[email protected]>
Co-authored-by: Bence Magyar <[email protected]>
Co-authored-by: Christoph Froehlich <[email protected]>
christophfroehlich added a commit that referenced this pull request Nov 1, 2024
* Implement new PoseBroadcaster controller (#1311)

(cherry picked from commit 7c89c17)

* Fix API in tests

* Add hardware_interface_testing dependency

---------

Co-authored-by: RobertWilbrandt <[email protected]>
Co-authored-by: Christoph Froehlich <[email protected]>
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.

4 participants