Class Graph::Waypoint

Nested Relationships

This class is a nested type of Class Graph.

Class Documentation

class Waypoint

Properties assigned to each waypoint (vertex) in the graph.

Public Functions

const std::string &get_map_name() const

Get the name of the map that this Waypoint exists on.

Waypoint &set_map_name(std::string map)

Set the name of the map that this Waypoint exists on.

const Eigen::Vector2d &get_location() const

Get the position of this Waypoint.

Waypoint &set_location(Eigen::Vector2d location)

Set the position of this Waypoint.

bool is_holding_point() const

Returns true if this Waypoint can be used as a holding point for the vehicle, otherwise returns false.

Waypoint &set_holding_point(bool _is_holding_point)

Set whether this waypoint can be used as a holding point for the vehicle.

bool is_passthrough_point() const

Returns true if this Waypoint is a passthrough point, meaning a planner should not have a robot wait at this point, even just briefly to allow another robot to pass. Setting passthrough points reduces the branching factor of a planner, allowing it to run faster, at the cost of losing possible solutions to conflicts.

Waypoint &set_passthrough_point(bool _is_passthrough)

Set this Waypoint to be a passthrough point.

bool is_parking_spot() const

Returns true if this Waypoint is a parking spot. Parking spots are used when an emergency alarm goes off, and the robot is required to park itself.

Waypoint &set_parking_spot(bool _is_parking_spot)

Set this Waypoint to be a parking spot.

bool is_charger() const

Returns true if this Waypoint is a charger spot. Robots are routed to these spots when their batteries charge levels drop below the threshold value.

Waypoint &set_charger(bool _is_charger)

Set this Waypoint to be a parking spot.

LiftPropertiesPtr in_lift() const

If this waypoint is inside the lift then this will return a pointer to the properties of the lift. Otherwise this will be a nullptr.

Waypoint &set_in_lift(LiftPropertiesPtr properties)

Set the properties of the lift that the waypoint is inside of, or provide a nullptr if it is not inside a lift.

std::size_t index() const

The index of this waypoint within the Graph. This cannot be changed after the waypoint is created.

const std::string *name() const

If this waypoint has a name, return a reference to it. If this waypoint does not have a name, return a nullptr.

The name of a waypoint can only be set using add_key() or set_key().

std::string name_or_index(const std::string &name_format = "%s", const std::string &index_format = "#%d") const

If this waypoint has a name, the name will be returned. Otherwise it will return the waypoint index, formatted into a string based on the index_format argument.

Parameters:
  • name_format[in] If this waypoint has an assigned name, the first instance of “%s” within name_format will be replaced with the name of the waypoint. If there is no s in the name_format string, then this function will simply return the name_format string as-is when the waypoint has a name.

  • index_format[in] If this waypoint does not have an assigned name, the first instance of “%d” within the index_format string will be replaced with the stringified decimal index value of the waypoint. If there is no “%d” in the index_format string, then this function will simply return the index_format string as-is when the waypoint does not have a name.

const std::string &in_mutex_group() const

Get the mutex group that this waypoint is associated with. An empty string implies that it is not associated with any mutex group.

Only one robot at a time is allowed to occupy any waypoint or lane associated with a particular mutex group.

Waypoint &set_in_mutex_group(std::string group_name)

Set what mutex group this waypoint is associated with. Passing in an empty string will disasscoiate the waypoint from any mutex group.

std::optional<double> merge_radius() const

Get a merge radius specific to this waypoint, if it has one. The radius indicates that any robot within this distance of the waypoint can merge onto this waypoint.

Waypoint &set_merge_radius(std::optional<double> valeu)

Set the merge radius specific to this waypoint.