Yaskawa-Global / motoros2

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

`Ros_MotionControl_ValidateMotionModeIsOk()` should only check, not act #216

Open gavanderhoorn opened 7 months ago

gavanderhoorn commented 7 months ago

Context: #213.

Current implementation:

https://github.com/Yaskawa-Global/motoros2/blob/10d8f00317c5d4ef7960627962337bf72e2ba817/src/MotionControl.c#L1591-L1608

Either the name of the function should be changed to reflect the fact it actually changes system state (as in: exits the current motion mode if something is wrong), or it should only implement the actual check and leave acting based on the results to the caller.

gavanderhoorn commented 7 months ago

Known call sites as of this comment:

https://github.com/Yaskawa-Global/motoros2/blob/7574bd2d849efda1ad631c07bdc059b585db5c81/src/CommunicationExecutor.c#L469