-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
Required Info:
-
Operating System: Ubuntu 20.04
-
ROS2 Version: Galactic binaries
-
Version or commit hash: 1.08
-
DDS implementation: Default
Steps to reproduce issue
- Add some range sensor to the gazebo model
- Add a RangeSensorLayer plugin to the local costmap
- Run the simulation
- You should get the messages "Range sensor layer can't transform from odom to range_sensor_link" sometime in the terminal.
Expected behavior
It should have a similar behavior than the "ObstacleLayer" pluging when dealing with the update rate of the odom->base_footprint frame instead.
Actual behavior
It seem that the range messages that can't have a transform from odom to range_sensor_link are discarded.
Additional information
I add to the range_sensor_layer.cpp a fallback canTransform check for the latest tranform in the range sensor layer for my test and it did seem to work well, but I know this is probably not a good solution as the transforms can be wrong if they are too old.
if (!tf_->canTransform(
in.header.frame_id, global_frame_, tf2_ros::fromMsg(in.header.stamp)))
{
if (!tf_->canTransform(
in.header.frame_id, global_frame_, rclcpp::Time()))
{
RCLCPP_INFO(
logger_, "Range sensor layer can't transform from %s to %s",
global_frame_.c_str(), in.header.frame_id.c_str());
return;
}
}