personalrobotics / pymoveit2

Basic Python interface for MoveIt 2 built on top of ROS 2 actions and services
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Reset last error code before action execution #6

Closed amalnanavati closed 1 year ago

amalnanavati commented 1 year ago

Consider two cases, one where action server (either for execute or MoveGroup) is not available, and another where the action succeeds very fast. Both cases are currently indistinguishable from the client perspective, because they will request a goal, and then when they query the state it will be IDLE. This commit resolves that, because if the error code is set that means the action completed very fast, whereas if it is None that means the action did not complete. (Earlier that was not possible, because if the error code was set it was unclear whether it was set form the current action or the last action)