vslam_evaluation::LogWriter Class Reference

#include <LogWriter.h>

List of all members.


Detailed Description

Log trajectory, maps and feature initialisations to XML files.

LogWriter will write the following files to a user-specified directory: feature_inits.xml, measurements.xml, poses.xml, maps.xml, and anchors.xml. It will also copy the experiment.xml there.

Public Member Functions

 LogWriter ()
 Create new LogWriter.
 ~LogWriter ()
 Destroy LogWriter.
void open (const std::string &output_directory_name)
 Create slamlog files in directory.
void copySetupFile (const SequenceReader &reader)
 Copy the setup.xml file of the current experiment to the slamlog directory.
void logFeatureInit (double timestamp, int feature_id, double image_position_u, double image_position_v, double relative_normal_x=0, double relative_normal_y=0, double relative_normal_z=0)
 Log a feature_init entry.
void logFeatureInitStereo (double timestamp, int feature_id, double image_position_u, double image_position_v, double image_position_d, double relative_normal_x=0, double relative_normal_y=0, double relative_normal_z=0)
 Add feature_init entry for a stereo camera (with disparity).
void logMeasurement (double timestamp, int feature_id, double image_position_u, double image_position_v, std::string error="")
 Add a measurement of an existing feature.
void logMeasurementStereo (double timestamp, int feature_id, double image_position_u, double image_position_v, double image_position_d, std::string error="")
 Add a measurement of an existing feature for a stereo camera (with disparity).
void logPose (double timestamp, double camera_position_x, double camera_position_y, double camera_position_z, double camera_rotation_w, double camera_rotation_x, double camera_rotation_y, double camera_rotation_z)
 Log a camera pose estimate.
void logMap (double timestamp, const std::vector< MapFeature > &map)
 Add an estimate of the map at a specific frame.
void logAnchorMap (double timestamp, const std::vector< MapAnchor > &map)
void finish ()
 finish writing.

Classes

struct  MapAnchor
struct  MapFeature
 A feature estimate in a map. More...


Constructor & Destructor Documentation

vslam_evaluation::LogWriter::LogWriter (  ) 

Create new LogWriter.

Before you can use it, you have to call open ().

vslam_evaluation::LogWriter::~LogWriter (  ) 

Destroy LogWriter.

Calls finish () to finalise and close log files.

References finish().


Member Function Documentation

void vslam_evaluation::LogWriter::open ( const std::string &  output_directory_name  ) 

Create slamlog files in directory.

Calls finish (), to finalise files that might still be open.

Parameters:
output_directory_name where to store the xml-files.

References finish().

void vslam_evaluation::LogWriter::copySetupFile ( const SequenceReader reader  ) 

Copy the setup.xml file of the current experiment to the slamlog directory.

Parameters:
reader a SequenceReader with the current experiment opened.

References vslam_evaluation::SequenceReader::getSetupFilename().

void vslam_evaluation::LogWriter::logFeatureInit ( double  timestamp,
int  feature_id,
double  image_position_u,
double  image_position_v,
double  relative_normal_x = 0,
double  relative_normal_y = 0,
double  relative_normal_z = 0 
)

Log a feature_init entry.

A feature_init consists of the image position (u,v) where the feature is first observed and initialised, and a timestamp which identifies the camera frame in which this first observation was made. A feature_id is associated with the new feature. Future measurements and map estimates of this feature will be identified by the feature_id. Optionally a normal vector relative to the camera pose of this first observation can be given.

Parameters:
timestamp timestamp of the camera frame where the initialisation takes place.
feature_id id associated with the new feature.
image_position_u initial image measurement.
image_position_v initial image measurement.
relative_normal_x optional feature normal relative to camera pose at timestamp.
relative_normal_y optional feature normal relative to camera pose at timestamp.
relative_normal_z optional feature normal relative to camera pose at timestamp.

