Go to the documentation of this file. 1 #ifndef AIKIDO_CONTROL_QUEUEDTRAJECTORYEXECUTOR_HPP_
2 #define AIKIDO_CONTROL_QUEUEDTRAJECTORYEXECUTOR_HPP_
6 #include <dart/dart.hpp>
21 std::shared_ptr<TrajectoryExecutor> executor);
40 void step(
const std::chrono::system_clock::time_point& timepoint)
override;
70 #endif // AIKIDO_CONTROL_QUEUEDTRAJECTORYEXECUTOR_HPP_
std::future< void > execute(const trajectory::ConstTrajectoryPtr &traj) override
Execute trajectory and set future upon completion.
void step(const std::chrono::system_clock::time_point &timepoint) override
Step to a point in time.
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
Wraps a TrajectoryExecutor to enable queuing trajectories for execution.
Definition: QueuedTrajectoryExecutor.hpp:14
std::shared_ptr< TrajectoryExecutor > mExecutor
Underlying TrajectoryExecutor.
Definition: QueuedTrajectoryExecutor.hpp:49
void validate(const trajectory::Trajectory *traj) override
Validate the traj in preparation for execution.
std::shared_ptr< const Trajectory > ConstTrajectoryPtr
Definition: Trajectory.hpp:13
std::future< void > mFuture
Future from wrapped executor.
Definition: QueuedTrajectoryExecutor.hpp:55
std::queue< trajectory::ConstTrajectoryPtr > mTrajectoryQueue
Queue of trajectories.
Definition: QueuedTrajectoryExecutor.hpp:58
QueuedTrajectoryExecutor(std::shared_ptr< TrajectoryExecutor > executor)
Constructor.
Abstract class for executing trajectories.
Definition: TrajectoryExecutor.hpp:17
bool mInProgress
Whether a trajectory is currently being executed.
Definition: QueuedTrajectoryExecutor.hpp:52
virtual ~QueuedTrajectoryExecutor()
std::queue< std::shared_ptr< std::promise< void > > > mPromiseQueue
Queue of promises made by this to the client.
Definition: QueuedTrajectoryExecutor.hpp:61
std::mutex mMutex
Manages access to mInProgress, mFuture, mTrajectoryQueue, mPromiseQueue.
Definition: QueuedTrajectoryExecutor.hpp:64
void cancel() override
Cancel the current trajectory, as well as all trajectories currently in the queue.
Time-parameterized path in a StateSpace.
Definition: Trajectory.hpp:20