Skip to content

Conversation

@saikishor
Copy link
Member

@saikishor saikishor commented Nov 17, 2025

This PR adds a new broadcaster that publishes the values of the interfaces in the same order defined in the broadcaster configuration. This is very useful, especially for the physical AI application, where the observation vector can be properly created beforehand

needs: ros-controls/control_msgs#273

@mergify
Copy link
Contributor

mergify bot commented Nov 17, 2025

This pull request is in conflict. Could you fix it @saikishor?

@saikishor saikishor force-pushed the add/generic_state_broadcaster branch from 0c75da3 to a0b0b1c Compare November 17, 2025 21:04
@christophfroehlich christophfroehlich moved this to Needs review in Review triage Nov 18, 2025
Copy link
Contributor

@Juliaj Juliaj left a comment

Choose a reason for hiding this comment

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

@saikishor, I needed to debug my example code that depends on this controller. I've added the changes made on my machine to make it compile with the updated control_msgs.

@saikishor
Copy link
Member Author

Thanks a lot for taking care @Juliaj . I was about to fix it

Copy link
Contributor

@Juliaj Juliaj left a comment

Choose a reason for hiding this comment

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

LGTM.

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.

@github-project-automation github-project-automation bot moved this from Needs review to WIP in Review triage Dec 14, 2025
@saikishor
Copy link
Member Author

LGTM.

Thank you @Juliaj for taking time and testing 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.

btw: Why did you call it interfaces_state_broadcaster instead of state_interfaces_broadcaster?


Interfaces State Broadcaster
--------------------------------
The Interfaces State Broadcaster publishes the state of specified hardware interfaces that support double data type.
Copy link
Member

Choose a reason for hiding this comment

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

This is not 100% true. "is_castable_to_double" is true for all datatypes we currently support, but the get_optional only works for double and bool with additional warning.
We should either limit it to double-only, or support all castable datatypes for real ;)
This is what I started here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I would change the logic internally to the code to reflect that

@saikishor
Copy link
Member Author

btw: Why did you call it interfaces_state_broadcaster instead of state_interfaces_broadcaster?

Good question, first I named the project generic_state_broadcaster, but then I changed it to the current one. I agree it makes sense to be state_interfaces_broadcaster. I'll change it later

@saikishor saikishor self-assigned this Dec 15, 2025
@saikishor saikishor added backport-jazzy Triggers PR backport to ROS 2 jazzy. backport-kilted Triggers PR backport to ROS 2 kilted. labels Dec 15, 2025
@christophfroehlich christophfroehlich changed the title Add interfaces_state_broadcaster Add state_interfaces_broadcaster Dec 15, 2025
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.

some minor cleanups, rest LGTM

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.

LGTM

@christophfroehlich christophfroehlich merged commit ef3167d into ros-controls:master Dec 15, 2025
17 of 19 checks passed
@christophfroehlich christophfroehlich deleted the add/generic_state_broadcaster branch December 15, 2025 21:14
@github-project-automation github-project-automation bot moved this from WIP to Done in Review triage Dec 15, 2025
mergify bot pushed a commit that referenced this pull request Dec 15, 2025
(cherry picked from commit ef3167d)

# Conflicts:
#	doc/release_notes.rst
mergify bot pushed a commit that referenced this pull request Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-jazzy Triggers PR backport to ROS 2 jazzy. backport-kilted Triggers PR backport to ROS 2 kilted.