Jafar
|
This class makes it easy to read positions from a sequence. More...
This class makes it easy to read positions from a sequence.
Definition at line 23 of file PositionReader.hpp.
#include <PositionReader.hpp>
Public Types | |
enum | PosFileType { JAFAR, CALIFE, GENOM } |
Type of the pos file to be read. More... | |
enum | TransfoSource { POS, T3D } |
Source of the estimation of movement from t to t+1. More... | |
Public Member Functions | |
void | setup (std::string directory_, std::string pattern_="image.pos.%04d.g.pos", std::string patternTransfos_="%04d_to_%04d.t3d", std::string patternTimes_="", jblas::vec *robotToSensorCorrection_=NULL, int first_=-1, int last_=-1, int step_=-1) |
Setup the config reader. | |
Position | loadPosition (unsigned int index_, PosFileType fileType=JAFAR) const |
Load a position given the index_ of .pos file fileType indicates whether the file was written in Calife format (rotation then translation) or in Jafar format (translation then rotation) | |
void | loadPosition (unsigned int index_, Position &pos) const |
void | loadT3D (unsigned int index1, unsigned int index2, jafar::geom::T3D &t3d) const |
void | loadTime (unsigned int index, double &time) const |
jafar::geom::T3D * | loadTransfo (unsigned int iFrom, unsigned int iTo, int *dt=NULL, TransfoSource source=POS) |
Return the transformation from frame iFrom to frame iTo, using source (.pos files or .t3d files) | |
Private Attributes | |
std::string | directory |
std::string | pattern |
std::string | patternTransfos |
std::string | patternTimes |
jblas::vec | robotToSensorCorrection |
int | first |
int | last |
int | step |
geom::T3D * | robotToSensor |
geom::T3D * | sensorToRobot |
Position * | cached_pos |
unsigned int | cached_pos_index |
Type of the pos file to be read.
Definition at line 43 of file PositionReader.hpp.
Source of the estimation of movement from t to t+1.
Definition at line 53 of file PositionReader.hpp.
jafar::geom::T3D* jafar::datareader::PositionReader::loadTransfo | ( | unsigned int | iFrom, |
unsigned int | iTo, | ||
int * | dt = NULL , |
||
TransfoSource | source = POS |
||
) |
Return the transformation from frame iFrom to frame iTo, using source (.pos files or .t3d files)
dt | time elapsed between the two frames (us) |
void jafar::datareader::PositionReader::setup | ( | std::string | directory_, |
std::string | pattern_ = "image.pos.%04d.g.pos" , |
||
std::string | patternTransfos_ = "%04d_to_%04d.t3d" , |
||
std::string | patternTimes_ = "" , |
||
jblas::vec * | robotToSensorCorrection_ = NULL , |
||
int | first_ = -1 , |
||
int | last_ = -1 , |
||
int | step_ = -1 |
||
) |
Setup the config reader.
directory_ | the directory where are .cfg files |
pattern_ | the file name pattern for .pos files, with origin directory_ |
patternTransfos_ | the file name pattern for .t3d files, with origin directory_. Must contain two integers. |
patternTimes | the file name patter for .time files saved by viam |
robotToSensorCorrection_ | a transformation that is added to robotToSensor |
first_ | the index of first image |
last_ | the index of last image |
step_ | the index step between images |
Generated on Wed Oct 15 2014 00:37:33 for Jafar by doxygen 1.7.6.1 |