Class Graph::Waypoint
Defined in File Graph.hpp
Nested Relationships
This class is a nested type of Class Graph.
Class Documentation
-
class Waypoint
Public Functions
-
const std::string &get_map_name() const
Get the name of the map that this Waypoint exists on.
-
const Eigen::Vector2d &get_location() const
Get 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.
-
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.
-
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.
-
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 &get_map_name() const