SMACC2
Loading...
Searching...
No Matches
cl_nav2z::odom_tracker::CpOdomTracker Class Reference

#include <cp_odom_tracker.hpp>

Inheritance diagram for cl_nav2z::odom_tracker::CpOdomTracker:
Inheritance graph
Collaboration diagram for cl_nav2z::odom_tracker::CpOdomTracker:
Collaboration graph

Classes

struct  PathInfo
 

Public Member Functions

 CpOdomTracker (std::string odomtopicName="/odom", std::string odomFrame="odom", OdomTrackerStrategy strategy=OdomTrackerStrategy::ODOMETRY_SUBSCRIBER)
 
virtual void processNewPose (const geometry_msgs::msg::PoseStamped &odom)
 odom callback: Updates the path - this must be called periodically for each odometry message.
 
virtual void odomMessageCallback (const nav_msgs::msg::Odometry::SharedPtr odom)
 
virtual void update ()
 
void setWorkingMode (WorkingMode workingMode)
 
void setPublishMessages (bool value)
 
void pushPath ()
 
void pushPath (std::string pathname)
 
void popPath (int pathCount=1, bool keepPreviousPath=false)
 
void clearPath ()
 
void setStartPoint (const geometry_msgs::msg::PoseStamped &pose)
 
void setStartPoint (const geometry_msgs::msg::Pose &pose)
 
void setCurrentMotionGoal (const geometry_msgs::msg::PoseStamped &pose)
 
void setCurrentPathName (const std::string &currentPathName)
 
std::optional< geometry_msgs::msg::PoseStamped > getCurrentMotionGoal ()
 
nav_msgs::msg::Path getPath ()
 
void logStateString (bool debug=true)
 
void updateParameters ()
 
void setOdomFrame (std::string odomFrame)
 
 CpOdomTracker (std::string odomtopicName="/odom", std::string odomFrame="odom", OdomTrackerStrategy strategy=OdomTrackerStrategy::ODOMETRY_SUBSCRIBER)
 
virtual void processNewPose (const geometry_msgs::msg::PoseStamped &odom)
 odom callback: Updates the path - this must be called periodically for each odometry message.
 
virtual void odomMessageCallback (const nav_msgs::msg::Odometry::SharedPtr odom)
 
virtual void update ()
 
void setWorkingMode (WorkingMode workingMode)
 
void setPublishMessages (bool value)
 
void pushPath ()
 
void pushPath (std::string pathname)
 
void popPath (int pathCount=1, bool keepPreviousPath=false)
 
void clearPath ()
 
void setStartPoint (const geometry_msgs::msg::PoseStamped &pose)
 
void setStartPoint (const geometry_msgs::msg::Pose &pose)
 
void setCurrentMotionGoal (const geometry_msgs::msg::PoseStamped &pose)
 
void setCurrentPathName (const std::string &currentPathName)
 
std::optional< geometry_msgs::msg::PoseStamped > getCurrentMotionGoal ()
 
nav_msgs::msg::Path getPath ()
 
void logStateString (bool debug=true)
 
void updateParameters ()
 
void setOdomFrame (std::string odomFrame)
 
- Public Member Functions inherited from smacc2::ISmaccComponent
 ISmaccComponent ()
 
virtual ~ISmaccComponent ()
 
virtual std::string getName () const
 

Protected Member Functions

void onInitialize () override
 
void updateConfiguration ()
 
virtual void rtPublishPaths (rclcpp::Time timestamp)
 
virtual bool updateRecordPath (const geometry_msgs::msg::PoseStamped &odom)
 
virtual bool updateClearPath (const geometry_msgs::msg::PoseStamped &odom)
 
void updateAggregatedStackPath ()
 
rcl_interfaces::msg::SetParametersResult parametersCallback (const std::vector< rclcpp::Parameter > &parameters)
 
void onInitialize () override
 
void updateConfiguration ()
 
virtual void rtPublishPaths (rclcpp::Time timestamp)
 
virtual bool updateRecordPath (const geometry_msgs::msg::PoseStamped &odom)
 
virtual bool updateClearPath (const geometry_msgs::msg::PoseStamped &odom)
 
void updateAggregatedStackPath ()
 
rcl_interfaces::msg::SetParametersResult parametersCallback (const std::vector< rclcpp::Parameter > &parameters)
 
- Protected Member Functions inherited from smacc2::ISmaccComponent
template<typename TOrthogonal , typename TClient >
void onComponentInitialization ()
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 
template<typename TOrthogonal , typename TSourceObject >
void onOrthogonalAllocation ()
 
template<typename TOrthogonal , typename TSourceObject >
void onStateOrthogonalAllocation ()
 
template<typename TComponent >
void requiresComponent (TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist)
 
template<typename TComponent >
void requiresComponent (std::string name, TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist)
 
template<typename TComponent >
void requiresComponent (TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT)
 
template<typename TComponent >
void requiresComponent (std::string name, TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT)
 
template<typename TClient >
void requiresClient (TClient *&requiredClientStorage)
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createSiblingComponent (TArgs... targs)
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createSiblingNamedComponent (std::string name, TArgs... targs)
 
rclcpp::Node::SharedPtr getNode ()
 
rclcpp::Logger getLogger () const
 
ISmaccStateMachinegetStateMachine ()
 

Protected Attributes

rclcpp::Publisher< nav_msgs::msg::Path >::SharedPtr robotBasePathPub_
 
rclcpp::Publisher< nav_msgs::msg::Path >::SharedPtr robotBasePathStackedPub_
 
rclcpp::Subscription< nav_msgs::msg::Odometry >::SharedPtr odomSub_
 
cl_nav2z::CpPoserobotPose_
 
rclcpp::TimerBase::SharedPtr robotPoseTimer_
 
double recordPointDistanceThreshold_
 How much distance there is between two points of the path.
 
double recordAngularDistanceThreshold_
 Meters.
 
double clearPointDistanceThreshold_
 rads
 
double clearAngularDistanceThreshold_
 rads
 
std::string odomFrame_
 
