range_sensor_layer error [closed]
Hi all, I am using four sonar sensor and Hokuyo laser for navigation. I am using range_sensor_layer for sonar sensor. The problem is when I publish the sensor_msgs/Range message and use the range_sensor_layer, I get the following error:
[ERROR] [1473920347.325424279]: Range sensor layer can't transform from odom to sonar_one_range at 1473920347.167207
I am not able to see why am I getting this error as the tf tree is properly set up and there is a transformation from odom to sonar_one_range.
tf tree: link text
costmap_common_params.yaml
obstacle_range: 3.0
raytrace_range: 3.0
footprint: [[0.30, 0.0], [0.30,-0.25], [0.0, -0.25], [-0.30, -0.25], [-0.30,0.0], [-0.30, 0.25], [0.0, 0.25], [0.30, 0.25]]
#robot_radius: 0.5
inflation_radius: 0.2
max_obstacle_height: 0.6
min_obstacle_height: 0.0
obstacle_layer:
observation_sources: scan
scan:
data_type: LaserScan
topic: scan
marking: true
clearing: true
expected_update_rate: 0.0
observation_persistence: 0.0
range_sensor_layer:
ns: /sensors/sonar_sensor
topics: ["sonar_one_range","sonar_two_range","sonar_three_range","sonar_four_range"]
no_readings_timeout: 0.0
clear_threshold: 2.0
mark_threshold: 8.0
clear_on_max_reading: true
local_costmap_params.yaml
local_costmap:
global_frame: /odom
robot_base_frame: /base_link
update_frequency: 2.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 2.0
height: 2.0
resolution: 0.1
transform_tolerance: 1.0
plugins:
- {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
- {name: range_sensor_layer, type: "range_sensor_layer::RangeSensorLayer"}
global_costmap_params.yaml
global_costmap:
map_type: costmap
global_frame: /map
robot_base_frame: /base_link
update_frequency: 3.0
publish_frequency: 3.0
static_map: true
rolling_window: false
resolution: 0.1
transform_tolerance: 1.0
sonar_one_range message:
---
header:
seq: 2
stamp:
secs: 1473931687
nsecs: 574187994
frame_id: sonar_one_range
radiation_type: 1
field_of_view: 0.05
min_range: 0.15000000596
max_range: 6.0
range: 0.319999992847
---
Does anyone have any idea what is going wrong here? Please let me know if you need more information from me. Any help will be appreciated.
Certainly, from the error message,
range_sensor_layer
cannot find an appropriate transform. Many things could be wrong: 1) typo in one of the frame names, 2) transformation isn't current enough, 2) rate of publishing tf, etc. Are you using URDF to describe your frames?And how are your publishing the transforms? The
odom
tobase_link
transform should be published by your odometry components. Transformations frombase_link
to sensor frames use usually done via URDF,robot_state_publisher
, andjoint_state_publisher
. Are you using those or something else?Thanks for your reply. I modified my rate, so now It's ok.
I am having this same issue. Is there a more detailed description of what you did to fix the problem?
@Tyrel how did you fix this?
@ahanaga how did modify your rate?
Go inside the /sonar topic publishing script and increasing the rate of publishing inside while loop.
Ex: Inside while loop, rospy.sleep(1) change to rospy.sleep(0.1)