Ask Your Question
2

range_sensor_layer can't transform from map to /us1 [closed]

asked 2015-05-18 08:41:31 -0500

Naman gravatar image

updated 2015-05-18 08:44:24 -0500

Hi all,

I am using Ultrasound sensors and Hokuyo laser for navigation. I am using range_sensor_layer for ultrasound sensors. The problem is when I publish the sensor_msgs/Range message and use the range_sensor_layer, 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:

image description

global_costmap_params.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

local_costmap_params.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

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2017-04-30 03:05:57.986062

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-01-04 08:29:37 -0500

GuidoBartoli gravatar image

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".

edit flag offensive delete link more

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

Humpelstilzchen gravatar imageHumpelstilzchen ( 2016-01-04 10:39:46 -0500 )edit
0

answered 2016-12-19 19:12:28 -0500

Krit gravatar image

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.

edit flag offensive delete link more

Question Tools

4 followers

Stats

Asked: 2015-05-18 08:41:31 -0500

Seen: 1,014 times

Last updated: Jan 04 '16