std::string odomTopicName_
 
bool publishMessages
 
nav_msgs::msg::Path baseTrajectory_
 Processed path for the mouth of the reel.
 
WorkingMode workingMode_
 
std::vector< nav_msgs::msg::Path > pathStack_
 
std::vector< PathInfopathInfos_
 
nav_msgs::msg::Path aggregatedStackPathMsg_
 
OdomTrackerStrategy strategy_
 
std::optional< geometry_msgs::msg::PoseStamped > currentMotionGoal_
 
std::string currentPathName_
 
rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr param_callback_handle_
 
std::mutex m_mutex_
 
cl_nav2z::PoserobotPose_
 
- Protected Attributes inherited from smacc2::ISmaccComponent
ISmaccStateMachinestateMachine_
 
ISmaccClientowner_
 

Detailed Description

This object tracks and saves the trajectories performed by the vehicle so that they can be used later to execute operations such as "undo motions"

Definition at line 60 of file cp_odom_tracker.hpp.

Constructor & Destructor Documentation

◆ CpOdomTracker() [1/2]

cl_nav2z::odom_tracker::CpOdomTracker::CpOdomTracker ( std::string odomtopicName = "/odom",
std::string odomFrame = "odom",
OdomTrackerStrategy strategy = OdomTrackerStrategy::ODOMETRY_SUBSCRIBER )

◆ CpOdomTracker() [2/2]

cl_nav2z::odom_tracker::CpOdomTracker::CpOdomTracker ( std::string odomtopicName = "/odom",
std::string odomFrame = "odom",
OdomTrackerStrategy strategy = OdomTrackerStrategy::ODOMETRY_SUBSCRIBER )

Member Function Documentation

◆ clearPath() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::clearPath ( )

Definition at line 340 of file cp_odom_tracker.cpp.

341{
342 RCLCPP_INFO(getLogger(), "odom_tracker m_mutex acquire to clear path");
343 std::lock_guard<std::mutex> lock(m_mutex_);
344 baseTrajectory_.poses.clear();
345
346 rtPublishPaths(getNode()->now());
347 this->logStateString();
349
350 this->currentMotionGoal_.reset();
351}
nav_msgs::msg::Path baseTrajectory_
Processed path for the mouth of the reel.
virtual void rtPublishPaths(rclcpp::Time timestamp)
std::optional< geometry_msgs::msg::PoseStamped > currentMotionGoal_
rclcpp::Logger getLogger() const
rclcpp::Node::SharedPtr getNode()

References baseTrajectory_, currentMotionGoal_, smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), logStateString(), m_mutex_, rtPublishPaths(), and updateAggregatedStackPath().

Referenced by cl_nav2z::CbNavigateBackwards::onEntry(), cl_nav2z::CbTrackPathOdometry::onEntry(), and cl_nav2z::CbTrackPathSLAM::onEntry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearPath() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::clearPath ( )

◆ getCurrentMotionGoal() [1/2]

std::optional< geometry_msgs::msg::PoseStamped > cl_nav2z::odom_tracker::CpOdomTracker::getCurrentMotionGoal ( )

Definition at line 400 of file cp_odom_tracker.cpp.

401{
402 std::lock_guard<std::mutex> lock(m_mutex_);
403 return this->currentMotionGoal_;
404}

References currentMotionGoal_, and m_mutex_.

Referenced by cl_nav2z::CbRetry< TCbRelativeMotion >::onEntry().

Here is the caller graph for this function:

◆ getCurrentMotionGoal() [2/2]

std::optional< geometry_msgs::msg::PoseStamped > cl_nav2z::odom_tracker::CpOdomTracker::getCurrentMotionGoal ( )

◆ getPath() [1/2]

nav_msgs::msg::Path cl_nav2z::odom_tracker::CpOdomTracker::getPath ( )

Definition at line 406 of file cp_odom_tracker.cpp.

407{
408 std::lock_guard<std::mutex> lock(m_mutex_);
409 return this->baseTrajectory_;
410}

References baseTrajectory_, and m_mutex_.

Referenced by cl_nav2z::CbUndoPathBackwards::onEntry().

Here is the caller graph for this function:

◆ getPath() [2/2]

nav_msgs::msg::Path cl_nav2z::odom_tracker::CpOdomTracker::getPath ( )

◆ logStateString() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::logStateString ( bool debug = true)

Definition at line 298 of file cp_odom_tracker.cpp.

299{
300 std::stringstream ss;
301 ss << "--- odom tracker state ---" << std::endl;
302 ss
303 << " - path stack -" << currentPathName_ << " - size:"
304 << pathStack_.size()
305 //<< " goal: " << (getCurrentMotionGoal()? getCurrentMotionGoal()->pose: geometry_msgs::msg::Pose())
306 << std::endl;
307 ss << " - [STACK-HEAD active path size: " << baseTrajectory_.poses.size() << "]" << std::endl;
308 int i = 0;
309 for (auto & p : pathStack_ | boost::adaptors::reversed)
310 {
311 auto & pathinfo = pathInfos_[pathInfos_.size() - i - 1];
312 std::string goalstr = "[]";
313 if (pathinfo.goalPose)
314 {
315 std::stringstream ss;
316 ss << *(pathinfo.goalPose);
317 goalstr = ss.str();
318 }
319
320 ss << " - p " << i << "[" << p.header.stamp << "], size: " << p.poses.size() << " - "
321 << pathinfo.name << " - goal: " << goalstr << std::endl;
322 i++;
323 }
324 ss << "---";
325
326 if (this->odomSub_ != nullptr && this->odomSub_->get_publisher_count() == 0)
327 {
328 ss << std::endl
329 << "[CpOdomTracker] Odom tracker cannot record the path because there is no publisher to "
330 "the odometry topic"
331 << std::endl;
332 }
333
334 if (debug)
335 RCLCPP_DEBUG(getLogger(), ss.str().c_str());
336 else
337 RCLCPP_INFO(getLogger(), ss.str().c_str());
338}
std::vector< nav_msgs::msg::Path > pathStack_
rclcpp::Subscription< nav_msgs::msg::Odometry >::SharedPtr odomSub_

References baseTrajectory_, currentPathName_, smacc2::ISmaccComponent::getLogger(), odomSub_, pathInfos_, and pathStack_.

Referenced by clearPath(), cl_nav2z::CbUndoPathBackwards::onEntry(), cl_nav2z::CbUndoPathBackwards::onExit(), popPath(), and pushPath().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ logStateString() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::logStateString ( bool debug = true)

◆ odomMessageCallback() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::odomMessageCallback ( const nav_msgs::msg::Odometry::SharedPtr odom)
virtual

odomMessageCallback()

Definition at line 619 of file cp_odom_tracker.cpp.

620{
621 geometry_msgs::msg::PoseStamped base_pose;
622 base_pose.pose = odom->pose.pose;
623 base_pose.header = odom->header;
624
625 processNewPose(base_pose);
626}
virtual void processNewPose(const geometry_msgs::msg::PoseStamped &odom)
odom callback: Updates the path - this must be called periodically for each odometry message.

References processNewPose().

Referenced by onInitialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ odomMessageCallback() [2/2]

virtual void cl_nav2z::odom_tracker::CpOdomTracker::odomMessageCallback ( const nav_msgs::msg::Odometry::SharedPtr odom)
virtual

◆ onInitialize() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::onInitialize ( )
overrideprotectedvirtual

Reimplemented from smacc2::ISmaccComponent.

Definition at line 62 of file cp_odom_tracker.cpp.

63{
64 // default values
65 recordPointDistanceThreshold_ = 0.005; // 5 mm
66 recordAngularDistanceThreshold_ = 0.1; // radians
67 clearPointDistanceThreshold_ = 0.05; // 5 cm
69
70 auto nh = getNode();
71 RCLCPP_WARN(getLogger(), "[CpOdomTracker] Initializing Odometry Tracker");
72
73 parameterDeclareAndtryGetOrSet(nh, "odom_frame", this->odomFrame_);
75 nh, "record_point_distance_threshold", recordPointDistanceThreshold_);
77 nh, "record_angular_distance_threshold", recordAngularDistanceThreshold_);
79 nh, "clear_point_distance_threshold", clearPointDistanceThreshold_);
81 nh, "clear_angular_distance_threshold", clearAngularDistanceThreshold_);
82
83 param_callback_handle_ = getNode()->add_on_set_parameters_callback(
84 std::bind(&CpOdomTracker::parametersCallback, this, std::placeholders::_1));
85
87 nh->create_publisher<nav_msgs::msg::Path>("odom_tracker_path", rclcpp::QoS(1));
88
90 nh->create_publisher<nav_msgs::msg::Path>("odom_tracker_stacked_path", rclcpp::QoS(1));
91
93 {
94 RCLCPP_INFO_STREAM(
95 nh->get_logger(), "[CpOdomTracker] subscribing to odom topic: " << odomTopicName_);
96
97 rclcpp::SensorDataQoS qos;
98 odomSub_ = nh->create_subscription<nav_msgs::msg::Odometry>(
99 odomTopicName_, qos,
100 std::bind(&CpOdomTracker::odomMessageCallback, this, std::placeholders::_1));
101 }
103 {
104 this->requiresComponent(robotPose_, ComponentRequirement::HARD);
105 robotPoseTimer_ = nh->create_wall_timer(
106 std::chrono::milliseconds(100), std::bind(&CpOdomTracker::update, this));
107 }
108 else
109 {
110 RCLCPP_ERROR_STREAM(
111 nh->get_logger(), "[CpOdomTracker] unknown strategy: " << (int)this->strategy_);
112 }
113}
rclcpp::Publisher< nav_msgs::msg::Path >::SharedPtr robotBasePathPub_
rclcpp::Publisher< nav_msgs::msg::Path >::SharedPtr robotBasePathStackedPub_
double recordPointDistanceThreshold_
How much distance there is between two points of the path.
rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr param_callback_handle_
virtual void odomMessageCallback(const nav_msgs::msg::Odometry::SharedPtr odom)
rclcpp::TimerBase::SharedPtr robotPoseTimer_
rcl_interfaces::msg::SetParametersResult parametersCallback(const std::vector< rclcpp::Parameter > &parameters)
void requiresComponent(TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist)
void parameterDeclareAndtryGetOrSet(rclcpp::Node::SharedPtr &node, std::string param_name, T &value)

References clearAngularDistanceThreshold_, clearPointDistanceThreshold_, smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), cl_nav2z::odom_tracker::ODOMETRY_SUBSCRIBER, odomFrame_, odomMessageCallback(), odomSub_, odomTopicName_, param_callback_handle_, cl_nav2z::odom_tracker::parameterDeclareAndtryGetOrSet(), parametersCallback(), cl_nav2z::odom_tracker::POSE_COMPONENT, recordAngularDistanceThreshold_, recordPointDistanceThreshold_, smacc2::ISmaccComponent::requiresComponent(), robotBasePathPub_, robotBasePathStackedPub_, robotPose_, robotPoseTimer_, strategy_, and update().

Here is the call graph for this function:

◆ onInitialize() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::onInitialize ( )
overrideprotectedvirtual

Reimplemented from smacc2::ISmaccComponent.

◆ parametersCallback() [1/2]

rcl_interfaces::msg::SetParametersResult cl_nav2z::odom_tracker::CpOdomTracker::parametersCallback ( const std::vector< rclcpp::Parameter > & parameters)
protected

parametersCallback()

Definition at line 120 of file cp_odom_tracker.cpp.

122{
123 std::lock_guard<std::mutex> lock(m_mutex_);
124 RCLCPP_INFO(getLogger(), "odom_tracker m_mutex acquire");
125
126 for (const auto & param : parameters)
127 {
128 if (param.get_name() == "record_point_distance_threshold")
129 {
130 recordPointDistanceThreshold_ = param.as_double();
131 }
132 else if (param.get_name() == "record_angular_distance_threshold")
133 {
134 recordAngularDistanceThreshold_ = param.as_double();
135 }
136 else if (param.get_name() == "clear_point_distance_threshold")
137 {
138 clearPointDistanceThreshold_ = param.as_double();
139 }
140 else if (param.get_name() == "clear_angular_distance_threshold")
141 {
142 clearAngularDistanceThreshold_ = param.as_double();
143 }
144 else if (param.get_name() == "odom_frame")
145 {
146 odomFrame_ = param.as_string();
147 }
148 }
149
150 rcl_interfaces::msg::SetParametersResult result;
151 result.successful = true;
152 result.reason = "success";
153 return result;
154}

References clearAngularDistanceThreshold_, clearPointDistanceThreshold_, smacc2::ISmaccComponent::getLogger(), m_mutex_, odomFrame_, recordAngularDistanceThreshold_, and recordPointDistanceThreshold_.

Referenced by onInitialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parametersCallback() [2/2]

rcl_interfaces::msg::SetParametersResult cl_nav2z::odom_tracker::CpOdomTracker::parametersCallback ( const std::vector< rclcpp::Parameter > & parameters)
protected

◆ popPath() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::popPath ( int pathCount = 1,
bool keepPreviousPath = false )

Definition at line 253 of file cp_odom_tracker.cpp.

254{
255 RCLCPP_INFO(getLogger(), "odom_tracker m_mutex acquire to pop path");
256 std::lock_guard<std::mutex> lock(m_mutex_);
257
258 RCLCPP_INFO(getLogger(), "POP PATH ENTRY");
259 this->logStateString();
260
261 if (this->odomSub_ != nullptr && this->odomSub_->get_publisher_count() == 0)
262 {
263 RCLCPP_ERROR_STREAM(
264 getLogger(),
265 "[CpOdomTracker] Odom tracker cannot record the path because there is no publisher to the "
266 "odometry topic");
267 }
268
269 if (!keepPreviousPath)
270 {
271 baseTrajectory_.poses.clear();
272 }
273
274 while (popCount > 0 && !pathStack_.empty())
275 {
276 auto & stackedPath = pathStack_.back().poses;
277 auto & stackedPathInfo = pathInfos_.back();
278
279 baseTrajectory_.poses.insert(
280 baseTrajectory_.poses.begin(), stackedPath.begin(), stackedPath.end());
281 this->currentMotionGoal_ = stackedPathInfo.goalPose;
282 pathStack_.pop_back();
283 pathInfos_.pop_back();
284 popCount--;
285
286 RCLCPP_INFO(getLogger(), "POP PATH Iteration ");
287 this->logStateString();
288 }
289
290 RCLCPP_INFO(getLogger(), "POP PATH EXITING");
291 this->logStateString();
292 RCLCPP_INFO(getLogger(), "odom_tracker m_mutex release");
294
295 this->currentMotionGoal_.reset();
296}

References baseTrajectory_, currentMotionGoal_, smacc2::ISmaccComponent::getLogger(), logStateString(), m_mutex_, odomSub_, pathInfos_, pathStack_, and updateAggregatedStackPath().

Referenced by CpOdomTrackerActionServer::execute(), and cl_nav2z::CbUndoPathBackwards::onExit().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ popPath() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::popPath ( int pathCount = 1,
bool keepPreviousPath = false )

◆ processNewPose() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::processNewPose ( const geometry_msgs::msg::PoseStamped & odom)
virtual

odom callback: Updates the path - this must be called periodically for each odometry message.

processNewPose()

Definition at line 633 of file cp_odom_tracker.cpp.

634{
635 RCLCPP_INFO_THROTTLE(
636 getLogger(), *getNode()->get_clock(), 5000,
637 "[odom_tracker] processing odom msg update heartbeat");
638 std::lock_guard<std::mutex> lock(m_mutex_);
639
641
643 {
644 updateRecordPath(odom);
645 }
647 {
648 updateClearPath(odom);
649 }
650
651 // RCLCPP_WARN(getLogger(),"odomTracker odometry callback");
652 if (publishMessages)
653 {
654 rtPublishPaths(odom.header.stamp);
655 }
656
657 // RCLCPP_INFO(getLogger(),"odom_tracker m_mutex release");
658}
virtual bool updateRecordPath(const geometry_msgs::msg::PoseStamped &odom)
virtual bool updateClearPath(const geometry_msgs::msg::PoseStamped &odom)

References cl_nav2z::odom_tracker::CLEAR_PATH, smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), m_mutex_, publishMessages, cl_nav2z::odom_tracker::RECORD_PATH, rtPublishPaths(), updateClearPath(), updateConfiguration(), updateRecordPath(), and workingMode_.

Referenced by odomMessageCallback(), and update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ processNewPose() [2/2]

virtual void cl_nav2z::odom_tracker::CpOdomTracker::processNewPose ( const geometry_msgs::msg::PoseStamped & odom)
virtual

odom callback: Updates the path - this must be called periodically for each odometry message.

◆ pushPath() [1/4]

void cl_nav2z::odom_tracker::CpOdomTracker::pushPath ( )

◆ pushPath() [2/4]

void cl_nav2z::odom_tracker::CpOdomTracker::pushPath ( )

◆ pushPath() [3/4]

void cl_nav2z::odom_tracker::CpOdomTracker::pushPath ( std::string pathname)

Definition at line 217 of file cp_odom_tracker.cpp.

218{
219 RCLCPP_INFO(getLogger(), "odom_tracker m_mutex acquire, to push path");
220 std::lock_guard<std::mutex> lock(m_mutex_);
221
222 this->logStateString(false);
223 if (this->odomSub_ != nullptr && this->odomSub_->get_publisher_count() == 0)
224 {
225 RCLCPP_ERROR_STREAM(
226 getLogger(),
227 "[CpOdomTracker] Odom tracker cannot record the path because there is no publisher to the "
228 "odometry topic");
229 }
230
232 pathStack_.push_back(baseTrajectory_);
233
234 geometry_msgs::msg::PoseStamped goalPose;
235 if (this->currentMotionGoal_) goalPose = *this->currentMotionGoal_;
236
237 RCLCPP_INFO_STREAM(
238 getLogger(), "[CpOdomTracker] currentPathName: " << pathname
239 << " size: " << baseTrajectory_.poses.size()
240 << " current motion goal: " << goalPose);
241
242 currentPathName_ = pathname;
243
244 // clean the current trajectory to start a new one
245 baseTrajectory_.poses.clear();
246
247 this->logStateString(false);
249
250 this->currentMotionGoal_.reset();
251}

