Aikido
|
Executes trajectories in DART. More...
#include <aikido/control/KinematicSimulationTrajectoryExecutor.hpp>
Public Member Functions | |
KinematicSimulationTrajectoryExecutor (::dart::dynamics::SkeletonPtr skeleton) | |
Constructor. More... | |
virtual | ~KinematicSimulationTrajectoryExecutor () |
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 traj 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 |
Cancels the current trajectory. More... | |
![]() | |
virtual | ~TrajectoryExecutor ()=default |
Private Attributes | |
::dart::dynamics::SkeletonPtr | mSkeleton |
Skeleton to execute trajectories on. More... | |
trajectory::ConstTrajectoryPtr | mTraj |
Trajectory being executed. More... | |
statespace::dart::ConstMetaSkeletonStateSpacePtr | mStateSpace |
Trajectory's MetaSkeletonStateSpace. More... | |
::dart::dynamics::MetaSkeletonPtr | mMetaSkeleton |
The controlled subset of mSkeleton for the currently executing trajectory. More... | |
bool | mInProgress |
Whether a trajectory is being executed. More... | |
std::unique_ptr< std::promise< void > > | mPromise |
Promise whose future is returned by execute() More... | |
std::mutex | mMutex |
Manages access to mTraj, mInProgress, mPromise. More... | |
Additional Inherited Members | |
![]() | |
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... | |
Executes trajectories in DART.
This simulates trajectories by setting interpolated DOF positions, without running dynamic simulation.
|
explicit |
Constructor.
skeleton | Skeleton to execute trajectories on. All trajectories must have dofs only in this skeleton. |
|
virtual |
|
overridevirtual |
Cancels the current trajectory.
Implements aikido::control::TrajectoryExecutor.
|
overridevirtual |
Execute traj and set future upon completion.
traj | Trajectory to be executed. Its StateSpace should be a MetaSkeletonStateSpace, where the dofs are all in the skeleton passed to this constructor. |
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 |
If multiple threads are accessing this function or the skeleton associated with this executor, it is necessary to lock the skeleton before calling this method.
Implements aikido::control::TrajectoryExecutor.
|
overridevirtual |
Validate the traj in preparation for execution.
traj | Trajectory to be validated |
Implements aikido::control::TrajectoryExecutor.
|
private |
Whether a trajectory is being executed.
|
private |
The controlled subset of mSkeleton for the currently executing trajectory.
|
mutableprivate |
Manages access to mTraj, mInProgress, mPromise.
|
private |
Promise whose future is returned by execute()
|
private |
Skeleton to execute trajectories on.
|
private |
Trajectory's MetaSkeletonStateSpace.
|
private |
Trajectory being executed.