/** * Get the current action working status. Refer to ActionStatus for details. */ ActionStatus getStatus();
/** * Cancel the action to let it stop working. */ void cancel();
/** * Wait the action to stop (ether finish working, been cancelled or stopped by some error). Returns the action execution result via the ActionStatus Enum. */ ActionStatus waitUntilDone();
/** * Check whether the current Action is an empty action. If the current action is empty, it means the SLAMWARE system is in idle state. */ bool isEmpty();
/** * Retrieves the ActionID of the action. */ rpos::core::ActionID getActionId();
/** * Retrieves the detailed error description text message once the Action::getStatus() method returns ActionStatusError. */ std::string Action::getReason();
|Reason Text||Available Actions||Descriptions|
||all actions||the action just fails|
||all actions||the action has been aborted (been cancelled or aborted by a new action )|
||actions returned by moveTo()||there is no valid path to the destination point|
|actions returned by moveTo() with MoveOptionFlagKeyPoints set||action failed due to there exists obstacles in front of the robot when following virtual tracks.
The X can be any combination of the following items:
"lidar" : obstacle is detected by LIDAR(s)
"wall" : obstacle is a virtual wall
"contact" : obstacle is detected by bump sensors
"depth_camera" : obstacle is detected by depth camera(s)
"sonar" : obstacle is detected by ultrasonic sensor(s).
If more than one above items should be included in the X, a semi-colons (;) symbol is used to join these items.
/** * cast a rpos::core::Action to its child class object */ template<class ActionT> ActionT cast()
rpos::core::Action someAction = robotPlatform.startSomeAction(); rpos::actions::MoveAction moveAction = someAction.cast<rpos::actions::MoveAction>();