-
Notifications
You must be signed in to change notification settings - Fork 337
ROS Topic when the controller is starting - on_init or on_activate #2127
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
Comments
During on_init() this is not possible. But in inactive state all the exported state and command interfaces are available, we recently updated the docs to make that clearer. |
Just to clarify: your goal is to monitor what's happening during startup, not to use that information elsewhere, right? To that end we've recently added some new support to |
Thank you for your fast feedback. I will have a look today. |
@bmagyar looking at: https://github.com/osrf/osrf_wiki/wiki/GSoC25#hardware-diagnostics-support-for-ros2_control I had a thought: You could implement a publisher for each hardware interface—similar to how dynamic_joint_states works—where each interface defines its own diagnostics or internal state values, much like how we currently define state_interfaces. Here’s an example from my URDF where I expose internal states:
So maybe something like this could be added for hardware_diagnostics:
Which could then automatically publish to a topic like: And then have a function for example Just a thought on a lightweight way to integrate diagnostics directly into the hardware interface layer. As I did think about doing this in my custom hardware interface. |
System: ROS 2 Jazzy
Hi,
I'm writing a custom hardware interface for an EtherCAT system. It works well, but it takes around 30–60 seconds for the system to fully initialize.
I'm wondering — is there a way to use /dynamic_joint_states (or another topic) to publish status updates during
on_init()
oron_activate()
?It would be really helpful if /dynamic_joint_states could start publishing at that stage.
Reason:
When I launch the system from the command line, I can see what's happening through the console output. But when running on the real robot, I use a GUI that monitors the internal system state using custom /dynamic_joint_states messages — and during startup, it’s silent.
I’m wondering if there’s a better or more standard way to expose what’s happening during initialization?
Bren
The text was updated successfully, but these errors were encountered: