Keeps track of displacement of a moving frame w.r.t fixed frame. More...
#include <odometer.h>
Public Member Functions | |
tf::Pose | getDisplacement (const ros::Time &t=ros::Time()) |
Get the relative displacement at time t. | |
Odometer (tf::TransformListener *tf, const std::string &base_frame, const std::string &fixed_frame, const ros::Duration &timeout=ros::Duration(0.0)) | |
Create, and reset the reference pose to the current one. | |
ros::Time | reset (const ros::Duration &timeout=ros::Duration(0.0)) |
Reset the reference pose to the most recent one. | |
void | reset (const ros::Time &t, const ros::Duration &timeout=ros::Duration(0.0)) |
Reset the reference pose the one at time t. | |
Private Attributes | |
std::string | base_frame_ |
std::string | fixed_frame_ |
tf::Stamped< tf::Pose > | reference_pose_ |
tf::TransformListener * | tf_ |
const ros::Duration | wait_inc_ |
Keeps track of displacement of a moving frame w.r.t fixed frame.
Create an instance, then call getDisplacement() to get the current displacement wrt the reference pose. Use reset() to reset the reference pose.
Unlike tf, this doesn't have a fixed time window
Definition at line 55 of file odometer.h.
graph_slam::Odometer::Odometer | ( | tf::TransformListener * | tf, | |
const std::string & | base_frame, | |||
const std::string & | fixed_frame, | |||
const ros::Duration & | timeout = ros::Duration(0.0) | |||
) |
Create, and reset the reference pose to the current one.
tf | A pointer to an existing tf transform listener The pointed-to TransformListener must stay alive for the lifetime of this object | |
timeout | Wait this long for the initial transform |
Definition at line 36 of file odometer.cpp.
tf::Pose graph_slam::Odometer::getDisplacement | ( | const ros::Time & | t = ros::Time() |
) |
Get the relative displacement at time t.
tf::TransformException |
Definition at line 67 of file odometer.cpp.
ros::Time graph_slam::Odometer::reset | ( | const ros::Duration & | timeout = ros::Duration(0.0) |
) |
Reset the reference pose to the most recent one.
tf::TransformException |
Definition at line 61 of file odometer.cpp.
void graph_slam::Odometer::reset | ( | const ros::Time & | t, | |
const ros::Duration & | timeout = ros::Duration(0.0) | |||
) |
Reset the reference pose the one at time t.
tf::TransformException |
Definition at line 43 of file odometer.cpp.
std::string graph_slam::Odometer::base_frame_ [private] |
Definition at line 86 of file odometer.h.
std::string graph_slam::Odometer::fixed_frame_ [private] |
Definition at line 87 of file odometer.h.
tf::Stamped<tf::Pose> graph_slam::Odometer::reference_pose_ [private] |
Definition at line 88 of file odometer.h.
tf::TransformListener* graph_slam::Odometer::tf_ [private] |
Definition at line 85 of file odometer.h.
const ros::Duration graph_slam::Odometer::wait_inc_ [private] |
Definition at line 83 of file odometer.h.