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

Classes

class  CpOdomTracker
 

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_nitrosz::odom_tracker::WorkingMode : uint8_t
strong
Enumerator
RECORD_PATH 
CLEAR_PATH 
IDLE 

Definition at line 44 of file cp_odom_tracker.hpp.

45{
46 RECORD_PATH = 0,
47 CLEAR_PATH = 1,
48 IDLE = 2
49};

Function Documentation

◆ p2pDistance()

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

p2pDistance()

Definition at line 179 of file cp_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_nitrosz::odom_tracker::CpOdomTracker::updateClearPath(), and cl_nitrosz::odom_tracker::CpOdomTracker::updateRecordPath().

Here is the caller graph for this function:

◆ parameterDeclareAndtryGetOrSet()

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

Definition at line 42 of file cp_odom_tracker.cpp.

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

Referenced by cl_nitrosz::odom_tracker::CpOdomTracker::onInitialize().

Here is the caller graph for this function: