rpos::features::MotionPlanner Class

Provides all kinds of navigation functions, including dynamic path finding, autonomous obstacle avoidance, auto docking and more.

Header File

rpos/features/motion_planner.h

Applies to

  • Slamware

Parent Class

rpos::core::Feature

Methods

/**
* Go back to home dock
*/
actions::MoveAction goHome(const rpos::features::motion_planner::GoHomeOptions& options);
Parameter Type Description
options const features::motion_planner::GoHomeOptions& options of GohomeAction
return actions::MoveAction action object
/**
* Go back to home dock with default options, it's compatible with 2.x firmware
*/
actions::MoveAction goHome();
/**
* Requires the robot to move to a set of key points (milestone) specified by the parameters. 
* The robot will try its best to reach each points specified. In case of obstacles occurs, the robot will avoid hitting them by planning a valid  path.
*/
rpos::actions::MoveAction moveTo(
    const std::vector<rpos::core::Location>& locations,
    bool appending
);
Parameter Type Description
locations const std::vector<rpos::core::Location>& Points collection that the robot should reach
appending bool Once set to true, a current working action (if any) won't get aborted and the key points specified by the function will be pending to the task queue.
/**
* Requires the robot to move to a key point (milestone) specified by the parameters. 
* The robot will try its best to reach the point specified. In case of obstacles occurs, the robot will avoid hitting them by planning a valid path.
*/
rpos::actions::MoveAction moveTo(
    const rpos::core::Location& location,
    bool appending
);
Parameter Type Description
location const std::vector<rpos::core::Location>& Point that the robot should reach
appending bool Once set to true, a current working action (if any) won't get aborted and the key points specified by the function will be pending to the task queue.
/**
* Requires the robot to move to a set of key points (milestone) specified by the parameters and turn to a specified heading. 
* The robot will try its best to reach each points specified. In case of obstacles occurs, the robot will avoid hitting them by planning a valid  path.
*/
rpos::actions::MoveAction moveTo(
    const std::vector<rpos::core::Location>& locations,
    const motion_planner::MoveOptions& options
);
Parameter Type Description
locations const std::vector<rpos::core::Location>& Points collection that the robot should reach
options const motion_planner::MoveOptions& Motion Options
/**
* Requires the robot to move to a key point (milestone) specified by the parameters and turn to a specified heading in the end of the action. 
* The robot will try its best to reach the point specified. In case of obstacles occurs, the robot will avoid hitting them by planning a valid path.
*/
rpos::actions::MoveAction moveTo(
    const rpos::core::Location& location,
    const motion_planner::MoveOptions& options
);
Parameter Type Description
location const std::vector<rpos::core::Location>& Point that the robot should reach
options const motion_planner::MoveOptions& Motion Options
/**
* Make the robot move along with the specified direction. No obstle avoidance or path planning will be performed.
*/
rpos::actions::MoveAction moveBy(const rpos::core::Direction& direction);

For details, please refer to rpos::core::Direction.

/**
* Make the robot move along with the specified direction. 
*/
rpos::actions::MoveAction moveBy(
    const rpos::core::Direction& direction,
    const motion_planner::MoveOptions& options
);

For details, please refer to rpos::core::Direction and motion_planner::MoveOptions.

/**
* Make the robot move with a turning angle.
*/
rpos::actions::MoveAction moveBy(
    float theta,
    const motion_planner::MoveOptions& options
);

For details, please refer to motion_planner::MoveOptions.

/**
* Make the robot turn to the specified heading.
*/
rpos::actions::MoveAction rotateTo(const rpos::core::Rotation& orientation);

For details, please refer to rpos::core::Rotation.

/**
* Make the robot turn to the specified heading.
*/
rpos::actions::MoveAction rotateTo(
    const rpos::core::Rotation& orientation,
    const motion_planner::MoveOptions& options
);

For details, please refer to rpos::core::Rotation and motion_planner::MoveOptions.

/**
* Make the robot turn by the specified angle.
*/
rpos::actions::MoveAction rotate(const rpos::core::Rotation& rotation);

For details, please refer to rpos::actions::MoveAction and rpos::core::Rotation.

/**
* Make the robot turn by the specified angle.
*/ 
rpos::actions::MoveAction rotate(
    const rpos::core::Rotation& rotation,
    const motion_planner::MoveOptions& options
);

For details, please refer to rpos::core::Rotation and motion_planner::MoveOptions.

/**
* Require the robot to perform self relocalization to recover it post on the map. The robot will move.
*/
rpos::actions::MoveAction recoverLocalization(
    const core::RectangleF& area,
    const motion_planner::RecoverLocalizationOptions& options
);

For details, please refer to rpos::actions::MoveAction, core::RectangleF and motion_planner::RecoverLocalizationOptions.

/**
* Require bypass the navigation system and direct control the robot motion. The detailed walking speed and turning speed can be set via the returned ```VelocityControlMoveAction``` action.
*/
rpos::actions::VelocityControlMoveAction velocityControl();

For details, please refer to rpos::actions::VelocityControlMoveAction.

/**
* Retrieve the current action of the robot. If the Action::isEmpty() of the returned object is false, there is no action working at all.
*/
rpos::actions::MoveAction getCurrentAction();

For details, please refer to rpos::actions::MoveAction.

/**
* Require the SLAMWARE system to find a path to the destination specified by the parameter. The path found will be returned.
*/ 
rpos::features::motion_planner::Path searchPath(const rpos::core::Location&);

For details, please refer to rpos::features::motion_planner::Path and rpos::core::Location.

/**
* get all supported motion strategies.
* motion strategy contains a series of configuration items that affect machine behavior.
*/
std::vector<std::string> enumSupportedMotionStrategies();   
/**
* set a motion strategy to robot
*/
bool setMotionStrategy(const std::string& strategy);   
/**
* get current motion strategy
*/
std::string getCurrentMotionStrategy();