Skip to content
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

Allow diagnostics to be published from a hardware_interface #1732

Open
Timple opened this issue Aug 30, 2024 · 0 comments
Open

Allow diagnostics to be published from a hardware_interface #1732

Timple opened this issue Aug 30, 2024 · 0 comments

Comments

@Timple
Copy link
Contributor

Timple commented Aug 30, 2024

Is your feature request related to a problem? Please describe.
For an actuator, often the actuator reports more values that just the measured one. For example current power consumed. It would be nice to have this information available on the /diagnostics topic.

Describe the solution you'd like
A way to easily supply diagnostics from a hardware_interface. For example:

hardware_interface::return_type MyActuator::read(const rclcpp::Time &, const rclcpp::Duration &);

hardware_interface::return_type MyActuator::write(const rclcpp::Time &, const rclcpp::Duration &);

hardware_interface::return_type MyActuator::produce_diagnostics(diagnostic_updater::DiagnosticStatusWrapper &stat);

Or:

hardware_interface::CallbackReturn on_configure(const rclcpp_lifecycle::State & previous_state);

hardware_interface::CallbackReturn add_diagnostic_task(const DiagnosticTask * t);

Describe alternatives you've considered
Creating a diagnostic_updater_ class member. Which also needs a node_ and then spin an executor. Like this: https://github.com/nicklgw/bdrive_hardware_interface/blob/f557bf1111f6ecc2df0389d25c7e73225e294a61/src/bdrive_hardware_interface.cpp#L93

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant