| 
    Aikido
    
   | 
 
Wraps a TrajectoryExecutor to enable queuing trajectories for execution. More...
#include <aikido/control/QueuedTrajectoryExecutor.hpp>
  
Public Member Functions | |
| QueuedTrajectoryExecutor (std::shared_ptr< TrajectoryExecutor > executor) | |
| Constructor.  More... | |
| virtual | ~QueuedTrajectoryExecutor () | 
| void | validate (const trajectory::Trajectory *traj) override | 
| Validate the traj in preparation for execution.  More... | |
| std::future< void > | execute (const trajectory::ConstTrajectoryPtr &traj) override | 
| Execute trajectory and set future upon completion.  More... | |
| void | step (const std::chrono::system_clock::time_point &timepoint) override | 
| Step to a point in time.  More... | |
| void | cancel () override | 
| Cancel the current trajectory, as well as all trajectories currently in the queue.  More... | |
  Public Member Functions inherited from aikido::control::TrajectoryExecutor | |
| TrajectoryExecutor (const std::vector< dart::dynamics::DegreeOfFreedom * > &dofs, const std::set< ExecutorType > otherTypes=std::set< ExecutorType >(), const std::chrono::milliseconds threadRate=defaultThreadRate) | |
| Constructor Documentation Inherited.  More... | |
| virtual | ~TrajectoryExecutor ()=default | 
  Public Member Functions inherited from aikido::control::Executor | |
| Executor (const std::set< ExecutorType > &types, const std::vector< dart::dynamics::DegreeOfFreedom * > &dofs, const std::chrono::milliseconds threadRate=defaultThreadRate) | |
| Constructor.  More... | |
| Executor (const ExecutorType type, const std::vector< dart::dynamics::DegreeOfFreedom * > &dofs, std::chrono::milliseconds threadRate=defaultThreadRate) | |
| Constructor.  More... | |
| virtual | ~Executor () | 
| std::set< ExecutorType > | getTypes () const | 
| Get all of this Executor's ExecutorTypes.  More... | |
| const std::vector< dart::dynamics::DegreeOfFreedom * > | getDofs () const | 
| Get list of dofs needed by this Executor.  More... | |
| void | start () | 
| Start the underlying ExecutorThread.  More... | |
| void | stop () | 
| Stops the underlying ExecutorThread.  More... | |
| bool | registerDofs () | 
| Lock the resources required by the DoFs.  More... | |
| void | releaseDofs () | 
| Unlock any resources required by the DoFs.  More... | |
Private Attributes | |
| std::shared_ptr< TrajectoryExecutor > | mExecutor | 
| Underlying TrajectoryExecutor.  More... | |
| bool | mInProgress | 
| Whether a trajectory is currently being executed.  More... | |
| std::future< void > | mFuture | 
| Future from wrapped executor.  More... | |
| std::queue< trajectory::ConstTrajectoryPtr > | mTrajectoryQueue | 
| Queue of trajectories.  More... | |
| std::queue< std::shared_ptr< std::promise< void > > > | mPromiseQueue | 
| Queue of promises made by this to the client.  More... | |
| std::mutex | mMutex | 
| Manages access to mInProgress, mFuture, mTrajectoryQueue, mPromiseQueue.  More... | |
Additional Inherited Members | |
  Protected Attributes inherited from aikido::control::TrajectoryExecutor | |
| std::set< const trajectory::Trajectory * > | mValidatedTrajectories | 
| Set of trajectories validated by executor.  More... | |
| std::chrono::system_clock::time_point | mExecutionStartTime | 
| Time of previous call.  More... | |
  Protected Attributes inherited from aikido::control::Executor | |
| std::set< ExecutorType > | mTypes | 
| Vector of executor types.  More... | |
| std::vector< dart::dynamics::DegreeOfFreedom * > | mDofs | 
| Vector of dof names.  More... | |
Wraps a TrajectoryExecutor to enable queuing trajectories for execution.
      
  | 
  explicit | 
Constructor.
| executor | Underlying TrajectoryExecutor | 
      
  | 
  virtual | 
      
  | 
  overridevirtual | 
Cancel the current trajectory, as well as all trajectories currently in the queue.
Does NOT stop the trajectory that is currently executing if the underlying executor does not support it.
Implements aikido::control::TrajectoryExecutor.
      
  | 
  overridevirtual | 
Execute trajectory and set future upon completion.
If another trajectory is already running, queue the trajectory for later execution. If executing a trajectory terminates in an error, all queued trajectories are canceled.
| traj | Trajectory to be executed or queued. | 
| invalid_argument | if traj is invalid. | 
Implements aikido::control::TrajectoryExecutor.
      
  | 
  overridevirtual | 
Step to a point in time.
timepoint can be a time in the future to enable faster than real-time execution.| timepoint | Time to simulate to | 
Implements aikido::control::TrajectoryExecutor.
      
  | 
  overridevirtual | 
Validate the traj in preparation for execution.
| traj | Trajectory to be validated | 
Implements aikido::control::TrajectoryExecutor.
      
  | 
  private | 
Underlying TrajectoryExecutor.
      
  | 
  private | 
Future from wrapped executor.
      
  | 
  private | 
Whether a trajectory is currently being executed.
      
  | 
  mutableprivate | 
Manages access to mInProgress, mFuture, mTrajectoryQueue, mPromiseQueue.
      
  | 
  private | 
Queue of promises made by this to the client.
      
  | 
  private | 
Queue of trajectories.