Kawasaki-Robotics / khi_robot

ROS KHI robot meta-package
http://wiki.ros.org/khi_robot
BSD 3-Clause "New" or "Revised" License
54 stars 28 forks source link

Diagnostics should not be OK if the realtime control loop is overrun #46

Open haudren opened 3 years ago

haudren commented 3 years ago

Hello,

I noticed the following behavior today during some testing:

I guess the problem is here: https://github.com/Kawasaki-Robotics/khi_robot/blob/99cf142c46892a716ee6c9bbc0518e97fc803f12/khi_robot_control/src/main.cpp#L175

I would expect to see a 1 (WARNING) or 2 (ERROR) or even 3 (STALE)

By the way, I would recommend using Enums, as in

diagnostics_msgs::DiagnosticStatus::WARN

Instead of directly using the values

d-nakamichi commented 3 years ago

Yes, currently status.level changes to 0 when overrun continues. So I try to modify its level and overrun counting.

https://github.com/d-nakamichi/khi_robot/commits/modify_diagnostics_level

It would be helpful if you comment something about this.