local costmap not showing up

asked 2021-05-06 22:31:03 -0500

Noctis gravatar image

updated 2021-08-09 10:51:28 -0500

matlabbe gravatar image

Hi everyone, I have used a D435i camera to create a 2D map for navigation with ROS Melodic & RTab-Map. However, after following several tutorials, my local costmap refuse to show up.

I've posted the details of my config here: http://official-rtab-map-forum.206.s1...

Thanks in advance for the help

edit retag flag offensive close merge delete

Comments

Where is the configuation file for the local costmap? I only see a global costmap configuration file and a common costmap configuration file.

skpro19 gravatar image skpro19  ( 2021-05-10 04:53:52 -0500 )edit

Also, please refrain from posting external links.

skpro19 gravatar image skpro19  ( 2021-05-10 04:54:10 -0500 )edit

Apologies, was not able to post images here yet hence, the external link.

Here it is @skpro19

local_costmap:
    global_frame: map
    robot_base_frame: base_link
    update_frequency: 20.0
    publish_frequency: 5.0
    width: 4.0
    height 4.0
    resolution: 0.05
    static_map: false
    rolling_window: true
Noctis gravatar image Noctis  ( 2021-05-11 07:13:38 -0500 )edit

It seems that you haven't specified costmap_2d::ObstacleLayer and costmap_2d::InflationLayer plugins for the local costmap.

Also, how are you passing params to the costmaps?

skpro19 gravatar image skpro19  ( 2021-05-11 07:19:52 -0500 )edit

costmap_2d::ObstacleLayer & costmap_2d::InflationLayer is in my common params

map_type: costmap
transform_tolerance: 2.5
footprint: [[ 0.3,  0.3], [-0.3,  0.3], [-0.3, -0.3], [ 0.3, -0.3]]

plugins:
- {name: obstacles_layer ,type: "costmap_2d::ObstacleLayer"
- {name: inflater_layer ,type: "costmap_2d::InflationLayer"

inflater_layer:
  inflation_radius: 0.2
  cost_scaling_factor: 10.0

obstacle_layer:
  obstacle_range: 2.5
  raytrace_range: 3
  observation_sources: scan
  scan: {sensor_frame: camera_link, data_type: PointCloud2, topic: /camera/depth/color/points, marking: true, clearing: true, min_obstacle_height:-1.0}
Noctis gravatar image Noctis  ( 2021-05-12 22:36:03 -0500 )edit

Could you try shifting those to local_costmap config file?

skpro19 gravatar image skpro19  ( 2021-05-13 00:56:21 -0500 )edit

Also, why do you say that the local costmap refuses to show up? I don't see any error in Rviz for the local costmap.

skpro19 gravatar image skpro19  ( 2021-05-13 00:58:35 -0500 )edit

Change the global_frame to odom for the local_costmap.

skpro19 gravatar image skpro19  ( 2021-05-13 01:03:09 -0500 )edit