Pass URDF to controllers on init#1088
Conversation
7f832b4 to
c80c1e6
Compare
| std::vector<hardware_interface::LoanedStateInterface> state_interfaces_; | ||
| unsigned int update_rate_ = 0; | ||
| bool is_async_ = false; | ||
| std::string urdf_ = ""; |
There was a problem hiding this comment.
Should this be a std::optional<std::string> urdf_ = std::nullopt instead?
There was a problem hiding this comment.
I don't want to communicate the option of not being set as anything close to valid. The empty string initial value is only there so we can test if it was properly set...
I also thought about how we could do this better, a const string would be nice but that can only be set once which doesn't work well with the longer term idea of getting URDF updates from topics.
saikishor
left a comment
There was a problem hiding this comment.
The provision of the URDF directly to the controllers is a brilliant idea. This reduces the hassles one should go through to set up their controllers.
However, I think there is a missing part in assigning this URDF from the controller_manager's end, and at least one test that verifies the robot_description string from the topic or param is the same as that inside the controller.
Another test that checks when a URDF is updated in the topic, the newly initialized controllers get the new URDF rather than the old one.
Brilliant work 👏
|
This pull request is in conflict. Could you fix it @bmagyar? |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1088 +/- ##
==========================================
- Coverage 31.62% 31.55% -0.08%
==========================================
Files 94 94
Lines 10838 10878 +40
Branches 7419 7454 +35
==========================================
+ Hits 3428 3433 +5
+ Misses 804 802 -2
- Partials 6606 6643 +37
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Hey @bmagyar -- I am working with some folks that are using Humble and would like this feature backported. Would you be okay with this, or does this break ABI in some way? EDIT: Yeah this definitely breaks ABI... ugh... |
|
Yes, I don't think it makes sense to backport this. |
|
I was not aware it still built on humble, thanks! |
|
I'm afraid it's break too many things for backport it.
…On Mon, 8 Sept 2025, 09:49 Sebastian Castro, ***@***.***> wrote:
*sea-bass* left a comment (ros-controls/ros2_control#1088)
<#1088 (comment)>
I was not aware it still built on humble, thanks!
—
Reply to this email directly, view it on GitHub
<#1088 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA24PYKMBHZNGMLU4D2KGL33RU7JXAVCNFSM6AAAAACFYXRX62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENRVGI2TKNBTGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@sea-bass You can find more information here: |
This should help avoiding extra legwork in controllers to get access to the
/robot_description.