Class Plan

Nested Relationships

Nested Types

Class Documentation

class Plan

Public Types

using Start = Planner::Start
using StartSet = Planner::StartSet
using Goal = Planner::Goal
using Options = Planner::Options
using Configuration = Planner::Configuration
using Result = Planner::Result
using Checkpoints = std::vector<Checkpoint>

Public Functions

const std::vector<Route> &get_itinerary() const

If this Plan is valid, this will return the trajectory of the successful plan. If the Start satisfies the Goal, then the itinerary will be empty.

const std::vector<Waypoint> &get_waypoints() const

If this plan is valid, this will return the waypoints of the successful plan.

const Start &get_start() const

Get the start condition that was used for this plan.

double get_cost() const

Get the final cost of this plan.

struct Checkpoint

Public Members

RouteId route_id
CheckpointId checkpoint_id
struct Progress

Public Members

std::size_t graph_index
Checkpoints checkpoints
rmf_traffic::Time time
class Waypoint

A Waypoint within a Plan.

This class helps to discretize a Plan based on the Waypoints belonging to the agv::Graph. Each Graph::Waypoint that the Plan stops or turns at will be accounted for by a Plan::Waypoint.

To indicate the intended orientation, each of these Waypoints provides an Eigen::Vector3d where the third element is the orientation.

The time that the position is meant to be arrived at is also given by the Waypoint.

Note

Users are not allowed to make their own Waypoint instances, because it is too easy to accidentally get inconsistencies in the position and graph_index fields. Plan::Waypoints can only be created by Plan instances and can only be retrieved using Plan::get_waypoints().

Public Functions

const Eigen::Vector3d &position() const

Get the position for this Waypoint.

rmf_traffic::Time time() const

Get the time for this Waypoint.

std::optional<std::size_t> graph_index() const

Get the graph index of this Waypoint.

const std::vector<std::size_t> &approach_lanes() const

Get the graph indices of the lanes that will be traversed on the way to this Waypoint. This will have multiple values if the robot is able to move straight through multiple lanes without stopping to reach this Waypoint. It will be empty if the robot does not need to traverse any lanes to reach this Waypoint (e.g. it is simply turning in place).

const std::vector<Progress> &progress_checkpoints() const

Points on the graph that will be passed along the way to this waypoint.

const Checkpoints &arrival_checkpoints() const

Points in the itinerary that have been reached when the robot arrives at this waypoint.

std::size_t itinerary_index() const
std::size_t trajectory_index() const
const Graph::Lane::Event *event() const

An event that should occur when this waypoint is reached.

const Dependencies &dependencies() const

The dependencies on other traffic participants that must be satisfied before leaving this waypoint.