SMACC2
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
cl_nav2z::odom_tracker Namespace Reference

Classes

class  OdomTracker
 

Enumerations

enum class  WorkingMode : uint8_t { RECORD_PATH = 0 , CLEAR_PATH = 1 , IDLE = 2 }
 

Functions

double p2pDistance (const geometry_msgs::msg::Point &p1, const geometry_msgs::msg::Point &p2)
 
template<typename T >
void parameterDeclareAndtryGetOrSet (rclcpp::Node::SharedPtr &node, std::string param_name, T &value)
 

Enumeration Type Documentation

◆ WorkingMode

enum class cl_nav2z::odom_tracker::WorkingMode : uint8_t
strong
Enumerator
RECORD_PATH 
CLEAR_PATH 
IDLE 

Definition at line 44 of file odom_tracker.hpp.

Function Documentation

◆ p2pDistance()

double cl_nav2z::odom_tracker::p2pDistance ( const geometry_msgs::msg::Point &  p1,
const geometry_msgs::msg::Point &  p2 
)
inline

p2pDistance()

Definition at line 179 of file odom_tracker.hpp.

181{
182 double dx = (p1.x - p2.x);
183 double dy = (p1.y - p2.y);
184 double dz = (p2.z - p2.z);
185 double dist = sqrt(dx * dx + dy * dy + dz * dz);
186 return dist;
187}

Referenced by cl_nav2z::odom_tracker::OdomTracker::updateClearPath(), and cl_nav2z::odom_tracker::OdomTracker::updateRecordPath().

Here is the caller graph for this function:

◆ parameterDeclareAndtryGetOrSet()

template<typename T >
void cl_nav2z::odom_tracker::parameterDeclareAndtryGetOrSet ( rclcpp::Node::SharedPtr &  node,
std::string  param_name,
T &  value 
)

Definition at line 42 of file odom_tracker.cpp.

44{
45 if (!node->get_parameter(param_name, value))
46 {
47 RCLCPP_INFO_STREAM(node->get_logger(), "[OdomTracker] autoset " << param_name << ": " << value);
48 node->declare_parameter(param_name, value);
49 }
50 else
51 {
52 RCLCPP_INFO_STREAM(node->get_logger(), "[OdomTracker] " << param_name << ": " << value);
53 }
54}

Referenced by cl_nav2z::odom_tracker::OdomTracker::onInitialize().

Here is the caller graph for this function: