laser scan not being used for costmap
Hi All,
I have a robot with a kinect sensor and a traditional lidar. The lidar is able to see 360 degrees around the robot at a height of 2 meters off the ground. the kinect is on the front of the robot at about 0.5 meters off the ground. i have recently switched to using the kinect to create a voxel grid in the costmap using spatio_temporal_voxel_layer. However, now its not using the laser anymore so sometimes itll back into things. I would like for it to use the laser and the voxel layer in the global costmap. Any tips in achieving this?
launch file
<?xml version="1.0"?>
<launch>
<param name="robot_description" textfile="$(find navigation)/src/urdf/testbot_revised(Suzi) laser added.urdf"/>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/>
<!-- Start the laser stuff -->
<include file="$(find navigation)/src/launch/connect_kinnect_no_scan.launch"/>
<include file="$(find rplidar_ros)/launch/rplidar.launch"/>
<!-- Start rosbridge for javascript comms -->
<include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch"/>
<include file="$(find diff_drive)/src/launch/run_diff_drive.launch"/>
<include file="$(find arduino_comm)/src/launch/run_arduino_comms.launch"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(find navigation)/src/maps/SD_room_dual_laser_low_rez.yaml"/>
<node pkg="amcl" type="amcl" name="amcl" output="screen">
<param name="min_particles" value="250"/>
<param name="max_particles" value="500"/>
</node>
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find navigation)/src/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find navigation)/src/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find navigation)/src/local_costmap_params.yaml" command="load" />
<rosparam file="$(find navigation)/src/global_costmap_params.yaml" command="load" />
<!--rosparam file="$(find navigation)/src/base_local_planner_params.yaml" command="load" /-->
<rosparam file="$(find navigation)/src/dwa_local_planner_params.yaml" command="load" />
<param name="planner_frequency" value="5"/>
<param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS"/>
</node>
</launch>
global costmap params
global_costmap:
global_frame: map
robot_base_frame: base_link
static_map: true
transform tolerance: 0.5
width: 20
height: 20
origin_x: -5
origin_y: -5
resolution: 0.15
publish_frequency: 1
update_frequency: 1.0
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: rgbd_obstacle_layer, type: "spatio_temporal_voxel_layer/SpatioTemporalVoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
- {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
local costmap params
local_costmap:
global_frame: odom
robot_base_frame: base_link
rolling_window: true
static_map: false
resolution: 0.15
publish_frequency: 1
update_frequency: 5.0
plugins:
- {name: rgbd_obstacle_layer, type: "spatio_temporal_voxel_layer/SpatioTemporalVoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
common costmap params
footprint: [[0.3,0.2],[0.3,-0.2],[-0.4,-0.2],[-0.4,0.2]]
raytrace_range: 3.0
obstacle_range: 2.5
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: camera_link, data_type: LaserScan, topic: scan, marking: true, clearing: true}
rgbd_obstacle_layer:
enabled: true
voxel_decay: 30 #seconds if linear, e^n if exponential
decay_model: 0 #0=linear, 1=exponential, -1=persistent
voxel_size: 0.1 #meters
track_unknown_space: true #default space is unknown
observation_persistence: 0.0 #seconds
max_obstacle_height: 2.0 #meters
unknown_threshold: 15 #voxel height
mark_threshold: 0 #voxel height ...