File tree Expand file tree Collapse file tree
include/nav2_bt_navigator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ class BtNavigator : public nav2_util::LifecycleNode
9595 std::string robot_frame_;
9696 std::string global_frame_;
9797 double transform_tolerance_;
98+ std::string odom_topic_;
9899
99100 // Spinning transform that can be used by the BT nodes
100101 std::shared_ptr<tf2_ros::Buffer> tf_;
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ BtNavigator::on_configure(const rclcpp_lifecycle::State & /*state*/)
9393 global_frame_ = get_parameter (" global_frame" ).as_string ();
9494 robot_frame_ = get_parameter (" robot_base_frame" ).as_string ();
9595 transform_tolerance_ = get_parameter (" transform_tolerance" ).as_double ();
96+ odom_topic_ = get_parameter (" odom_topic" ).as_string ();
9697
9798 // Libraries to pull plugins (BT Nodes) from
9899 auto plugin_lib_names = get_parameter (" plugin_lib_names" ).as_string_array ();
@@ -119,7 +120,7 @@ BtNavigator::on_configure(const rclcpp_lifecycle::State & /*state*/)
119120 }
120121
121122 // Odometry smoother object for getting current speed
122- odom_smoother_ = std::make_unique<nav2_util::OdomSmoother>(shared_from_this (), 0.3 );
123+ odom_smoother_ = std::make_unique<nav2_util::OdomSmoother>(shared_from_this (), 0.3 , odom_topic_ );
123124
124125 return nav2_util::CallbackReturn::SUCCESS;
125126}
You can’t perform that action at this time.
0 commit comments