References baseTrajectory_, currentMotionGoal_, currentPathName_, smacc2::ISmaccComponent::getLogger(), logStateString(), m_mutex_, odomSub_, pathInfos_, pathStack_, and updateAggregatedStackPath().

Here is the call graph for this function:

◆ pushPath() [4/4]

void cl_nav2z::odom_tracker::CpOdomTracker::pushPath ( std::string pathname)

◆ rtPublishPaths() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::rtPublishPaths ( rclcpp::Time timestamp)
protectedvirtual

rtPublishPaths()

Definition at line 417 of file cp_odom_tracker.cpp.

418{
419 baseTrajectory_.header.stamp = timestamp;
421
422 aggregatedStackPathMsg_.header.stamp = timestamp;
424}

References aggregatedStackPathMsg_, baseTrajectory_, robotBasePathPub_, and robotBasePathStackedPub_.

Referenced by clearPath(), and processNewPose().

Here is the caller graph for this function:

◆ rtPublishPaths() [2/2]

virtual void cl_nav2z::odom_tracker::CpOdomTracker::rtPublishPaths ( rclcpp::Time timestamp)
protectedvirtual

◆ setCurrentMotionGoal() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::setCurrentMotionGoal ( const geometry_msgs::msg::PoseStamped & pose)

Definition at line 394 of file cp_odom_tracker.cpp.

395{
396 std::lock_guard<std::mutex> lock(m_mutex_);
397 this->currentMotionGoal_ = pose;
398}

References currentMotionGoal_, and m_mutex_.

Referenced by cl_nav2z::CbAbsoluteRotate::onEntry(), and cl_nav2z::CbNavigateForward::onEntry().

Here is the caller graph for this function:

◆ setCurrentMotionGoal() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::setCurrentMotionGoal ( const geometry_msgs::msg::PoseStamped & pose)

◆ setCurrentPathName() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::setCurrentPathName ( const std::string & currentPathName)

Definition at line 353 of file cp_odom_tracker.cpp.

354{
355 RCLCPP_INFO_STREAM(getLogger(), "[CpOdomTracker] set current path name: " << currentPathName);
356 currentPathName_ = currentPathName;
357}

References currentPathName_, and smacc2::ISmaccComponent::getLogger().

Here is the call graph for this function:

◆ setCurrentPathName() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::setCurrentPathName ( const std::string & currentPathName)

◆ setOdomFrame() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::setOdomFrame ( std::string odomFrame)
inline

Definition at line 119 of file cp_odom_tracker.hpp.

120 {
121 odomFrame_ = odomFrame;
122 getNode()->set_parameter(rclcpp::Parameter("odom_frame", odomFrame));
123 }

References smacc2::ISmaccComponent::getNode(), and odomFrame_.

Here is the call graph for this function:

◆ setOdomFrame() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::setOdomFrame ( std::string odomFrame)
inline

Definition at line 119 of file cp_odom_tracker.hpp.

120 {
121 odomFrame_ = odomFrame;
122 getNode()->set_parameter(rclcpp::Parameter("odom_frame", odomFrame));
123 }

References smacc2::ISmaccComponent::getNode(), and odomFrame_.

Here is the call graph for this function:

◆ setPublishMessages() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::setPublishMessages ( bool value)

setPublishMessages()

Definition at line 206 of file cp_odom_tracker.cpp.

207{
208 // RCLCPP_INFO(getLogger(),"odom_tracker m_mutex acquire");
209 std::lock_guard<std::mutex> lock(m_mutex_);
210 publishMessages = value;
211 // RCLCPP_INFO(getLogger(),"odom_tracker m_mutex release");
213}

References m_mutex_, publishMessages, and updateAggregatedStackPath().

Referenced by CpOdomTrackerActionServer::execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPublishMessages() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::setPublishMessages ( bool value)

◆ setStartPoint() [1/4]

void cl_nav2z::odom_tracker::CpOdomTracker::setStartPoint ( const geometry_msgs::msg::Pose & pose)

Definition at line 374 of file cp_odom_tracker.cpp.

375{
376 std::lock_guard<std::mutex> lock(m_mutex_);
377 RCLCPP_INFO_STREAM(getLogger(), "[CpOdomTracker] set current path starting point: " << pose);
378 geometry_msgs::msg::PoseStamped posestamped;
379 posestamped.header.frame_id = this->odomFrame_;
380 posestamped.header.stamp = getNode()->now();
381 posestamped.pose = pose;
382
383 if (baseTrajectory_.poses.size() > 0)
384 {
385 baseTrajectory_.poses[0] = posestamped;
386 }
387 else
388 {
389 baseTrajectory_.poses.push_back(posestamped);
390 }
392}

References baseTrajectory_, smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), m_mutex_, odomFrame_, and updateAggregatedStackPath().

Here is the call graph for this function:

◆ setStartPoint() [2/4]

void cl_nav2z::odom_tracker::CpOdomTracker::setStartPoint ( const geometry_msgs::msg::Pose & pose)

◆ setStartPoint() [3/4]

void cl_nav2z::odom_tracker::CpOdomTracker::setStartPoint ( const geometry_msgs::msg::PoseStamped & pose)

Definition at line 359 of file cp_odom_tracker.cpp.

360{
361 std::lock_guard<std::mutex> lock(m_mutex_);
362 RCLCPP_INFO_STREAM(getLogger(), "[CpOdomTracker] set current path starting point: " << pose);
363 if (baseTrajectory_.poses.size() > 0)
364 {
365 baseTrajectory_.poses[0] = pose;
366 }
367 else
368 {
369 baseTrajectory_.poses.push_back(pose);
370 }
372}

