Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nav2_bt_navigator/include/nav2_bt_navigator/bt_navigator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ class BtNavigator : public nav2_util::LifecycleNode
std::string robot_frame_;
std::string global_frame_;
double transform_tolerance_;
std::string odom_topic_;


// Spinning transform that can be used by the BT nodes
std::shared_ptr<tf2_ros::Buffer> tf_;
Expand Down
4 changes: 2 additions & 2 deletions nav2_bt_navigator/src/bt_navigator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ BtNavigator::on_configure(const rclcpp_lifecycle::State & /*state*/)
global_frame_ = get_parameter("global_frame").as_string();
robot_frame_ = get_parameter("robot_base_frame").as_string();
transform_tolerance_ = get_parameter("transform_tolerance").as_double();

odom_topic_ = get_parameter("odom_topic").as_string();
// Libraries to pull plugins (BT Nodes) from
auto plugin_lib_names = get_parameter("plugin_lib_names").as_string_array();

Expand All @@ -120,7 +120,7 @@ BtNavigator::on_configure(const rclcpp_lifecycle::State & /*state*/)
}

// Odometry smoother object for getting current speed
odom_smoother_ = std::make_unique<nav2_util::OdomSmoother>(shared_from_this(), 0.3);
odom_smoother_ = std::make_unique<nav2_util::OdomSmoother>(shared_from_this(), 0.3, odom_topic_);

return nav2_util::CallbackReturn::SUCCESS;
}
Expand Down