range_sensor_layer can't transform from map to /us1
Hi all,
I am using Ultrasound sensors and Hokuyo laser for navigation. I am using rangesensorlayer for ultrasound sensors. The problem is when I publish the sensor_msgs/Range
message and use the rangesensorlayer, I get the following error:
[ERROR] [1431956010.233195664]: Range sensor layer can't transform from map to /us1 at 1431956010.107522
I am using static_transform_publisher
for the transformation between /base_link
and /us1
:
<node pkg="tf" type="static_transform_publisher" name="base_link_US1" args="0.28 0.12 0.53 1.57 0.0 0.0 /base_link /us1 100" />
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 map to /us1:
globalcostmapparams.yaml
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
- {name: sonar_layer, type: "range_sensor_layer::RangeSensorLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
#Configuration for the sensors that the costmap will use to update a map
obstacle_layer:
observation_sources: laser_scan_sensor
laser_scan_sensor: {data_type: LaserScan, sensor_frame: /laser, topic: /scan, expected_update_rate: 0.4,
observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 2.0, min_obstacle_height: 0.0, inf_is_valid: true}
sonar_layer:
topics: ['/US1']
no_readings_timeout: 1.0
clear_threshold: 0.2
mark_threshold: 0.8
clear_on_max_reading: true
localcostmapparams.yaml
plugins:
- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
- {name: sonar_layer, type: "range_sensor_layer::RangeSensorLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
#Configuration for the sensors that the costmap will use to update a map
obstacle_layer:
observation_sources: laser_scan_sensor
laser_scan_sensor: {data_type: LaserScan, sensor_frame: /laser, topic: /scan, expected_update_rate: 0.4,
observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 2.0, min_obstacle_height: 0.0, inf_is_valid: true}
sonar_layer:
topics: ['/US1']
no_readings_timeout: 1.0
clear_threshold: 0.2
mark_threshold: 0.8
clear_on_max_reading: true
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.
Thanks a lot.
Naman Kumar
Asked by Naman on 2015-05-18 08:41:31 UTC
Answers
I have exactly the same problem... I added the static transform publisher for the sonar position and in my custom sonar publisher node I set "sonar_link" as the frame_id for the message, but I still get that error. Range Sensor Layer should look for "base_link --> sonar_link" instead of "odom --> sonar_link".
Asked by GuidoBartoli on 2016-01-04 09:29:37 UTC
Comments
Sounds like a new question, but please add details, e.g. tf tree and a sample range message output
Also make sure your tf frequency is at least 20Hz
Asked by Humpelstilzchen on 2016-01-04 11:39:46 UTC
I got this issue when I set the shutdown_costmaps to true. So it deactivate all layers include range_sensor_layer. Because the range_sensor_layer didn't implement the deactivate & activate function, so the buffer are getting bigger when it inactive. And also it try to find for transform in the past when it's back to active.
Asked by Krit on 2016-12-19 20:12:28 UTC
Comments