Skip to content

Commit 83a9d50

Browse files
committed
controller server publisher fix
Signed-off-by: silanus23 <[email protected]>
1 parent 7a587ed commit 83a9d50

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nav2_controller/include/nav2_controller/controller_server.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ class ControllerServer : public nav2::LifecycleNode
173173
* @param velocity Twist velocity to be published
174174
*/
175175
void publishVelocity(const geometry_msgs::msg::TwistStamped & velocity);
176+
/**
177+
* @brief Calculates and publishes the TrackingError's all components
178+
*/
179+
void publishTrackingState();
176180
/**
177181
* @brief Calls velocity publisher to publish zero velocity
178182
*/
@@ -237,6 +241,7 @@ class ControllerServer : public nav2::LifecycleNode
237241
std::unique_ptr<nav2_util::OdomSmoother> odom_sub_;
238242
std::unique_ptr<nav2_util::TwistPublisher> vel_publisher_;
239243
nav2::Subscription<nav2_msgs::msg::SpeedLimit>::SharedPtr speed_limit_sub_;
244+
rclcpp::Publisher<nav2_msgs::msg::TrackingError>::SharedPtr tracking_error_pub_;
240245

241246
// Progress Checker Plugin
242247
pluginlib::ClassLoader<nav2_core::ProgressChecker> progress_checker_loader_;
@@ -269,6 +274,8 @@ class ControllerServer : public nav2::LifecycleNode
269274
double min_x_velocity_threshold_;
270275
double min_y_velocity_threshold_;
271276
double min_theta_velocity_threshold_;
277+
double search_window_;
278+
int start_index_;
272279

273280
double failure_tolerance_;
274281
bool use_realtime_priority_;

0 commit comments

Comments
 (0)