Class Route

Class Documentation

class rmf_traffic::Route

A route on the schedule. This is used as a component of a schedule participant’s itinerary.

Public Functions

Route(std::string map, Trajectory trajectory)

Constructor

Parameters
  • [in] map: The map that the trajectory is on

  • [in] trajectory: The scheduled trajectory

Route &map(std::string value)

Set the map for this route.

const std::string &map() const

Get the map for this route.

Route &trajectory(Trajectory value)

Set the trajectory for this route.

Trajectory &trajectory()

Get the trajectory for this route.

const Trajectory &trajectory() const

Get the trajectory for this immutable route.

Route &checkpoints(std::set<uint64_t> value)

Set the checkpoints for this route. A checkpoint is a waypoint within this route which will explicitly trigger an traffic event update when it is reached.

std::set<uint64_t> &checkpoints()

Get the checkpoints for this route.

const std::set<uint64_t> &checkpoints() const

Get the checkpoints for this immutable route.

Route &dependencies(DependsOnParticipant value)

Set the dependencies of the route.

DependsOnParticipant &dependencies()

Get the dependencies of the route.

const DependsOnParticipant &dependencies() const

Get the dependencies of the immutable route.

Route &add_dependency(CheckpointId dependent_checkpoint, Dependency dependency)

Tell this route that it has a dependency on the checkpoint of another participant’s route.

Parameters
  • [in] dependent_checkpoint: The checkpoint inside of this route which has a dependency on the other participant’s route.

  • [in] on_participant: The other participant which this route is depending on.

  • [in] on_plan: The ID of the other participant’s plan that this route is depending on.

  • [in] on_route: The ID of the other participant’s route that this robot is depending on.

  • [in] on_checkpoint: The ID of the checkpoint

bool should_ignore(ParticipantId participant, PlanId plan) const

True if this route should ignore information about the given (participant, plan) pair. If this route has a dependency on a plan from this participant with a higher ID value, then this will return true. Otherwise it returns false.

const DependsOnCheckpoint *check_dependencies(ParticipantId on_participant, PlanId on_plan, RouteId on_route) const

Get any dependencies that this route has on the given route of another participant.

Return

A pointer to the relevant dependencies, if any exist. If there is no dependency relevant to the specified route of the participant, then this will be a nullptr.

Parameters
  • [in] on_participant: The ID of the other participant of interest

  • [in] on_plan: The ID of the other participant’s current plan

  • [in] on_route: The ID of the other participant’s route that is being considered