Problem with /proj_map used in global&local_costmap

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with /proj_map used in global&local_costmap

Hazelll
hi, I'm using laser (rplidar a3) and rgbd camera (realsense d455) for slam and navigation, rtabmap for rgbd slam, cartographer for laser slam, teb_local_planner as the navigation planner. Previously cartorgrapher and teb_local_planner have all been set well, now i'm trying to add the proj_map generated by rtabmap into global and local costmap, using a new layer grid_map added through ros tutorial simple_layers, but it just doesn't work.

The yaml file are like the follows:

<costmap_common_params.yaml>
transform_tolerance: 0.5

obstacle_layer:
 enabled: true
 obstacle_range: 3.0
 raytrace_range: 4.0
 inflation_radius: 0.5
 track_unknown_space: true
 combination_method: 1

 observation_sources: laser_scan_sensor point_cloud2_sensor
 laser_scan_sensor: {data_type: LaserScan, topic: scan, marking: true, clearing: true}
 point_cloud2_sensor: {data_type: PointCloud2, topic: point_cloud2, max_obstacle_height: 1.35, min_obstacle_height: 0, marking: true, clearing: true}

grid_layer:
 enabled: true
 obstacle_range: 3.0
 raytrace_range: 4.0
 inflation_radius: 0.5
 track_unknown_space: true
 combination_method: 1

 observation_sources: rtabmap
 rtabmap: {data_type: OccupancyGrid, topic: rtabmap/proj_map, marking: true, clearing: true}

inflation_layer:
  enabled:              true
  cost_scaling_factor:  10.0  # exponential rate at which the obstacle cost drops off
  inflation_radius:     0.35   # max. distance from an obstacle at which costs are incurred for planning paths.

static_layer:
  enabled:              true
  map_topic:            "/map"
  lethal_cost_threshold:     90


global_costmap_params.yaml
global_costmap:
  global_frame: map
  robot_base_frame: base_link
  camera_link: camera_link
  update_frequency: 1.0
  publish_frequency: 0.5

  plugins:
    - {name: static_layer,            type: "costmap_2d::StaticLayer"}
    - {name: obstacle_layer,          type: "costmap_2d::VoxelLayer"}
    - {name: grid_layer,              type: "simple_layer_namespace::GridLayer"}
#    - {name: obstacle_3d_layer,       type: "spatio_temporal_voxel_layer/SpatioTemporalVoxelLayer"}
    - {name: inflation_layer,         type: "costmap_2d::InflationLayer"}

Thx!
Reply | Threaded
Open this post in threaded view
|

Re: Problem with /proj_map used in global&local_costmap

matlabbe
Administrator
Hi,

with move_base, you only have to remap /rtabmap/proj_map to /map.

Are you using cartographer and rtabmap at the same time? I hope not because they would fight each other for the map and TF.