Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ov_eval::Recorder Class Reference

This class takes in published poses and writes them to file. More...

#include <Recorder.h>

Public Member Functions

void callback_odometry (const nav_msgs::OdometryPtr &msg)
 Callback for nav_msgs::Odometry message types. More...
 
void callback_pose (const geometry_msgs::PoseStampedPtr &msg)
 Callback for geometry_msgs::PoseStamped message types. More...
 
void callback_posecovariance (const geometry_msgs::PoseWithCovarianceStampedPtr &msg)
 Callback for geometry_msgs::PoseWithCovarianceStamped message types. More...
 
void callback_transform (const geometry_msgs::TransformStampedPtr &msg)
 Callback for geometry_msgs::TransformStamped message types. More...
 
 Recorder (std::string filename)
 Default constructor that will open the specified file on disk. If the output directory does not exists this will also create the directory path to this file. More...
 

Protected Member Functions

void write ()
 This is the main write function that will save to disk. This should be called after we have saved the desired pose to our class variables. More...
 

Protected Attributes

Eigen::Matrix< double, 3, 3 > cov_pos
 
Eigen::Matrix< double, 3, 3 > cov_rot
 
bool has_covariance = false
 
std::ofstream outfile
 
Eigen::Vector3d p_IinG
 
Eigen::Vector4d q_ItoG
 
double timestamp
 

Detailed Description

This class takes in published poses and writes them to file.

Original code is based on this modified posemsg_to_file. Output is in a text file that is space deliminated and can be read by all scripts. If we have a covariance then we also save the upper triangular part to file so we can calculate NEES values.

Definition at line 47 of file Recorder.h.

Constructor & Destructor Documentation

◆ Recorder()

ov_eval::Recorder::Recorder ( std::string  filename)
inline

Default constructor that will open the specified file on disk. If the output directory does not exists this will also create the directory path to this file.

Parameters
filenameDesired file we want to "record" into

Definition at line 55 of file Recorder.h.

Member Function Documentation

◆ callback_odometry()

void ov_eval::Recorder::callback_odometry ( const nav_msgs::OdometryPtr &  msg)
inline

Callback for nav_msgs::Odometry message types.

Note that covariance is in the order (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis). http://docs.ros.org/api/geometry_msgs/html/msg/PoseWithCovariance.html

Parameters
msgNew message

Definition at line 92 of file Recorder.h.

◆ callback_pose()

void ov_eval::Recorder::callback_pose ( const geometry_msgs::PoseStampedPtr &  msg)
inline

Callback for geometry_msgs::PoseStamped message types.

Parameters
msgNew message

Definition at line 110 of file Recorder.h.

◆ callback_posecovariance()

void ov_eval::Recorder::callback_posecovariance ( const geometry_msgs::PoseWithCovarianceStampedPtr &  msg)
inline

Callback for geometry_msgs::PoseWithCovarianceStamped message types.

Note that covariance is in the order (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis). http://docs.ros.org/api/geometry_msgs/html/msg/PoseWithCovariance.html

Parameters
msgNew message

Definition at line 125 of file Recorder.h.

◆ callback_transform()

void ov_eval::Recorder::callback_transform ( const geometry_msgs::TransformStampedPtr &  msg)
inline

Callback for geometry_msgs::TransformStamped message types.

Parameters
msgNew message

Definition at line 143 of file Recorder.h.

◆ write()

void ov_eval::Recorder::write ( )
inlineprotected

This is the main write function that will save to disk. This should be called after we have saved the desired pose to our class variables.

Definition at line 155 of file Recorder.h.

Member Data Documentation

◆ cov_pos

Eigen::Matrix<double, 3, 3> ov_eval::Recorder::cov_pos
protected

Definition at line 187 of file Recorder.h.

◆ cov_rot

Eigen::Matrix<double, 3, 3> ov_eval::Recorder::cov_rot
protected

Definition at line 186 of file Recorder.h.

◆ has_covariance

bool ov_eval::Recorder::has_covariance = false
protected

Definition at line 182 of file Recorder.h.

◆ outfile

std::ofstream ov_eval::Recorder::outfile
protected

Definition at line 179 of file Recorder.h.

◆ p_IinG

Eigen::Vector3d ov_eval::Recorder::p_IinG
protected

Definition at line 185 of file Recorder.h.

◆ q_ItoG

Eigen::Vector4d ov_eval::Recorder::q_ItoG
protected

Definition at line 184 of file Recorder.h.

◆ timestamp

double ov_eval::Recorder::timestamp
protected

Definition at line 183 of file Recorder.h.


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


ov_eval
Author(s): Patrick Geneva , Kevin Eckenhoff , Guoquan Huang
autogenerated on Mon Dec 16 2024 03:06:50