Yaskawa-Global / motoros2

ROS 2 (rcl, rclc & micro-ROS) node for MotoPlus-compatible Yaskawa Motoman robot controllers
89 stars 14 forks source link

Extend `motoRosAssert(..)` to output expected value #268

Open gavanderhoorn opened 1 week ago

gavanderhoorn commented 1 week ago

Current implementation posts an alarm and enters an infinite loop printing motoRosAssert: MotoROS2: Fatal Error (subcode: N).

While that works, it would be more helpful to us (and users) if it printed the expected value (whatever that would mean for specific motoRosAssert(..) invocations).

Example:

https://github.com/Yaskawa-Global/motoros2/blob/d8b75ddcfe763db44f6f13ebc66c28469d154acd/src/PositionMonitor.c#L55-L62

an extended version of motoRosAssert(..) would output the values of ret and RCL_RET_OK as part of the message.

gavanderhoorn commented 1 week ago

Context: #266 (among others).