Login  Register

Local costmap is empty

Posted by ryleymcc on Feb 14, 2021; 6:31am
URL: http://official-rtab-map-forum.206.s1.nabble.com/Local-costmap-is-empty-tp7464.html

I can see rtabmap publishing the cloud_obstacle topic in rviz.
I can't see move_base subscribing to cloud_obstacles in rqt_graph. cloud_obstacles is not connected to move_base
The local costmap is empty and TEB local planner does not avoid local obstacles.
My global costmap seems to be working fine and a global path is created without any problems.
I am using D435i and T265 real-sense cameras.

This is my costmap_common_params.yaml

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-0.35, 0.6], [1.32 , 0.6], [1.32, -0.6], [-0.35, -0.6]]
#robot_radius: 1
inflation_layer:
  inflation_radius: 10

transform_tolerance: 2

obstacle_layer:
  obstacle_range: 3.5
  raytrrace_range: 4
  max_obstacle_height: -99999
  min_obstacle_height: 99999

  track_unknown_space: true


This is my local_costmap_params.yaml

local_costmap:
  global_frame: t265_odom_frame
  robot_base_frame: base_link
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 6.0
  height: 6.0
  resolution: 0.05
  #transform_tolerance: 10
  observation_sources: point_cloud_sensor
  point_cloud_sensor: {sensor_frame: odom,
  data_type: PointCloud2,
  topic: /rtabmap/cloud_obstacles,
  marking: true, clearing: false,
  min_obstacle_height: -99999,
  max_obstacle_height: 999999}


  plugins:
    - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
    - {name: inflation_layer, type: "costmap_2d::InflationLayer"}

this is my working global_costmap_params.yaml

global_costmap:
  global_frame: map
  robot_base_frame: base_link
  update_frequency: 1.0
  static_map: true
  observation_sources: point_cloud_sensor
  point_cloud_sensor: {sensor_frame: odom, data_type: PointCloud2, topic: /rtabmap/cloud_obstacles, marking: true, clearing: false}

  plugins:
    - {name: static_layer, type: "costmap_2d::StaticLayer"}
    - {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
    - {name: inflation_layer, type: "costmap_2d::InflationLayer"}


This is my launch file
<launch>
  <include file="$(find realsense2_camera)/launch/rs_d400_and_t265.launch" />
  <include file="$(find rtabmap_ros)/launch/rtabmap.launch"  >
 
    <arg name="odom_topic" value="/t265/odom/sample"/>
    <arg name="frame_id" value="t265_link"/>
    <arg name="rgbd_sync" value="true"/>
    <arg name="depth_topic" value="/d400/aligned_depth_to_color/image_raw"/>
    <arg name="rgb_topic" value="/d400/color/image_raw"/>
    <arg name="camera_info_topic" value="/d400/color/camera_info"/>
    <arg name="approx_rgbd_sync" value="false"/>
    <arg name="visual_odometry" value="false"/> 
    <arg name="localization" value="false"/>

  </include>
 
</launch>

When i go into localization mode cloud_obstacles is not published anymore so how could i avoid obstacles in localization mode?