Yaskawa-Global / motoros2

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

Correct check for 'invalid motion type' (issue 178) #179

Closed gavanderhoorn closed 8 months ago

gavanderhoorn commented 8 months ago

Should fix #178 -- if I interpreted your https://github.com/Yaskawa-Global/motoros2/issues/178#issuecomment-1759760398 correctly @ted-miller.

Please do test this time :)

I'm not near a controller so can't test it myself, but I did want to fix the mistake I introduced in #176.

gavanderhoorn commented 8 months ago

Well it doesn't alarm at startup.

neither for me.

I'm not sure how to test the actual alarm though.

I just commented out this line:

https://github.com/Yaskawa-Global/motoros2/blob/df3a334e975bdd226780dcc9bd72b6406e0692e1/src/PositionMonitor.c#L299-L299

and that got me:

...
Ros_PositionMonitor_CalculateTransforms: Inv. motion type: 0 (axis: 0)
motoRosAssert: Inv. motion type: 0 (axis: 0) (subcode: 63)
...

which is what I would expect.