range_sensor_layer error
Hi all, I am using four sonar sensor and Hokuyo laser for navigation. I am using rangesensorlayer for sonar sensor. The problem is when I publish the sensormsgs/Range message and use the rangesensor_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 sonaronerange.
tf tree: link text
costmapcommonparams.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
localcostmapparams.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"}
globalcostmapparams.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
sonaronerange 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.
Asked by ahanaga on 2016-09-15 01:44:54 UTC
Comments
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?Asked by Mark Rose on 2016-09-15 18:08:45 UTC
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?Asked by Mark Rose on 2016-09-15 18:10:26 UTC
Thanks for your reply. I modified my rate, so now It's ok.
Asked by ahanaga on 2016-09-15 20:46:23 UTC
I am having this same issue. Is there a more detailed description of what you did to fix the problem?
Asked by Tyrel on 2019-04-02 11:01:00 UTC
@Tyrel how did you fix this?
Asked by femitof on 2020-05-17 23:46:02 UTC
@ahanaga how did modify your rate?
Asked by femitof on 2020-05-18 21:40:46 UTC
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)
Asked by Darshan K T on 2020-10-26 06:14:08 UTC