Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

MoCapEvent Class Reference

Provides notification of new external localization data. More...

#include <MoCapEvent.h>

Inheritance diagram for MoCapEvent:

Detailed Description

Provides notification of new external localization data.

Could be feedback from simulation, GPS, or a full motion-capture system. May not include data for all reference frames, or may only provide one of position or orientation... You can probably assume at least BaseFrame will be included e.g. getPosition(BaseFrame)/getOrientation(BaseFrame), otherwise you can also access positions or orientations directly for lookup/iteration.

Mirage allows some control over what frames are reported, see MoCapPos and MoCapOri in EnvConfig.h (assigned via command line or a .mirage world configuration file). By default only the base frame is reported for both position and orientation.

Definition at line 18 of file MoCapEvent.h.

List of all members.

Public Types

typedef std::map< unsigned int,
fmat::Column
< 3 > >::const_iterator 
position_iterator
typedef std::map< unsigned int,
fmat::Quaternion >
::const_iterator 
orientation_iterator

Public Member Functions

 MoCapEvent (const std::string &srcName, size_t sid=0)
 Constructor.
virtual EventBaseclone () const
 Clone implementation.
const fmat::Column< 3 > & getPosition (unsigned int frameIdx) const
 Attempts to look up a position reading for the specified reference frame, throws std::out_of_range if not found.
const fmat::QuaterniongetOrientation (unsigned int frameIdx) const
 Attempts to look up an orientation reading for the specified reference frame, throws std::out_of_range if not found.
const fmat::Transform getPose (unsigned int frameIdx) const
 Constructs a transformation matrix for the specified reference frame, throws std::out_of_range if not found for either position or orientation.

Public Attributes

std::map< unsigned int,
fmat::Column< 3 > > 
positions
 position data (may not cover all reference frames!)
std::map< unsigned int,
fmat::Quaternion
orientations
 orientation data (may not cover all reference frames!)

Member Typedef Documentation

typedef std::map<unsigned int, fmat::Quaternion >::const_iterator MoCapEvent::orientation_iterator

Definition at line 21 of file MoCapEvent.h.

typedef std::map<unsigned int, fmat::Column<3> >::const_iterator MoCapEvent::position_iterator

Definition at line 20 of file MoCapEvent.h.


Constructor & Destructor Documentation

MoCapEvent::MoCapEvent ( const std::string &  srcName,
size_t  sid = 0 
) [explicit]

Constructor.

Definition at line 24 of file MoCapEvent.h.

Referenced by clone().


Member Function Documentation

virtual EventBase* MoCapEvent::clone (  )  const [virtual]

Clone implementation.

Reimplemented from EventBase.

Definition at line 27 of file MoCapEvent.h.

const fmat::Quaternion & MoCapEvent::getOrientation ( unsigned int  frameIdx  )  const

Attempts to look up an orientation reading for the specified reference frame, throws std::out_of_range if not found.

Definition at line 12 of file MoCapEvent.cc.

Referenced by getPose(), and MoCapLogger::gotMoCapGUI().

const fmat::Transform MoCapEvent::getPose ( unsigned int  frameIdx  )  const

Constructs a transformation matrix for the specified reference frame, throws std::out_of_range if not found for either position or orientation.

The transformation matrix can be right-multiplied by a point relative to the frame to obtain the corresponding world-frame position. In a perfect simulation, this transform should be equivalent to getPose(BaseFrameOffset) * kine->getT(frameIdx) but in both simulation and the real world, gravity and obstacles may pull a joint away from its ideal target pose.

Definition at line 41 of file MoCapEvent.h.

const fmat::Column< 3 > & MoCapEvent::getPosition ( unsigned int  frameIdx  )  const

Attempts to look up a position reading for the specified reference frame, throws std::out_of_range if not found.

Definition at line 5 of file MoCapEvent.cc.

Referenced by getPose(), and MoCapLogger::gotMoCapGUI().


Member Data Documentation

std::map<unsigned int, fmat::Quaternion > MoCapEvent::orientations

orientation data (may not cover all reference frames!)

Definition at line 46 of file MoCapEvent.h.

Referenced by MoCapLogger::dump(), and getOrientation().

std::map<unsigned int, fmat::Column<3> > MoCapEvent::positions

position data (may not cover all reference frames!)

Definition at line 45 of file MoCapEvent.h.

Referenced by MoCapLogger::dump(), and getPosition().


The documentation for this class was generated from the following files:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:13 2016 by Doxygen 1.6.3