Is it possible to add two laser for navigation2
I'm using ros2 foxy in ubuntu 20.04 and try to show two laser scan topic in Rviz.
I open gazebo simulation for publish two topic /scan_1
and /scan_2
.
Then modify nav2_params.yaml as below:
local_costmap:
local_costmap:
ros__parameters:
...
voxel_layer:
...
observation_sources: scan_1 scan_2
scan_1:
topic: /scan_1
max_obstacle_height: 2.0
clearing: True
marking: True
data_type: "LaserScan"
scan_2:
topic: /scan_2
max_obstacle_height: 2.0
clearing: True
marking: True
data_type: "LaserScan"
global_costmap:
global_costmap:
ros__parameters:
...
voxel_layer:
...
observation_sources: scan_1 scan_2
scan_1:
topic: /scan_1
max_obstacle_height: 2.0
clearing: True
marking: True
data_type: "LaserScan"
scan_2:
topic: /scan_2
max_obstacle_height: 2.0
clearing: True
marking: True
data_type: "LaserScan"
but it seems not show the local_costmap
and global_costmap
in Rviz.
my Rviz try to subscribe the topic /scan_1
or /scan_2
, still not work.
if any other idea. Thanks for help.
Here my log file: https://drive.google.com/drive/folder...
If gazebo only publish one laser topic
/scan
, and setlocal_costmap
andglobal_costmap
only one observation_sources. It can work and show those cosetmap in Rviz.