Skip to content

Conversation

@kuralme
Copy link

@kuralme kuralme commented Nov 9, 2025

Used new tf frame prefix helper in differential drive controller to test out & showcase the helper. This is the first part of the changes, the other controllers will come next:

  • mecanum_drive_controller
  • omni_wheel_drive_controller

Related issue

Copy link
Member

@saikishor saikishor left a comment

Choose a reason for hiding this comment

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

I'm not sure if it makes sense to have it in the control_toolbox package. What about controllers_interfaces/helpers.hpp existing file?

What do you think @christophfroehlich ?

@christophfroehlich
Copy link
Member

I'm not sure if it makes sense to have it in the control_toolbox package. What about controllers_interfaces/helpers.hpp existing file?

OK, maybe you are right and we should put it here.

@kuralme
Copy link
Author

kuralme commented Nov 10, 2025

I'm not sure if it makes sense to have it in the control_toolbox package. What about controllers_interfaces/helpers.hpp existing file?

OK, maybe you are right and we should put it here.

I will start working on it

Copy link
Member

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

There is a behavior-breaking change now, right?
Can we do that gracefully? e.g.,

@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 77.77778% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.89%. Comparing base (ce81c9e) to head (a945c58).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...iff_drive_controller/src/diff_drive_controller.cpp 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1997      +/-   ##
==========================================
- Coverage   84.91%   84.89%   -0.03%     
==========================================
  Files         148      148              
  Lines       14367    14351      -16     
  Branches     1230     1227       -3     
==========================================
- Hits        12200    12183      -17     
- Misses       1740     1741       +1     
  Partials      427      427              
Flag Coverage Δ
unittests 84.89% <77.77%> (-0.03%) ⬇️

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

Files with missing lines Coverage Δ
...ive_controller/test/test_diff_drive_controller.cpp 93.99% <100.00%> (-0.20%) ⬇️
...iff_drive_controller/src/diff_drive_controller.cpp 82.39% <50.00%> (-0.62%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kuralme kuralme force-pushed the tf_prefix_helper/diff_drive branch from 53851e8 to 0e25332 Compare November 15, 2025 15:49
@kuralme
Copy link
Author

kuralme commented Nov 15, 2025

A note about my last commit: This is for the deprecations. I am aware of Bence's request, I will apply if a change needed to the helper source.

Copy link
Member

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

tf_frame_prefix_enable was not unused before? Instead, during the deprecation phase, we still should use this parameter before we remove it.

I'm not sure how we can gracefully transition the usage of node namespace? Currently, if tf_frame_prefix is not set, then automatically the node namespace is used.

- control toolbox pkg already linked
- this commit is to be deleted later
- enable flag removed from args
- tilde substitution with ns added
- tests updated
- verbose comments
- log message added if tf_frame_prefix_enable is not set default
- relevant info added to yaml description, migration and release notes
@kuralme kuralme force-pushed the tf_prefix_helper/diff_drive branch from 05a578b to aae1a3e Compare December 1, 2025 16:14
Copy link
Member

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

(failing tests are fine, I've released ros2_control but rosdistro is on hold for the upcoming sync).

Comment on lines +433 to +434
const auto tf_prefix =
controller_interface::resolve_tf_prefix(params_.tf_frame_prefix, get_node()->get_namespace());
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
const auto tf_prefix =
controller_interface::resolve_tf_prefix(params_.tf_frame_prefix, get_node()->get_namespace());
std::string tf_prefix = "";
if (params_.tf_frame_prefix_enable)
{
if (params_.tf_frame_prefix != "")
{
tf_prefix =
controller_interface::resolve_tf_prefix(params_.tf_frame_prefix, get_node()->get_namespace());
}
else
{
tf_prefix = std::string(get_node()->get_namespace());
}
}

In this way, we get backward compatibility? currently we have the deprecation notice, but it has no effect any more.

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.

3 participants