DART  6.10.1
dart::simulation::Recording Class Reference

class Recording More...

#include <Recording.hpp>

Public Member Functions

 Recording (const std::vector< dynamics::SkeletonPtr > &_skeletons)
 Create Recording with a list of skeletons. More...
 
 Recording (const std::vector< int > &_skelDofs)
 Create Recording with a list of number of dofs. More...
 
virtual ~Recording ()
 Destructor. More...
 
int getNumFrames () const
 Get number of frames. More...
 
int getNumSkeletons () const
 Get number of skeletons. More...
 
int getNumDofs (int _skelIdx) const
 Get number of generalized coordinates of skeleton whoes index is _skelIdx. More...
 
int getNumContacts (int _frameIdx) const
 Get number of contacts at frame number _frameIdx. More...
 
Eigen::VectorXd getConfig (int _frameIdx, int _skelIdx) const
 Get skeleton configurations whose index is _skelIdx at frame number _frameIdx. More...
 
double getGenCoord (int _frameIdx, int _skelIdx, int _dofIdx) const
 Get _dofIdx-th single configruation of a skeleton whose index is _skelIdx at frame number _frameIdx. More...
 
Eigen::Vector3d getContactPoint (int _frameIdx, int _contactIdx) const
 Get contact point whose index is _contactIdx at frame number _frameIdx. More...
 
Eigen::Vector3d getContactForce (int _frameIdx, int _contactIdx) const
 Get contact force whose index is _contactIdx at frame number _frameIdx. More...
 
void clear ()
 Clear the saved histories. More...
 
void addState (const Eigen::VectorXd &_state)
 Add state. More...
 
void updateNumGenCoords (const std::vector< dynamics::SkeletonPtr > &_skeletons)
 Update list for number of generalized coordinates. More...
 

Private Attributes

std::vector< Eigen::VectorXd > mBakedStates
 Baked states. More...
 
std::vector< int > mNumGenCoordsForSkeletons
 Number of generalized coordinates for skeletons. More...
 

Detailed Description

class Recording

Constructor & Destructor Documentation

◆ Recording() [1/2]

dart::simulation::Recording::Recording ( const std::vector< dynamics::SkeletonPtr > &  _skeletons)
explicit

Create Recording with a list of skeletons.

◆ Recording() [2/2]

dart::simulation::Recording::Recording ( const std::vector< int > &  _skelDofs)
explicit

Create Recording with a list of number of dofs.

◆ ~Recording()

dart::simulation::Recording::~Recording ( )
virtual

Destructor.

Member Function Documentation

◆ addState()

void dart::simulation::Recording::addState ( const Eigen::VectorXd &  _state)

Add state.

◆ clear()

void dart::simulation::Recording::clear ( )

Clear the saved histories.

◆ getConfig()

Eigen::VectorXd dart::simulation::Recording::getConfig ( int  _frameIdx,
int  _skelIdx 
) const

Get skeleton configurations whose index is _skelIdx at frame number _frameIdx.

◆ getContactForce()

Eigen::Vector3d dart::simulation::Recording::getContactForce ( int  _frameIdx,
int  _contactIdx 
) const

Get contact force whose index is _contactIdx at frame number _frameIdx.

◆ getContactPoint()

Eigen::Vector3d dart::simulation::Recording::getContactPoint ( int  _frameIdx,
int  _contactIdx 
) const

Get contact point whose index is _contactIdx at frame number _frameIdx.

◆ getGenCoord()

double dart::simulation::Recording::getGenCoord ( int  _frameIdx,
int  _skelIdx,
int  _dofIdx 
) const

Get _dofIdx-th single configruation of a skeleton whose index is _skelIdx at frame number _frameIdx.

◆ getNumContacts()

int dart::simulation::Recording::getNumContacts ( int  _frameIdx) const

Get number of contacts at frame number _frameIdx.

◆ getNumDofs()

int dart::simulation::Recording::getNumDofs ( int  _skelIdx) const

Get number of generalized coordinates of skeleton whoes index is _skelIdx.

◆ getNumFrames()

int dart::simulation::Recording::getNumFrames ( ) const

Get number of frames.

◆ getNumSkeletons()

int dart::simulation::Recording::getNumSkeletons ( ) const

Get number of skeletons.

◆ updateNumGenCoords()

void dart::simulation::Recording::updateNumGenCoords ( const std::vector< dynamics::SkeletonPtr > &  _skeletons)

Update list for number of generalized coordinates.

Member Data Documentation

◆ mBakedStates

std::vector<Eigen::VectorXd> dart::simulation::Recording::mBakedStates
private

Baked states.

◆ mNumGenCoordsForSkeletons

std::vector<int> dart::simulation::Recording::mNumGenCoordsForSkeletons
private

Number of generalized coordinates for skeletons.