Class State¶
Defined in File State.hpp
Inheritance Relationships¶
Base Type¶
public rmf_task::CompositeData(Class CompositeData)
Class Documentation¶
-
class
rmf_task::State: public rmf_task::CompositeData¶ Public Functions
-
RMF_TASK_DEFINE_COMPONENT(std::size_t, CurrentWaypoint)¶ The current waypoint of the robot state.
-
std::optional<std::size_t>
waypoint() const¶
-
RMF_TASK_DEFINE_COMPONENT(double, CurrentOrientation)¶ The current orientation of the robot state.
-
std::optional<double>
orientation() const¶
-
RMF_TASK_DEFINE_COMPONENT(rmf_traffic::Time, CurrentTime)¶ The current time for the robot.
-
std::optional<rmf_traffic::Time>
time() const¶
-
RMF_TASK_DEFINE_COMPONENT(std::size_t, DedicatedChargingPoint)¶ The dedicated charging point for this robot.
-
std::optional<std::size_t>
dedicated_charging_waypoint() const¶
-
RMF_TASK_DEFINE_COMPONENT(double, CurrentBatterySoC)¶ The current battery state of charge of the robot. This value is between 0.0 and 1.0.
-
std::optional<double>
battery_soc() const¶
-
State &
load_basic(const rmf_traffic::agv::Plan::Start &location, std::size_t charging_point, double battery_soc)¶ Load the basic state components expected for the planner.
- Parameters
[in] location: The robot’s initial location data.[in] charging_point: The robot’s dedicated charging point.[in] battery_soc: The robot’s initial battery state of charge.
-
State &
load(const rmf_traffic::agv::Plan::Start &location)¶ Load the plan start into the State. The location info will be split into CurrentWaypoint, CurrentOrientation, and CurrentTime data.
-
std::optional<rmf_traffic::agv::Plan::Start>
project_plan_start(double default_orientation = 0.0, rmf_traffic::Time default_time = rmf_traffic::Time()) const¶ Project an rmf_traffic::agv::Plan::Start from this State.
If CurrentWaypoint is unavailable, this will return a std::nullopt. For any other components that are unavailable (CurrentOrientation or CurrentTime), the given default values will be used.
-