ov_eval::Recorder class

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.

Constructors, destructors, conversion operators

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.

Public functions

void callback_odometry(const nav_msgs::OdometryPtr& msg)
Callback for nav_msgs::Odometry message types.
void callback_pose(const geometry_msgs::PoseStampedPtr& msg)
Callback for geometry_msgs::PoseStamped message types.
void callback_posecovariance(const geometry_msgs::PoseWithCovarianceStampedPtr& msg)
Callback for geometry_msgs::PoseWithCovarianceStamped message types.
void callback_transform(const geometry_msgs::TransformStampedPtr& msg)
Callback for geometry_msgs::TransformStamped message types.

Protected 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.

Function documentation

ov_eval::Recorder::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.

Parameters
filename Desired file we want to "record" into

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

Callback for nav_msgs::Odometry message types.

Parameters
msg New message

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

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

Callback for geometry_msgs::PoseStamped message types.

Parameters
msg New message

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

Callback for geometry_msgs::PoseWithCovarianceStamped message types.

Parameters
msg New message

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

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

Callback for geometry_msgs::TransformStamped message types.

Parameters
msg New message