can't use laserscan and range sensor simultaneously
Here is the common costmap parameter for my robot:
obstacle_range: 3.0
raytrace_range: 3.5
footprint: [[-0.25,-0.25],[-0.25,0.25],[0.37,0.25],[0.37,-0.25]]
# robot_radius: 0.25
inflation_radius: 1.0
cost_scaling_factor: 20.0
map_type: costmap
observation_sources: scan
scan: {sensor_frame: camera_depth_virtual_frame, data_type: LaserScan, topic: depth/scan_filtered, marking: true, clearing: true}
plugins:
- {name: ultrasonic, ns: "ultrasonic", topics: ["ir_back", "ir_front"], type: "range_sensor_layer::RangeSensorLayer"}
Here when i remove the plugins the move base is subscribing to the laserscan topic but when i add the plugin at same time their is issue in move base that it is not subscribing to the ir_back and front topic.
common costmap fro both localcostmap: and globalcostsmap:
obstacle_range: 3.0
raytrace_range: 3.5
footprint: [[-0.25,-0.25],[-0.25,0.25],[0.37,0.25],[0.37,-0.25]]
# robot_radius: 0.25
footprint_padding: 0.05
inflation_radius: 1.0
cost_scaling_factor: 100.0
map_type: costmap
observation_sources: scan
scan: {sensor_frame: camera_depth_virtual_frame, data_type: LaserScan, topic: depth/scan_filtered, marking: true, clearing: true}
local clostmap
local_costmap:
global_frame: odom
robot_base_frame: base_footprint
update_frequency: 10.0
publish_frequency: 10.0
transform_tolerance: 0.5
static_map: false
rolling_window: true
width: 5
height: 5
resolution: 0.05
plugins:
- {name: ultrasonic_layer, type: "range_sensor_layer::RangeSensorLayer"}
- {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
ultrasonic_layer:
topics: ["/ultrasonic/ir_back", "/ultrasonic/ir_front"]
no_readings_timeout: 1.0
clear_on_max_reading: true
global_costmap:
global_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 10.0
publish_frequency: 10.0
transform_tolerance: 0.5
static_map: true
As i tried this instruction, i found that with laserscan directly from the 2d lidar it is working somewhat. I am currently trying to use the laserscan from point cloud to laserscan filter.
As shown in the above screenshot, the costmap created from the range sensor is very much visible while the costmap created from the laserscan are not properly visible/intense. And problem i.e is comming here is theat global path is passing through the local costmap as a result robot is colliding with obstacles.
Asked by dinesh on 2021-11-22 06:55:39 UTC
Answers
Hi, have a look here (as a guidline). If you still got problems please post all config files and rosparam dump. yaml is indent sensitive, I assume your code above isnt what it is in the files.
Asked by Dragonslayer on 2021-11-22 07:59:03 UTC
Comments
I've updated the question with costmap parameters.
Asked by dinesh on 2021-11-23 02:13:02 UTC
Latest update is that only range sensors costmap is comming with intensity but the scan based costmap is not looking very intense due to whicch thge global path is pasing through the costmaps of the scan itself.
Asked by dinesh on 2021-11-23 03:59:50 UTC
The config files look much better now. What do you mean by "intensity". I also dont understand your second sentence, the global path should have nothing to do with the marking/rendering of obstacles in the local costmap. You use a 360° 2d-lidar as scan sensor? A picture would be helpful.
Asked by Dragonslayer on 2021-11-23 06:29:57 UTC
I have updated the question with the screenshot.
Asked by dinesh on 2021-11-23 06:39:35 UTC
Thanks for the update. Sadly I am not sure what is what in the picture. Is the global map shown here? Is the grey cone the ultrasonic sensor's range? What sensor marks what obstacles. A picture straight down zoomed out with only the local costmap (no global map) would be appreciated, also include the whole rviz window. If you are alreday at it maybe also a picture of the map (in rviz). Even a video might be good, I dont get whats going on.
Iam not sure if your config files are complete but they dont correspond to the linked (implementing proximity...) ones. I dont see a obstacle_layer defined as the ultrasonic_layer is (in your local_costmap) define the layers in common_costmap like in the example you linked. I also dont see an inflation_layer (should also go in common_costmap check your link) But be aware that you need to launch them in correspondint namespaces. once in ns= global_costmap and once in ns=local_costmap Also in the example they have plugins for global costmap as well
Asked by Dragonslayer on 2021-11-23 07:52:30 UTC
Since the problem seems to be only with scan from depth sensor which was converted than used. i'll be opening new question.
Asked by dinesh on 2021-11-23 09:34:51 UTC
Comments
This seems to have been answered in your followup question #q391511
Asked by Mike Scheutzow on 2021-11-25 10:22:53 UTC