Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…tion#3070)

* forward porting ros-navigation#3053

* adding TF warning suggestion

(cherry picked from commit bb0d177)

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
  • Loading branch information
2 people authored and hodgespodge committed Sep 12, 2022
1 parent 4e186fa commit 83d592a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nav2_costmap_2d/plugins/range_sensor_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ void RangeSensorLayer::updateCostmap(
in.header.frame_id = range_message.header.frame_id;

if (!tf_->canTransform(
in.header.frame_id, global_frame_, tf2_ros::fromMsg(in.header.stamp)))
in.header.frame_id, global_frame_,
tf2_ros::fromMsg(in.header.stamp),
tf2_ros::fromRclcpp(transform_tolerance_)))
{
RCLCPP_INFO(
logger_, "Range sensor layer can't transform from %s to %s",
Expand Down
1 change: 1 addition & 0 deletions nav2_costmap_2d/test/integration/range_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class TestNode : public ::testing::Test
: node_(std::make_shared<TestLifecycleNode>("range_test_node")),
tf_(node_->get_clock())
{
tf_.setUsingDedicatedThread(true);
// Standard non-plugin specific parameters
node_->declare_parameter("map_topic", rclcpp::ParameterValue(std::string("map")));
node_->declare_parameter("track_unknown_space", rclcpp::ParameterValue(false));
Expand Down

0 comments on commit 83d592a

Please sign in to comment.