Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Attributes
jafar::datareader::PositionReader Class Reference

This class makes it easy to read positions from a sequence. More...


Detailed Description

This class makes it easy to read positions from a sequence.

Definition at line 23 of file PositionReader.hpp.

#include <PositionReader.hpp>

Inheritance diagram for jafar::datareader::PositionReader:
Inheritance graph
[legend]

List of all members.

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::T3DloadTransfo (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::T3DrobotToSensor
geom::T3DsensorToRobot
Positioncached_pos
unsigned int cached_pos_index

Member Enumeration Documentation

Type of the pos file to be read.

  • In Calife and Genom (POM module) rotation angles are written before translation vector
  • In Jafar translation vector is written before rotation angles

Definition at line 43 of file PositionReader.hpp.

Source of the estimation of movement from t to t+1.

  • POS: .pos files that represents integrated trajectory of the robot (usually given by classic odometry)
  • T3D: .t3d files that represents transformation from t to t+1 (usually given by VME module)

Definition at line 53 of file PositionReader.hpp.


Member Function Documentation

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)

Parameters:
dttime 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.

Parameters:
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.
patternTimesthe 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

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:33 for Jafar by doxygen 1.7.6.1
LAAS-CNRS