Skip to content

Add data_type field to the HardwareInterfaces message (backport #2204) #2232

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

Merged
merged 5 commits into from
May 24, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 15, 2025

This would be interesting to have when we extend the data types in the handles. Now, the CLI will also show the type of the interface, so it is much easier for the users to understand the types from a closed system. Below will be the output with these changes

$ ros2 control list_hardware_interfaces 
command interfaces
	joint1/position [available] [claimed]
	joint1_position_controller/joint1/position [available] [unclaimed]
	joint2/position [available] [claimed]
	joint2_position_controller/joint2/position [available] [unclaimed]
state interfaces
	joint1/position
	joint2/position

$ ros2 control list_hardware_interfaces -v
command interfaces
	joint1/position [double] [available] [claimed]
	joint1_position_controller/joint1/position [double] [available] [unclaimed]
	joint2/position [double] [available] [claimed]
	joint2_position_controller/joint2/position [double] [available] [unclaimed]
state interfaces
	joint1/position [double]
	joint2/position [double]
$ ros2 control list_hardware_components 
Hardware Component 1
	name: RRBot
	type: system
	plugin name: ros2_control_demo_example_12/RRBotSystemPositionOnlyHardware
	state: id=3 label=active
	read/write rate: 10 Hz
	is_async: False
	command interfaces
		joint2/position [available] [claimed]
		joint1/position [available] [claimed]

$ ros2 control list_hardware_components -v
Hardware Component 1
	name: RRBot
	type: system
	plugin name: ros2_control_demo_example_12/RRBotSystemPositionOnlyHardware
	state: id=3 label=active
	read/write rate: 10 Hz
	is_async: False
	command interfaces
		joint2/position [double] [available] [claimed]
		joint1/position [double] [available] [claimed]
	state interfaces
		joint2/position [double] [available]
		joint1/position [double] [available]


This is an automatic backport of pull request #2204 done by [Mergify](https://mergify.com).

(cherry picked from commit 0c7cb99)

# Conflicts:
#	doc/release_notes.rst
@mergify mergify bot added the conflicts label May 15, 2025
Copy link
Contributor Author

mergify bot commented May 15, 2025

Cherry-pick of 0c7cb99 has failed:

On branch mergify/bp/jazzy/pr-2204
Your branch is up to date with 'origin/jazzy'.

You are currently cherry-picking commit 0c7cb99.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   controller_manager/src/controller_manager.cpp
	modified:   controller_manager_msgs/msg/HardwareInterface.msg
	modified:   hardware_interface/include/hardware_interface/resource_manager.hpp
	modified:   hardware_interface/src/resource_manager.cpp
	modified:   ros2controlcli/doc/userdoc.rst
	modified:   ros2controlcli/ros2controlcli/verb/list_hardware_components.py
	modified:   ros2controlcli/ros2controlcli/verb/list_hardware_interfaces.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   doc/release_notes.rst

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Copy link

codecov bot commented May 16, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.

Please upload report for BASE (jazzy@13f94d6). Learn more about missing BASE report.

Files with missing lines Patch % Lines
hardware_interface/src/resource_manager.cpp 66.66% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             jazzy    #2232   +/-   ##
========================================
  Coverage         ?   88.58%           
========================================
  Files            ?      142           
  Lines            ?    16490           
  Branches         ?     1430           
========================================
  Hits             ?    14608           
  Misses           ?     1329           
  Partials         ?      553           
Flag Coverage Δ
unittests 88.58% <75.00%> (?)

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

Files with missing lines Coverage Δ
controller_manager/src/controller_manager.cpp 75.08% <100.00%> (ø)
hardware_interface/src/resource_manager.cpp 73.70% <66.66%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@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.

cross-checking: ABI break is fine?

failing docs get fixed with #2241

@saikishor
Copy link
Member

cross-checking: ABI break is fine?

failing docs get fixed with #2241

I guess so

@christophfroehlich
Copy link
Contributor

The API changes are fine because only internal, but we break the message types used in the services. This is mostly used with CLI verbs I guess, but it might break users rosbags. @bmagyar any red flag in merging this?

@bmagyar
Copy link
Member

bmagyar commented May 24, 2025

This is important for whatever else we'd like to land in Jazzy with Variants.

@bmagyar bmagyar merged commit 57ed164 into jazzy May 24, 2025
11 of 13 checks passed
@bmagyar bmagyar deleted the mergify/bp/jazzy/pr-2204 branch May 24, 2025 09:56
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