References baseTrajectory_, smacc2::ISmaccComponent::getLogger(), m_mutex_, and updateAggregatedStackPath().

Referenced by cl_nav2z::CbAbsoluteRotate::onEntry(), cl_nav2z::CbNavigateBackwards::onEntry(), cl_nav2z::CbNavigateForward::onEntry(), cl_nav2z::CbNavigateGlobalPosition::onEntry(), cl_nav2z::CbRotate::onEntry(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setStartPoint() [4/4]

void cl_nav2z::odom_tracker::CpOdomTracker::setStartPoint ( const geometry_msgs::msg::PoseStamped & pose)

◆ setWorkingMode() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::setWorkingMode ( WorkingMode workingMode)

setWorkingMode()

Definition at line 161 of file cp_odom_tracker.cpp.

162{
163 std::lock_guard<std::mutex> lock(m_mutex_);
164
165 switch (workingMode)
166 {
168 RCLCPP_INFO_STREAM(
169 getLogger(),
170 "[CpOdomTracker] setting working mode to RECORD - record_point_distance_threshold: "
172 << ", record_angular_distance_threshold: " << recordAngularDistanceThreshold_);
173 break;
175 RCLCPP_INFO_STREAM(
176 getLogger(),
177 "[CpOdomTracker] setting working mode to CLEAR - clear_point_distance_threshold: "
179 << ", clear_angular_distance_threshold: " << clearAngularDistanceThreshold_);
180 break;
182 RCLCPP_INFO_STREAM(getLogger(), "[CpOdomTracker] setting working mode to IDLE");
183 break;
184 default:
185
186 RCLCPP_INFO_STREAM(getLogger(), "[CpOdomTracker] setting working mode to <UNKNOWN>");
187 }
188
189 if (this->odomSub_ != nullptr && this->odomSub_->get_publisher_count() == 0)
190 {
191 RCLCPP_ERROR_STREAM(
192 getLogger(),
193 "[CpOdomTracker] Odom tracker cannot record the path because there is no publisher to the "
194 "odometry topic");
195 }
196
197 workingMode_ = workingMode;
198 // RCLCPP_INFO(getLogger(),"odom_tracker m_mutex release");
199}

References cl_nav2z::odom_tracker::CLEAR_PATH, clearAngularDistanceThreshold_, clearPointDistanceThreshold_, smacc2::ISmaccComponent::getLogger(), cl_nav2z::odom_tracker::IDLE, m_mutex_, odomSub_, cl_nav2z::odom_tracker::RECORD_PATH, recordAngularDistanceThreshold_, recordPointDistanceThreshold_, and workingMode_.

Referenced by CpOdomTrackerActionServer::execute(), cl_nav2z::CbAbsoluteRotate::onEntry(), cl_nav2z::CbNavigateBackwards::onEntry(), cl_nav2z::CbNavigateForward::onEntry(), cl_nav2z::CbNavigateGlobalPosition::onEntry(), cl_nav2z::CbRotate::onEntry(), cl_nav2z::CbUndoPathBackwards::onEntry(), cl_nav2z::CbNavigateBackwards::onExit(), cl_nav2z::CbNavigateForward::onExit(), and cl_nav2z::CpWaypointNavigator::sendNextGoal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setWorkingMode() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::setWorkingMode ( WorkingMode workingMode)

◆ update() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::update ( )
virtual

update()

Definition at line 605 of file cp_odom_tracker.cpp.

606{
607 RCLCPP_INFO(getLogger(), "odom_tracker update");
608 auto pose = robotPose_->toPoseStampedMsg();
609 RCLCPP_INFO(getLogger(), "odom tracker updatd pose, frame: %s", pose.header.frame_id.c_str());
610 processNewPose(pose);
611 RCLCPP_INFO(getLogger(), "odom_tracker update end");
612}
geometry_msgs::msg::PoseStamped toPoseStampedMsg()
Definition cp_pose.hpp:63

References smacc2::ISmaccComponent::getLogger(), processNewPose(), robotPose_, and cl_nav2z::CpPose::toPoseStampedMsg().

Referenced by onInitialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update() [2/2]

virtual void cl_nav2z::odom_tracker::CpOdomTracker::update ( )
virtual

◆ updateAggregatedStackPath() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::updateAggregatedStackPath ( )
protected

Definition at line 426 of file cp_odom_tracker.cpp.

427{
428 aggregatedStackPathMsg_.poses.clear();
429 for (auto & p : pathStack_)
430 {
431 aggregatedStackPathMsg_.poses.insert(
432 aggregatedStackPathMsg_.poses.end(), p.poses.begin(), p.poses.end());
433 }
434
435 aggregatedStackPathMsg_.header.frame_id = this->odomFrame_;
436}

References aggregatedStackPathMsg_, odomFrame_, and pathStack_.

Referenced by clearPath(), popPath(), pushPath(), setPublishMessages(), setStartPoint(), and setStartPoint().

Here is the caller graph for this function:

◆ updateAggregatedStackPath() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::updateAggregatedStackPath ( )
protected

◆ updateClearPath() [1/2]

bool cl_nav2z::odom_tracker::CpOdomTracker::updateClearPath ( const geometry_msgs::msg::PoseStamped & base_pose)
protectedvirtual

updateBackward()

Track robot base pose

Not removing point because it is enough far from the last cord point

Track robot base pose

Not removing point because it is enough far from the last cord point

Definition at line 443 of file cp_odom_tracker.cpp.

444{
445 // we initially accept any message if the queue is empty
447 baseTrajectory_.header = base_pose.header;
448
449 bool acceptBackward = false;
450 bool clearingError = false;
451 bool finished = false;
452
453 while (!finished)
454 {
455 if (
456 baseTrajectory_.poses.size() <=
457 1) // we at least keep always the first point of the forward path when clearing
458 // (this is important for backwards planner replanning and not losing the
459 // last goal)
460 {
461 acceptBackward = false;
462 finished = true;
463 }
464 else
465 {
466 auto & carrotPose = baseTrajectory_.poses.back().pose;
467 auto & carrotPoint = carrotPose.position;
468
469 double carrotAngle = tf2::getYaw(carrotPose.orientation);
470
471 auto & currePose = base_pose.pose;
472 auto & currePoint = currePose.position;
473 double currentAngle = tf2::getYaw(currePose.orientation);
474
475 double lastpointdist = p2pDistance(carrotPoint, currePoint);
476 double goalAngleOffset = fabs(angles::shortest_angular_distance(carrotAngle, currentAngle));
477
478 acceptBackward = !baseTrajectory_.poses.empty() &&
479 lastpointdist < clearPointDistanceThreshold_ &&
480 goalAngleOffset < clearAngularDistanceThreshold_;
481
482 clearingError = lastpointdist > 2 * clearPointDistanceThreshold_;
483 RCLCPP_DEBUG_STREAM(
484 getLogger(), "[CpOdomTracker] clearing (accepted: " << acceptBackward
485 << ") linerr: " << lastpointdist
486 << ", anglerr: " << goalAngleOffset);
487 }
488
489 // RCLCPP_INFO(getLogger(),"Backwards, last distance: %lf < %lf accept: %d", dist,
490 // minPointDistanceBackwardThresh_, acceptBackward);
491 if (
492 acceptBackward &&
493 baseTrajectory_.poses.size() > 1) /* we always leave at least one item, specially interesting
494 for the backward local planner reach
495 the backwards goal with enough precision*/
496 {
497 baseTrajectory_.poses.pop_back();
498 }
499 else if (clearingError)
500 {
501 finished = true;
502 RCLCPP_WARN(getLogger(), "[CpOdomTracker] Incorrect odom clearing motion.");
503 }
504 else
505 {
506 finished = true;
508 }
509 }
510
511 return acceptBackward;
512}
double p2pDistance(const geometry_msgs::msg::Point &p1, const geometry_msgs::msg::Point &p2)

References baseTrajectory_, clearAngularDistanceThreshold_, clearPointDistanceThreshold_, smacc2::ISmaccComponent::getLogger(), and cl_nav2z::odom_tracker::p2pDistance().

Referenced by processNewPose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateClearPath() [2/2]

virtual bool cl_nav2z::odom_tracker::CpOdomTracker::updateClearPath ( const geometry_msgs::msg::PoseStamped & odom)
protectedvirtual

◆ updateConfiguration() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::updateConfiguration ( )
protected

reconfigCB()

Definition at line 574 of file cp_odom_tracker.cpp.

575{
576 return;
577
578 if (!getNode()->get_parameter("odom_frame", this->odomFrame_))
579 {
580 }
581
582 if (!getNode()->get_parameter("record_point_distance_threshold", recordPointDistanceThreshold_))
583 {
584 }
585
586 if (!getNode()->get_parameter(
587 "record_angular_distance_threshold", recordAngularDistanceThreshold_))
588 {
589 }
590
591 if (!getNode()->get_parameter("clear_point_distance_threshold", clearPointDistanceThreshold_))
592 {
593 }
594
595 if (!getNode()->get_parameter("clear_angular_distance_threshold", clearAngularDistanceThreshold_))
596 {
597 }
598}

References clearAngularDistanceThreshold_, clearPointDistanceThreshold_, smacc2::ISmaccComponent::getNode(), odomFrame_, recordAngularDistanceThreshold_, and recordPointDistanceThreshold_.

Referenced by processNewPose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateConfiguration() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::updateConfiguration ( )
protected

◆ updateParameters() [1/2]

void cl_nav2z::odom_tracker::CpOdomTracker::updateParameters ( )

◆ updateParameters() [2/2]

void cl_nav2z::odom_tracker::CpOdomTracker::updateParameters ( )

◆ updateRecordPath() [1/2]

bool cl_nav2z::odom_tracker::CpOdomTracker::updateRecordPath ( const geometry_msgs::msg::PoseStamped & base_pose)
protectedvirtual

updateRecordPath()

Track robot base pose

Track robot base pose

Definition at line 519 of file cp_odom_tracker.cpp.

520{
522 baseTrajectory_.header = base_pose.header;
523
524 bool enqueueOdomMessage = false;
525
526 double dist = -1;
527 if (baseTrajectory_.poses.empty())
528 {
529 enqueueOdomMessage = true;
530 }
531 else
532 {
533 const auto & prevPose = baseTrajectory_.poses.back().pose;
534 const geometry_msgs::msg::Point & prevPoint = prevPose.position;
535 double prevAngle = tf2::getYaw(prevPose.orientation);
536
537 const geometry_msgs::msg::Point & currePoint = base_pose.pose.position;
538 double currentAngle = tf2::getYaw(base_pose.pose.orientation);
539
540 dist = p2pDistance(prevPoint, currePoint);
541 double goalAngleOffset = fabs(angles::shortest_angular_distance(prevAngle, currentAngle));
542
543 // RCLCPP_WARN(getLogger(),"dist %lf vs min %lf", dist, recordPointDistanceThreshold_);
544
545 RCLCPP_WARN_THROTTLE(getLogger(), *getNode()->get_clock(), 2000, "odom received");
546
548 {
549 enqueueOdomMessage = true;
550 }
551 else
552 {
553 // RCLCPP_WARN(getLogger(),"skip odom, dist: %lf", dist);
554 enqueueOdomMessage = false;
555 }
556 }
557
558 if (enqueueOdomMessage)
559 {
560 RCLCPP_WARN_THROTTLE(
561 getLogger(), *getNode()->get_clock(), 2000, "enqueue odom tracker pose. dist %lf vs min %lf",
563 baseTrajectory_.poses.push_back(base_pose);
564 }
565
566 return enqueueOdomMessage;
567}

References baseTrajectory_, smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), cl_nav2z::odom_tracker::p2pDistance(), recordAngularDistanceThreshold_, and recordPointDistanceThreshold_.

Referenced by processNewPose().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateRecordPath() [2/2]

virtual bool cl_nav2z::odom_tracker::CpOdomTracker::updateRecordPath ( const geometry_msgs::msg::PoseStamped & odom)
protectedvirtual

Member Data Documentation

◆ aggregatedStackPathMsg_

nav_msgs::msg::Path cl_nav2z::odom_tracker::CpOdomTracker::aggregatedStackPathMsg_
protected

Definition at line 188 of file cp_odom_tracker.hpp.

Referenced by rtPublishPaths(), and updateAggregatedStackPath().

◆ baseTrajectory_

nav_msgs::msg::Path cl_nav2z::odom_tracker::CpOdomTracker::baseTrajectory_
protected

Processed path for the mouth of the reel.

Definition at line 174 of file cp_odom_tracker.hpp.

Referenced by clearPath(), getPath(), logStateString(), popPath(), pushPath(), rtPublishPaths(), setStartPoint(), setStartPoint(), updateClearPath(), and updateRecordPath().

◆ clearAngularDistanceThreshold_

double cl_nav2z::odom_tracker::CpOdomTracker::clearAngularDistanceThreshold_
protected

◆ clearPointDistanceThreshold_

double cl_nav2z::odom_tracker::CpOdomTracker::clearPointDistanceThreshold_
protected

◆ currentMotionGoal_

std::optional< geometry_msgs::msg::PoseStamped > cl_nav2z::odom_tracker::CpOdomTracker::currentMotionGoal_
protected

◆ currentPathName_

std::string cl_nav2z::odom_tracker::CpOdomTracker::currentPathName_
protected

Definition at line 193 of file cp_odom_tracker.hpp.

Referenced by logStateString(), pushPath(), and setCurrentPathName().

◆ m_mutex_

std::mutex cl_nav2z::odom_tracker::CpOdomTracker::m_mutex_
protected

◆ odomFrame_

std::string cl_nav2z::odom_tracker::CpOdomTracker::odomFrame_
protected

◆ odomSub_

rclcpp::Subscription< nav_msgs::msg::Odometry >::SharedPtr cl_nav2z::odom_tracker::CpOdomTracker::odomSub_
protected

Definition at line 147 of file cp_odom_tracker.hpp.

Referenced by logStateString(), onInitialize(), popPath(), pushPath(), and setWorkingMode().

◆ odomTopicName_

std::string cl_nav2z::odom_tracker::CpOdomTracker::odomTopicName_
protected

Definition at line 167 of file cp_odom_tracker.hpp.

Referenced by CpOdomTracker(), and onInitialize().

◆ param_callback_handle_

rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr cl_nav2z::odom_tracker::CpOdomTracker::param_callback_handle_
protected

Definition at line 198 of file cp_odom_tracker.hpp.

Referenced by onInitialize().

◆ pathInfos_

std::vector< PathInfo > cl_nav2z::odom_tracker::CpOdomTracker::pathInfos_
protected

Definition at line 186 of file cp_odom_tracker.hpp.

Referenced by logStateString(), popPath(), and pushPath().

◆ pathStack_

std::vector< nav_msgs::msg::Path > cl_nav2z::odom_tracker::CpOdomTracker::pathStack_
protected

Definition at line 178 of file cp_odom_tracker.hpp.

Referenced by logStateString(), popPath(), pushPath(), and updateAggregatedStackPath().

◆ publishMessages

bool cl_nav2z::odom_tracker::CpOdomTracker::publishMessages
protected

Definition at line 171 of file cp_odom_tracker.hpp.

Referenced by CpOdomTracker(), processNewPose(), and setPublishMessages().

◆ recordAngularDistanceThreshold_

double cl_nav2z::odom_tracker::CpOdomTracker::recordAngularDistanceThreshold_
protected

◆ recordPointDistanceThreshold_

double cl_nav2z::odom_tracker::CpOdomTracker::recordPointDistanceThreshold_
protected

How much distance there is between two points of the path.

Definition at line 154 of file cp_odom_tracker.hpp.

Referenced by onInitialize(), parametersCallback(), setWorkingMode(), updateConfiguration(), and updateRecordPath().

◆ robotBasePathPub_

rclcpp::Publisher< nav_msgs::msg::Path >::SharedPtr cl_nav2z::odom_tracker::CpOdomTracker::robotBasePathPub_
protected

Definition at line 141 of file cp_odom_tracker.hpp.

Referenced by onInitialize(), and rtPublishPaths().

◆ robotBasePathStackedPub_

rclcpp::Publisher< nav_msgs::msg::Path >::SharedPtr cl_nav2z::odom_tracker::CpOdomTracker::robotBasePathStackedPub_
protected

Definition at line 142 of file cp_odom_tracker.hpp.

Referenced by onInitialize(), and rtPublishPaths().

◆ robotPose_ [1/2]

cl_nav2z::CpPose* cl_nav2z::odom_tracker::CpOdomTracker::robotPose_
protected

Definition at line 149 of file cp_odom_tracker.hpp.

Referenced by onInitialize(), and update().

◆ robotPose_ [2/2]

cl_nav2z::Pose* cl_nav2z::odom_tracker::CpOdomTracker::robotPose_
protected

Definition at line 149 of file cp_odom_tracker.hpp.

◆ robotPoseTimer_

rclcpp::TimerBase::SharedPtr cl_nav2z::odom_tracker::CpOdomTracker::robotPoseTimer_
protected

Definition at line 150 of file cp_odom_tracker.hpp.

Referenced by onInitialize().

◆ strategy_

OdomTrackerStrategy cl_nav2z::odom_tracker::CpOdomTracker::strategy_
protected

Definition at line 190 of file cp_odom_tracker.hpp.

Referenced by onInitialize().

◆ workingMode_

WorkingMode cl_nav2z::odom_tracker::CpOdomTracker::workingMode_
protected

Definition at line 176 of file cp_odom_tracker.hpp.

Referenced by CpOdomTracker(), processNewPose(), and setWorkingMode().


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