Robotics StackExchange | Archived questions

local costmap not showing up

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.nabble.com/local-costmap-not-showing-up-td7941.html

Thanks in advance for the help

Asked by Noctis on 2021-05-06 22:30:12 UTC

Comments

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

Asked by skpro19 on 2021-05-10 04:53:52 UTC

Also, please refrain from posting external links.

Asked by skpro19 on 2021-05-10 04:54:10 UTC

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

Asked by Noctis on 2021-05-11 07:13:38 UTC

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?

Asked by skpro19 on 2021-05-11 07:19:52 UTC

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}

Asked by Noctis on 2021-05-12 22:36:03 UTC

Could you try shifting those to local_costmap config file?

Asked by skpro19 on 2021-05-13 00:56:21 UTC

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.

Asked by skpro19 on 2021-05-13 00:58:35 UTC

Change the global_frame to odom for the local_costmap.

Asked by skpro19 on 2021-05-13 01:03:09 UTC

Answers