Class RobotUpdateHandle::ActionExecution
Defined in File RobotUpdateHandle.hpp
Nested Relationships
This class is a nested type of Class RobotUpdateHandle.
Class Documentation
-
class ActionExecution
The ActionExecution class should be used to manage the execution of and provide updates on ongoing actions.
Public Functions
-
void update_remaining_time(rmf_traffic::Duration remaining_time_estimate)
Update the amount of time remaining for this action. This does not need to be used for navigation requests.
-
void underway(std::optional<std::string> text)
Set task status to underway and optionally log a message (info tier)
-
void error(std::optional<std::string> text)
Set task status to error and optionally log a message (error tier)
-
void delayed(std::optional<std::string> text)
Set the task status to delayed and optionally log a message (warning tier)
-
void blocked(std::optional<std::string> text)
Set the task status to blocked and optionally log a message (warning tier)
-
Stubbornness override_schedule(std::string map, std::vector<Eigen::Vector3d> path, rmf_traffic::Duration hold = rmf_traffic::Duration(0))
Use this to override the traffic schedule for the agent while it performs this command.
If the given trajectory results in a traffic conflict then a negotiation will be triggered. Hold onto the
Stubbornness
returned by this function to ask other agents to plan around your trajectory, otherwise the negotiation may result in a replan for this agent and a new command will be issued.Note
Using this will function always trigger a replan once the agent finishes the command.
Warning
Too many overridden/stubborn agents can cause a deadlock. It’s recommended to use this API sparingly and only over short distances or small deviations.
- Parameters:
map – [in] Name of the map where the trajectory will take place
path – [in] The path of the agent
hold – [in] How long the agent will wait at the end of the path
- Returns:
a Stubbornness handle that tells the fleet adapter to not let the overridden path be negotiated. The returned handle will stop having an effect after this command execution is finished.
-
void finished()
Trigger this when the action is successfully finished. No other functions in this ActionExecution instance will be usable after this.
-
bool okay() const
Returns false if the Action has been killed or cancelled.
-
ConstActivityIdentifierPtr identifier() const
Activity identifier for this action. Used by the EasyFullControl API.
-
void update_remaining_time(rmf_traffic::Duration remaining_time_estimate)