Trouble adding observation_sources to obstacle_layer
Hi folks, currently I have a depth camera so I use depthimage_to_laserscan package so that I can add depth camera's data to my move_base costmap. The depthimage_to_laserscan works fine but it seems like move_base doesn't subscribe to the laserscan topic from depthimage_to_laserscan. Anyone has the same experiment? Please give me some advice, thank you! Here is my common_costmap file
max_obstacle_height: 0.6
obstacle_range: 2.5
raytrace_range: 0.5
footprint: [[0.4, -0.3], [0.4, 0.3], [-0.32, 0.3], [-0.32, -0.3]]
footprint_clearing_enabled: True
obstacle_layer:
enabled: true
observation_sources: laser_scan_sensor camera_depth
laser_scan_sensor: {sensor_frame: base_link, data_type: LaserScan, topic: /scan_multi, marking: true, clearing: true}
camera_depth: {sensor_frame: camera_depth_frame, data_type: LaserScan, topic: /scan, marking: true, clearing: true}
inflation_layer:
enabled: true
cost_scaling_factor: 5
inflation_radius: 0.05
My rqt_graph:
As you can see, move_base subscribes to scan_multi but doesn't subscribes to scan. But in the terminal when I launch move_base, it gives me this output:
* /move_base_te/local_costmap/obstacle_layer/camera_depth/clearing: True
* /move_base_te/local_costmap/obstacle_layer/camera_depth/data_type: LaserScan
* /move_base_te/local_costmap/obstacle_layer/camera_depth/marking: True
* /move_base_te/local_costmap/obstacle_layer/camera_depth/sensor_frame: camera_depth_frame
* /move_base_te/local_costmap/obstacle_layer/camera_depth/topic: /scan
* /move_base_te/local_costmap/obstacle_layer/enabled: True
* /move_base_te/local_costmap/obstacle_layer/laser_scan_sensor/clearing: True
* /move_base_te/local_costmap/obstacle_layer/laser_scan_sensor/data_type: LaserScan
* /move_base_te/local_costmap/obstacle_layer/laser_scan_sensor/marking: True
* /move_base_te/local_costmap/obstacle_layer/laser_scan_sensor/sensor_frame: base_link
* /move_base_te/local_costmap/obstacle_layer/laser_scan_sensor/topic: /scan_multi
* /move_base_te/local_costmap/obstacle_layer/observation_sources: laser_scan_sensor...
* /move_base_te/local_costmap/obstacle_layer/obstacle_range: 3.0
* /move_base_te/local_costmap/obstacle_layer/raytrace_range: 3.5
Looks like all my parameters is loaded, this is really confusing.
What does your other configs look like? Example see here. And your depthimage_to_laswerscan launch/config. a "rosparam dump" might also be of interest.
Does it work when you enable camera_depth?
It would also be interesting if it works if only camera_depth is used as an observation source. I seen people use a special node to combine multiple scans into one before giving it to move_base. It will definitely work if you give a pointcloud2 to move_base obstacle layer.
Sorry I wanted to write "enable only camera_depth"
@zuy I don't understand this setup.
I would expect camera_depth_to_scan to be a separate ros node which subscribes to camera depth data, and publishes to topic
/scan
. Then the costmap would subscribe to the/scan
topic.Please provide a url that describes this
camera_depth
plugin that you are specifying in the costmap config.