Public Member Functions | Private Attributes | List of all members
base_local_planner::OdometryHelperRos Class Reference

#include <odometry_helper_ros.h>

Public Member Functions

void getOdom (nav_msgs::Odometry &base_odom)
 
std::string getOdomTopic () const
 Return the current odometry topic. More...
 
void getRobotVel (geometry_msgs::PoseStamped &robot_vel)
 
void odomCallback (const nav_msgs::Odometry::ConstPtr &msg)
 Callback for receiving odometry data. More...
 
 OdometryHelperRos (std::string odom_topic="")
 Constructor. More...
 
void setOdomTopic (std::string odom_topic)
 Set the odometry topic. This overrides what was set in the constructor, if anything. More...
 
 ~OdometryHelperRos ()
 

Private Attributes

nav_msgs::Odometry base_odom_
 
std::string frame_id_
 The frame_id associated this data. More...
 
boost::mutex odom_mutex_
 
ros::Subscriber odom_sub_
 
std::string odom_topic_
 

Detailed Description

Definition at line 83 of file odometry_helper_ros.h.

Constructor & Destructor Documentation

◆ OdometryHelperRos()

base_local_planner::OdometryHelperRos::OdometryHelperRos ( std::string  odom_topic = "")

Constructor.

Parameters
odom_topicThe topic on which to subscribe to Odometry messages. If the empty string is given (the default), no subscription is done.

Definition at line 79 of file odometry_helper_ros.cpp.

◆ ~OdometryHelperRos()

base_local_planner::OdometryHelperRos::~OdometryHelperRos ( )
inline

Definition at line 126 of file odometry_helper_ros.h.

Member Function Documentation

◆ getOdom()

void base_local_planner::OdometryHelperRos::getOdom ( nav_msgs::Odometry &  base_odom)

Definition at line 97 of file odometry_helper_ros.cpp.

◆ getOdomTopic()

std::string base_local_planner::OdometryHelperRos::getOdomTopic ( ) const
inline

Return the current odometry topic.

Definition at line 146 of file odometry_helper_ros.h.

◆ getRobotVel()

void base_local_planner::OdometryHelperRos::getRobotVel ( geometry_msgs::PoseStamped &  robot_vel)

Definition at line 103 of file odometry_helper_ros.cpp.

◆ odomCallback()

void base_local_planner::OdometryHelperRos::odomCallback ( const nav_msgs::Odometry::ConstPtr &  msg)

Callback for receiving odometry data.

Parameters
msgAn Odometry message

Definition at line 83 of file odometry_helper_ros.cpp.

◆ setOdomTopic()

void base_local_planner::OdometryHelperRos::setOdomTopic ( std::string  odom_topic)

Set the odometry topic. This overrides what was set in the constructor, if anything.

This unsubscribes from the old topic (if any) and subscribes to the new one (if any).

If odom_topic is the empty string, this just unsubscribes from the previous topic.

Definition at line 123 of file odometry_helper_ros.cpp.

Member Data Documentation

◆ base_odom_

nav_msgs::Odometry base_local_planner::OdometryHelperRos::base_odom_
private

Definition at line 154 of file odometry_helper_ros.h.

◆ frame_id_

std::string base_local_planner::OdometryHelperRos::frame_id_
private

The frame_id associated this data.

Definition at line 157 of file odometry_helper_ros.h.

◆ odom_mutex_

boost::mutex base_local_planner::OdometryHelperRos::odom_mutex_
private

Definition at line 155 of file odometry_helper_ros.h.

◆ odom_sub_

ros::Subscriber base_local_planner::OdometryHelperRos::odom_sub_
private

Definition at line 153 of file odometry_helper_ros.h.

◆ odom_topic_

std::string base_local_planner::OdometryHelperRos::odom_topic_
private

Definition at line 150 of file odometry_helper_ros.h.


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


base_local_planner
Author(s): Eitan Marder-Eppstein, Eric Perko, contradict@gmail.com
autogenerated on Mon Mar 6 2023 03:50:24