Class Activity::Active
Defined in File Activity.hpp
Nested Relationships
This class is a nested type of Class Activity.
Inheritance Relationships
Derived Types
public rmf_task_sequence::Event::Active
(Class Event::Active)public rmf_task_sequence::Phase::Active
(Class Phase::Active)
Class Documentation
-
class Active
The interface for an active activity. This interface deals with backing up the current state, interrupting the activity, and cancelling or killing it.
Subclassed by rmf_task_sequence::Event::Active, rmf_task_sequence::Phase::Active
Public Types
-
using Backup = detail::Backup
-
using Resume = rmf_task::detail::Resume
The Resume class keeps track of when the phase is allowed to Resume. You can either call the Resume object’s operator() or let the object expire to tell the phase that it may resume.
Public Functions
-
virtual Resume interrupt(std::function<void()> task_is_interrupted) = 0
Tell this phase that it needs to be interrupted. An interruption means the robot may be commanded to do other tasks before this phase resumes.
Interruptions may occur to allow operators to take manual control of the robot, or to engage automatic behaviors in response to emergencies, e.g. fire alarms or code blues.
-
virtual void cancel() = 0
Tell the phase that it has been canceled. The behavior that follows a cancellation will vary between different phases, but generally it means that the robot should no longer try to complete its Task and should instead try to return itself to an unencumbered state as quickly as possible.
The phase may continue to perform some actions after being canceled.
The phase should continue to be tracked as normal. When its finished callback is triggered, the cancellation is complete.
-
virtual void kill() = 0
Kill this phase. The behavior that follows a kill will vary between different phases, but generally it means that the robot should be returned to a safe idle state as soon as possible, even if it remains encumbered by something related to this Task.
The phase should continue to be tracked as normal. When its finished callback is triggered, the killing is complete.
The kill() command supersedes the cancel() command. Calling cancel() after calling kill() will have no effect.
-
virtual ~Active() = default
-
using Backup = detail::Backup