Defines the motion of a robot along time. More...
#include <hpp/gik/robot/robot-motion.hh>
Public Member Functions | |
ChppRobotMotion (CjrlHumanoidDynamicRobot *inRobot, double inStartTime, double inSamplingPeriod) | |
Constructor. More... | |
~ChppRobotMotion () | |
Destructor. More... | |
void | startTime (double inStartTime) |
Set lower bound of definition interval. More... | |
double | startTime () const |
Get lower bound of definition interval. More... | |
double | endTime () const |
Get upper bound of defintion interval. More... | |
const CjrlHumanoidDynamicRobot & | robot () |
Get robot for which motion is defined. More... | |
double | samplingPeriod () |
Get the sampling period of this motion. More... | |
void | appendSample (const ChppRobotMotionSample &inSample) |
Append a new sample. More... | |
bool | appendMotion (const ChppRobotMotion &inMotion) |
Append another robot motion. More... | |
void | clear () |
Delete stored motion. More... | |
void | dumpTo (const char *inFilename, const char *option="w") const |
Motion dumper: More... | |
bool | empty () const |
Tell if this robot motion object is empty. More... | |
const ChppRobotMotionSample * | firstSample () |
This object keeps an iterator on the list of stored samples and it is reset by this method. More... | |
const ChppRobotMotionSample * | nextSample () |
This object keeps an iterator on the list of stored samples and it is incremented by this method to access the samples list sequentially. More... | |
const ChppRobotMotionSample * | previousSample () |
This object keeps an iterator on the list of stored samples and it is decremented by this method. More... | |
const ChppRobotMotionSample * | lastSample () |
Get a pointer to the last sample stored. More... | |
bool | getSampleAtTime (double inTime, ChppRobotMotionSample &outSample) const |
Copy the sample corresponding to time. More... | |
unsigned int | numberSamples () const |
Get the number of samples. More... | |
Defines the motion of a robot along time.
The motion is stored as a list of ublas vectors.
ChppRobotMotion::ChppRobotMotion | ( | CjrlHumanoidDynamicRobot * | inRobot, |
double | inStartTime, | ||
double | inSamplingPeriod | ||
) |
Constructor.
ChppRobotMotion::~ChppRobotMotion | ( | ) |
Destructor.
bool ChppRobotMotion::appendMotion | ( | const ChppRobotMotion & | inMotion | ) |
Append another robot motion.
The passed motion is copied sample by sample and added to the end of this motion.
void ChppRobotMotion::appendSample | ( | const ChppRobotMotionSample & | inSample | ) |
Append a new sample.
void ChppRobotMotion::clear | ( | ) |
Delete stored motion.
void ChppRobotMotion::dumpTo | ( | const char * | inFilename, |
const char * | option = "w" |
||
) | const |
Motion dumper:
5 files are produced for openHRP joint configuration freeflyer position freeflyer orientation zmp reference motion in waist frame observed zmp motion in waist frame 2 files are produced for debug: zmp reference motion in world frame zmp for solution motion in world frame
In all these files, a data sample is output to a line beginning by the sample time, starting from 0.0.
bool ChppRobotMotion::empty | ( | ) | const |
Tell if this robot motion object is empty.
double ChppRobotMotion::endTime | ( | ) | const |
Get upper bound of defintion interval.
const ChppRobotMotionSample* ChppRobotMotion::firstSample | ( | ) |
This object keeps an iterator on the list of stored samples and it is reset by this method.
bool ChppRobotMotion::getSampleAtTime | ( | double | inTime, |
ChppRobotMotionSample & | outSample | ||
) | const |
Copy the sample corresponding to time.
inTime | in |
outSample |
const ChppRobotMotionSample* ChppRobotMotion::lastSample | ( | ) |
Get a pointer to the last sample stored.
The returned pointer is null in case the motion is empty.
const ChppRobotMotionSample* ChppRobotMotion::nextSample | ( | ) |
This object keeps an iterator on the list of stored samples and it is incremented by this method to access the samples list sequentially.
unsigned int ChppRobotMotion::numberSamples | ( | ) | const |
Get the number of samples.
const ChppRobotMotionSample* ChppRobotMotion::previousSample | ( | ) |
This object keeps an iterator on the list of stored samples and it is decremented by this method.
const CjrlHumanoidDynamicRobot& ChppRobotMotion::robot | ( | ) |
Get robot for which motion is defined.
double ChppRobotMotion::samplingPeriod | ( | ) |
Get the sampling period of this motion.
void ChppRobotMotion::startTime | ( | double | inStartTime | ) |
Set lower bound of definition interval.
double ChppRobotMotion::startTime | ( | ) | const |
Get lower bound of definition interval.