Class Graph::Lane

Nested Relationships

This class is a nested type of Class Graph.

Nested Types

Class Documentation

class Lane

Add a lane to connect two waypoints.

Public Types

using EventPtr = rmf_utils::clone_ptr<Event>

Public Functions

Node &entry()

Get the entry node of this Lane. The lane represents an edge in the graph that goes away from this node.

const Node &entry() const

const-qualified entry()

Node &exit()

Get the exit node of this Lane. The lane represents an edge in the graph that goes into this node.

const Node &exit() const

const-qualified exit()

Properties &properties()

Get the properties of this Lane.

const Properties &properties() const

const-qualified properties()

std::size_t index() const

Get the index of this Lane within the Graph.

class Dock

Public Functions

Dock(std::string dock_name, Duration duration)

Constructor

Parameters:
  • Name[in] of the dock that will be approached

  • How[in] long the robot will take to dock

const std::string &dock_name() const

Get the name of the dock.

Dock &dock_name(std::string name)

Set the name of the dock.

Duration duration() const

Get an estimate for how long the docking will take.

Dock &duration(Duration d)

Set an estimate for how long the docking will take.

class Door

A door in the graph which needs to be opened before a robot can enter a certain lane or closed before the robot can exit the lane.

Subclassed by rmf_traffic::agv::Graph::Lane::DoorClose, rmf_traffic::agv::Graph::Lane::DoorOpen

Public Functions

Door(std::string name, Duration duration)

Constructor

Parameters:
  • name[in] Unique name of the door.

  • duration[in] How long the door takes to open or close.

const std::string &name() const

Get the unique name (ID) of this Door.

Door &name(std::string name)

Set the unique name (ID) of this Door.

Duration duration() const

Get the duration incurred by waiting for this door to open or close.

Door &duration(Duration duration)

Set the duration incurred by waiting for this door to open or close.

class DoorClose : public rmf_traffic::agv::Graph::Lane::Door

Public Functions

Door(std::string name, Duration duration)

Constructor

Parameters:
  • name[in] Unique name of the door.

  • duration[in] How long the door takes to open or close.

class DoorOpen : public rmf_traffic::agv::Graph::Lane::Door

Public Functions

Door(std::string name, Duration duration)

Constructor

Parameters:
  • name[in] Unique name of the door.

  • duration[in] How long the door takes to open or close.

class Event

An abstraction for the different kinds of Lane events.

Public Functions

virtual Duration duration() const = 0

An estimate of how long the event will take.

template<typename DerivedExecutor>
inline DerivedExecutor &execute(DerivedExecutor &executor) const
virtual Executor &execute(Executor &executor) const = 0

Execute this event.

virtual EventPtr clone() const = 0

Clone this event.

virtual ~Event() = default

Public Static Functions

static EventPtr make(DoorOpen open)
static EventPtr make(DoorClose close)
static EventPtr make(LiftSessionBegin open)
static EventPtr make(LiftSessionEnd close)
static EventPtr make(LiftMove move)
static EventPtr make(LiftDoorOpen open)
static EventPtr make(Dock dock)
static EventPtr make(Wait wait)
class Executor

A customizable Executor that can carry out actions based on which Event type is present.

Public Types

using DoorOpen = Lane::DoorOpen
using DoorClose = Lane::DoorClose
using LiftSessionBegin = Lane::LiftSessionBegin
using LiftDoorOpen = Lane::LiftDoorOpen
using LiftSessionEnd = Lane::LiftSessionEnd
using LiftMove = Lane::LiftMove
using Dock = Lane::Dock
using Wait = Lane::Wait

Public Functions

virtual void execute(const DoorOpen &open) = 0
virtual void execute(const DoorClose &close) = 0
virtual void execute(const LiftSessionBegin &begin) = 0
virtual void execute(const LiftDoorOpen &open) = 0
virtual void execute(const LiftSessionEnd &end) = 0
virtual void execute(const LiftMove &move) = 0
virtual void execute(const Dock &dock) = 0
virtual void execute(const Wait &wait) = 0
virtual ~Executor() = default
class LiftDoorOpen : public rmf_traffic::agv::Graph::Lane::LiftSession

Public Functions

LiftSession(std::string lift_name, std::string floor_name, Duration duration)

Constructor

Parameters:
  • lift_name[in] Name of the lift that this door belongs to.

  • floor_name[in] Name of the floor that this door belongs to.

  • duration[in] How long the door takes to open or close.