void vslam_evaluation::LogWriter::logFeatureInitStereo ( double  timestamp,
int  feature_id,
double  image_position_u,
double  image_position_v,
double  image_position_d,
double  relative_normal_x = 0,
double  relative_normal_y = 0,
double  relative_normal_z = 0 
)

Add feature_init entry for a stereo camera (with disparity).

A feature_init consists of the image position (u,v,d) where the feature is first observed and initialised, and a timestamp which identifies the camera frame in which this first observation was made. A feature_id is associated with the new feature. Future measurements and map estimates of this feature will be identified by the feature_id. Optionally, a normal vector relative to the camera pose of this first observation can be given.

Parameters:
timestamp timestamp of the camera frame where the initialisation takes place.
feature_id id associated with the new feature.
image_position_u initial measurement in the right/reference image.
image_position_v initial measurement in the right/reference image.
image_position_d initial disparity measurement
relative_normal_x optional feature normal relative to camera pose at timestamp.
relative_normal_y optional feature normal relative to camera pose at timestamp.
relative_normal_z optional feature normal relative to camera pose at timestamp.

void vslam_evaluation::LogWriter::logMeasurement ( double  timestamp,
int  feature_id,
double  image_position_u,
double  image_position_v,
std::string  error = "" 
)

Add a measurement of an existing feature.

A measurement consists of a (u,v) observation, the feature_id of the observed feature, and a timestamp which identifies the camera frame in which the observation was made.

Optionally, an error string can be supplied. If the measurement failed or was discarded for some reason (but you might still be interested in the image-position) then you can give a reason for the failure here.

Parameters:
timestamp timestamp of the camera frame in which the observation was made.
feature_id id of the feature.
image_position_u image measurement.
image_position_v image measurement.
error optional error string.

void vslam_evaluation::LogWriter::logMeasurementStereo ( double  timestamp,
int  feature_id,
double  image_position_u,
double  image_position_v,
double  image_position_d,
std::string  error = "" 
)

Add a measurement of an existing feature for a stereo camera (with disparity).

A measurement consists of a (u,v,d) observation, the feature_id of the observed feature, and a timestamp which identifies the camera frame in which the observation was made.

Optionally, an error string can be supplied. If the measurement failed or was discarded for some reason (but you might still be interested in the image-position) then you can give a reason for the failure here.

Parameters:
timestamp timestamp of the camera frame in which the observation was made.
feature_id id of the feature.
image_position_u measurement in the right/reference image.
image_position_v measurement in the right/reference image.
image_position_d disparity measurement.
error optional error string.

void vslam_evaluation::LogWriter::logPose ( double  timestamp,
double  camera_position_x,
double  camera_position_y,
double  camera_position_z,
double  camera_rotation_w,
double  camera_rotation_x,
double  camera_rotation_y,
double  camera_rotation_z 
)

Log a camera pose estimate.

A pose estimate consists of a camera position and rotation, and a timestamp.

Parameters:
timestamp timestamp of the camera frame of the pose estimate.
camera_position_x translation.
camera_position_y translation.
camera_position_z translation.
camera_rotation_w rotation (as a quaternion).
camera_rotation_x rotation (as a quaternion).
camera_rotation_y rotation (as a quaternion).
camera_rotation_z rotation (as a quaternion).

void vslam_evaluation::LogWriter::logMap ( double  timestamp,
const std::vector< MapFeature > &  map 
)

Add an estimate of the map at a specific frame.

Parameters:
timestamp timestamp of the camera frame of the map estimate.
map a vector of feature estimates.

void vslam_evaluation::LogWriter::logAnchorMap ( double  timestamp,
const std::vector< MapAnchor > &  map 
)

void vslam_evaluation::LogWriter::finish (  ) 

finish writing.

close files.

Referenced by open(), and ~LogWriter().


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

Generated on Mon Jan 11 13:11:57 2010 for VSLAM API by  doxygen 1.5.6