Nav2 Navigation Stack - kilted  kilted
ROS 2 Navigation Stack
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
nav_2d_utils::OdomSubscriber Class Reference

#include <nav2_dwb_controller/nav_2d_utils/include/nav_2d_utils/odom_subscriber.hpp>

Public Member Functions

 OdomSubscriber (nav2_util::LifecycleNode::SharedPtr nh, std::string default_topic="odom")
 Constructor that subscribes to an Odometry topic. More...
 
nav_2d_msgs::msg::Twist2D getTwist ()
 
nav_2d_msgs::msg::Twist2DStamped getTwistStamped ()
 

Protected Member Functions

void odomCallback (const nav_msgs::msg::Odometry::SharedPtr msg)
 

Protected Attributes

rclcpp::Subscription< nav_msgs::msg::Odometry >::SharedPtr odom_sub_
 
nav_2d_msgs::msg::Twist2DStamped odom_vel_
 
std::mutex odom_mutex_
 

Detailed Description

Wrapper for some common odometry operations. Subscribes to the topic with a mutex.

Definition at line 55 of file odom_subscriber.hpp.

Constructor & Destructor Documentation

◆ OdomSubscriber()

nav_2d_utils::OdomSubscriber::OdomSubscriber ( nav2_util::LifecycleNode::SharedPtr  nh,
std::string  default_topic = "odom" 
)
inlineexplicit

Constructor that subscribes to an Odometry topic.

Parameters
nhNodeHandle for creating subscriber
default_topicName of the topic that will be loaded of the odom_topic param is not set.

Definition at line 64 of file odom_subscriber.hpp.


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