Aikido
|
Executes joint command in DART. More...
#include <aikido/control/KinematicSimulationJointCommandExecutor.hpp>
Public Member Functions | |
KinematicSimulationJointCommandExecutor (::dart::dynamics::MetaSkeletonPtr metaskeleton) | |
Constructor. More... | |
KinematicSimulationJointCommandExecutor (std::vector<::dart::dynamics::DegreeOfFreedom * > dofs) | |
DoF-only Constructor. More... | |
virtual | ~KinematicSimulationJointCommandExecutor () |
virtual std::future< int > | execute (const std::vector< double > &command, const std::chrono::duration< double > &timeout, const std::chrono::system_clock::time_point &timepoint) override |
Execute a Joint Command, setting future upon completion. More... | |
virtual std::future< int > | execute (const std::vector< double > &command, const std::chrono::duration< double > &timeout=std::chrono::duration< double >(1.0)) override |
Execute a Joint Command, setting 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 command. More... | |
![]() | |
JointCommandExecutor (const std::vector< dart::dynamics::DegreeOfFreedom * > dofs, const std::set< ExecutorType > otherTypes=std::set< ExecutorType >(), const std::chrono::milliseconds threadRate=defaultThreadRate) | |
Constructor. More... | |
virtual | ~JointCommandExecutor () |
![]() | |
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::vector< double > | mCommand |
Command being executed. More... | |
::dart::dynamics::MetaSkeletonPtr | mMetaSkeleton |
The controlled subset of mSkeleton for the currently executing command. More... | |
bool | mInProgress |
Whether a command is being executed. More... | |
std::unique_ptr< std::promise< int > > | mPromise |
Promise whose future is returned by execute() More... | |
std::mutex | mMutex |
Manages access to mCommand, mInProgress, mPromise. More... | |
std::chrono::system_clock::time_point | mExecutionStartTime |
Time of position command start (for interpolation) More... | |
std::vector< double > | mStartPosition |
Position at start of command (for interpolation) More... | |
std::chrono::duration< double > | mTimeout |
Velocity timeout. More... | |
Additional Inherited Members | |
![]() | |
std::set< ExecutorType > | mTypes |
Vector of executor types. More... | |
std::vector< dart::dynamics::DegreeOfFreedom * > | mDofs |
Vector of dof names. More... | |
Executes joint command in DART.
This simulates by setting interpolated DOF positions, without running dynamic simulation.
|
explicit |
Constructor.
metaskeleton | MetaSkeleton to execute commands on. |
|
explicit |
DoF-only Constructor.
dofs | DoFs to execute commands on. |
|
virtual |
|
overridevirtual |
Cancels the current command.
Implements aikido::control::JointCommandExecutor< T >.
|
overridevirtual |
Execute a Joint Command, setting future upon completion.
command | Vector of joint commands, parallel with joints vector |
timeout | How long until command expires |
timepoint | If supplied, time to simulate to |
Implements aikido::control::JointCommandExecutor< T >.
|
inlineoverridevirtual |
Execute a Joint Command, setting future upon completion.
If applicable, simulate to the current time.
command | Vector of joint commands, parallel with joints vector |
timeout | How long until command expires |
Reimplemented from aikido::control::JointCommandExecutor< T >.
|
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::JointCommandExecutor< T >.
|
private |
Command being executed.
|
private |
Time of position command start (for interpolation)
|
private |
Whether a command is being executed.
|
private |
The controlled subset of mSkeleton for the currently executing command.
|
mutableprivate |
Manages access to mCommand, mInProgress, mPromise.
|
private |
Promise whose future is returned by execute()
|
private |
Position at start of command (for interpolation)
|
private |
Velocity timeout.