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
rpos::actions::MoveAction moveTo(
const std::vector<rpos::core::Location>& locations,
bool appending,
bool isMilestone
)
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.
| 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 locations 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. |
rpos::actions::MoveAction moveTo(
const rpos::core::Location& location,
bool appending,
bool isMilestone
)
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.
| Parameter | Type | Description |
|---|---|---|
| location | 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 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. |
rpos::actions::MoveAction moveTo(
const std::vector<rpos::core::Location>& locations,
const motion_planner::MoveOptions& options,
float yaw
)
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.
| 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. |
rpos::actions::MoveAction moveTo(
const rpos::core::Location& location,
const motion_planner::MoveOptions& options,
float yaw
)
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.
| Parameter | Type | Description |
|---|---|---|
| location | const 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. |
rpos::actions::MoveAction moveBy(const rpos::core::Direction& direction)
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,
const motion_planner::MoveOptions& options
)
Make the robot move along with the specified direction.
rpos::actions::MoveAction moveBy(
float theta,
const motion_planner::MoveOptions& options
)
Make the robot move with a turning angle theta.
rpos::actions::MoveAction rotateTo(const rpos::core::Rotation& orientation)
Make the robot turn to the specified heading.
rpos::actions::MoveAction rotateTo(
const rpos::core::Rotation& orientation,
const motion_planner::MoveOptions& options
)
Make the robot turn to the specified heading.
rpos::actions::MoveAction rotate(const rpos::core::Rotation& rotation)
Make the robot turn by the specified angle.
rpos::actions::MoveAction rotate(
const rpos::core::Rotation& rotation,
const motion_planner::MoveOptions& options
)
Make the robot turn by the specified angle.
rpos::actions::MoveAction recoverLocalization(
const core::RectangleF& area,
const motion_planner::RecoverLocalizationOptions& options
)
Require the robot to perform self relocalization to recover it post on the map. The robot will move.
rpos::actions::VelocityControlMoveAction velocityControl()
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::MoveAction getCurrentAction()
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::features::motion_planner::Path searchPath(const rpos::core::Location&)
Require the SLAMWARE system to find a path to the destination specified by the parameter. The path found will be returned.