class LiftMove : public rmf_traffic::agv::Graph::Lane::LiftSession

Public Functions

LiftSession(std::string lift_name, std::string floor_name, Duration duration)

Constructor

Parameters:
  • lift_name[in] Name of the lift that this door belongs to.

  • floor_name[in] Name of the floor that this door belongs to.

  • duration[in] How long the door takes to open or close.

class LiftSession

A lift door in the graph which needs to be opened before a robot can enter a certain lane or closed before the robot can exit the lane.

Subclassed by rmf_traffic::agv::Graph::Lane::LiftDoorOpen, rmf_traffic::agv::Graph::Lane::LiftMove, rmf_traffic::agv::Graph::Lane::LiftSessionBegin, rmf_traffic::agv::Graph::Lane::LiftSessionEnd

Public Functions

LiftSession(std::string lift_name, std::string floor_name, Duration duration)

Constructor

Parameters:
  • lift_name[in] Name of the lift that this door belongs to.

  • floor_name[in] Name of the floor that this door belongs to.

  • duration[in] How long the door takes to open or close.

const std::string &lift_name() const

Get the name of the lift that the door belongs to.

LiftSession &lift_name(std::string name)

Set the name of the lift that the door belongs to.

const std::string &floor_name() const

Get the name of the floor that this door is on.

LiftSession &floor_name(std::string name)

Set the name of the floor that this door is on.

Duration duration() const

Get an estimate of how long it will take the door to open or close.

LiftSession &duration(Duration duration)

Set an estimate of how long it will take the door to open or close.

class LiftSessionBegin : public rmf_traffic::agv::Graph::Lane::LiftSession

Public Functions

LiftSession(std::string lift_name, std::string floor_name, Duration duration)

Constructor

Parameters:
  • lift_name[in] Name of the lift that this door belongs to.

  • floor_name[in] Name of the floor that this door belongs to.

  • duration[in] How long the door takes to open or close.

class LiftSessionEnd : public rmf_traffic::agv::Graph::Lane::LiftSession

Public Functions

LiftSession(std::string lift_name, std::string floor_name, Duration duration)

Constructor

Parameters:
  • lift_name[in] Name of the lift that this door belongs to.

  • floor_name[in] Name of the floor that this door belongs to.

  • duration[in] How long the door takes to open or close.

class Node

A Lane Node wraps up a Waypoint with constraints. The constraints stipulate the conditions for entering or exiting the lane to reach this waypoint.

Public Functions

Node(std::size_t waypoint_index, rmf_utils::clone_ptr<Event> event = nullptr, rmf_utils::clone_ptr<OrientationConstraint> orientation = nullptr)

Constructor

Parameters:
  • waypoint_index – The index of the waypoint for this Node

  • event – An event that must happen before/after this Node is approached (before if it’s an entry Node or after if it’s an exit Node).

  • orientation – Any orientation constraints for moving to/from this Node (depending on whether it’s an entry Node or an exit Node).

Node(std::size_t waypoint_index, rmf_utils::clone_ptr<OrientationConstraint> orientation)

Constructor. The event parameter will be nullptr.

Parameters:
  • waypoint_index – The index of the waypoint for this Node

  • orientation – Any orientation constraints for moving to/from this Node (depending on whether it’s an entry Node or an exit Node).

std::size_t waypoint_index() const

Get the index of the waypoint that this Node is wrapped around.

const Event *event() const

Get a reference to an event that must occur before or after this Node is visited.

Note

Before if this is an entry node or after if this is an exit node

Node &event(rmf_utils::clone_ptr<Event> new_event)

Set the event that must occur before or after this Node is visited.

const OrientationConstraint *orientation_constraint() const

Get the constraint on orientation that is tied to this Node.

class Properties

The Lane Properties class contains properties that apply across the full extent of the lane.

Public Functions

Properties()

Construct a default set of properties

  • speed_limit: nullopt

std::optional<double> speed_limit() const

Get the speed limit along this lane. If a std::nullopt is returned, then there is no specified speed limit for the lane.

Properties &speed_limit(std::optional<double> value)

Set the speed limit along this lane. Providing a std::nullopt indicates that there is no speed limit for the lane.

class Wait

Public Functions

Wait(Duration value)

Constructor

Parameters:

duration[in] How long the wait will be.

Duration duration() const

Get how long the wait will be.

Wait &duration(Duration value)

Set how long the wait will be.