Status Update

You can acquire the robot’s status value through the UpdateRobotStatus function provided by the RobotMotionApi.

int errorCode[wmx3Api::RobotStatus::ErrorBit::ERROR_BIT_SIZE];
int errorBit = this->robot.UpdateRobotStatus(this->robotMotionParam.robotParam.robotId, this->robotStatus, errorCode);

And you can determine an error by checking the bit of the return value of UpdateRobotStatus. The type of error indicated by each errorBit is as follows.

../_images/ROBOT_OPTION_DOC_PROGRAMMING_GUIDE_ROBOT_STATE_05.png

The bits ERROR_BIT_GET_STATE_CMD, ERROR_BIT_GET_STATE_FEEDBACK, ERROR_BIT_GET_MOTION_STATE, ERROR_BIT_GET_MOTION_ERROR_CODE mean that there is an error in performing the function to acquire the robot’s status information. If it is determined that there is an error with that bit, checking the errorCode value can help identify the cause of the error.

The ERROR_BIT_MOTION_ERROR bit means that there is an error in the robot. If it is determined that there is an error with that bit, you can check what the error is through robotStatus.motionErrorInfo.errorCode.