Yaskawa-Global / motoros2

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

mpExRcsIncrementMove is constantly sending zero pulse increments after each motion #190

Closed iydv closed 10 months ago

iydv commented 10 months ago

After testing #157 I have discovered another issue: mpExRcsIncrementMove with zero pulse increments is constantly being sent after each movement. Such behavior did not happen before the update.

I have done following experiment to test it:

1) Test 1: checkout bd95e65679d582b13b3887e5277d34f7406db69a and add debug message before mpExRcsIncrementMove here

Ros_Debug_BroadcastMsg("Send mpExRcsIncrementMove tool: %d, pos data: %d %d %d %d %d %d", moveData.grp_pos_info[0].pos_tag.data[2], moveData.grp_pos_info[0].pos[0], moveData.grp_pos_info[0].pos[1], moveData.grp_pos_info[0].pos[2], moveData.grp_pos_info[0].pos[3], moveData.grp_pos_info[0].pos[4], moveData.grp_pos_info[0].pos[5]);

Select tool 4 and sent simple trajectory with single point. Resulting log file test1.txt clearly indicate that when the trajectory is complete mpExRcsIncrementMove is no longer being sent to the controller.

2) Test 2: checkout main and add same debug message here.

Similar to Test 1, I select tool 4 and move robot using simple trajectory. Resulting log file test2.txt shows that after trajectory is complete, mpExRcsIncrementMove with zero pulse increments is being constantly sent to the robot.

The main problem for my application is that after the motion is finished, empty mpExRcsIncrementMove changes tool from 4 to 0 and I cannot obtained correct Force/ Torque data. Additionally, I do not think it is normal that zero pulses are constantly being sent to controller.

The main reason of this happening the following condition which is always TRUE since here hasUnprocessedData is set to TRUE and is only reset to FALSE when trajectory mode is disabled.