ros2_controllers icon indicating copy to clipboard operation
ros2_controllers copied to clipboard

Implement new PoseBroadcaster controller

Open RobertWilbrandt opened this issue 1 year ago • 3 comments

This PR implements a new broadcasting controller based on the PoseSensor semantic component introduced in https://github.com/ros-controls/ros2_control/pull/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 https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver/pull/1108.

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

RobertWilbrandt avatar Oct 09 '24 09:10 RobertWilbrandt

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

bmagyar avatar Oct 09 '24 15:10 bmagyar

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 :warning:
pose_broadcaster/test/test_pose_broadcaster.hpp 93.75% 0 Missing and 1 partial :warning:
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%) :arrow_up:

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

codecov[bot] avatar Oct 09 '24 15:10 codecov[bot]

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.

RobertWilbrandt avatar Oct 10 '24 19:10 RobertWilbrandt

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

fmauch avatar Oct 29 '24 10:10 fmauch

@mergifyio backport humble iron

christophfroehlich avatar Oct 29 '24 21:10 christophfroehlich

backport humble iron

✅ Backports have been created

mergify[bot] avatar Oct 29 '24 21:10 mergify[bot]