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

/**
* 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,
    bool isMilestone
);
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.
isMilestone bool deprecated Once set to true, the points inside the const std::vector<rpos::core::Location>& are considered as key points. The robot will always try to plan a vaild path to reach the points.
Once set to false, the robot won't replan path once obstacle occurs.
/**
* 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,
    bool isMilestone
);
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.
isMilestone bool deprecated Once set to true, the point of the const std::vector<rpos::core::Location>& is considered as a key point. The robot will always try to plan a vaild path to reach the point.
Once set to false, the robot won't replan path once obstacle occurs.
/**
* 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,
    float yaw
);
Parameter Type Description
locations const std::vector<rpos::core::Location>& Points collection that the robot should reach
options const motion_planner::MoveOptions& Motion Options
yaw float The heading the robot should finally turn to once all the key points have been reached.
/**
* 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,
    float yaw
);
Parameter Type Description
location const std::vector<rpos::core::Location>& Point that the robot should reach
options const motion_planner::MoveOptions& Motion Options
yaw float The heading the robot should finally turn to once all the key points have been reached.
/**
* 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.