ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Can I update global map with only one specific pointcloud topic?

asked 2018-10-17 09:33:16 -0500

mzWang gravatar image

Hi,

I'm using the move base on my robot for navigation, but I have some special needs regarding how the global map and local map should be updated. The robot have two sensors for mapping, a depth camera (/point_cloud) and a laser scan (/scan). And I will publish another topic which includes the point clouds of verified obstacles (/verified_cloud). For the local map, I want to update it with the laser scan result. For the global map, I want to update it with only the verified point clouds that I published (/verified_cloud). If there is nothing published on /verified_cloud topic, I don't want the global map gets updated even the laser scan found an obstacle.

I have my yaml files like this:

costmap_common_params.yaml

obstacle_range: 2.5 
raytrace_range: 3.0
robot_radius: 0.25
inflation_radius: 0.5

global_costmap_params.yaml

global_costmap:
  global_frame: /map
  robot_base_frame: base_link
  update_frequency: 5.0
  static_map: true


observation_sources: point_cloud_sensor

point_cloud_sensor: {sensor_frame: map, data_type: PointCloud2, topic: /verified_clouds, marking: true, clearing: false}

local_costmap_params.yaml

local_costmap:
  global_frame: map
  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


observation_sources: laser_scan_sensor 

laser_scan_sensor: {sensor_frame: base_range_sensor_link, data_type: LaserScan, topic: /scan, marking: true, clearing: true}

However, I find that the global map is still getting updated from the laser scan results. Can you help me stop the global map updating from laser scan? Thanks in advance!!!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-10-17 13:00:35 -0500

It looks like you've defined your observation sources in the root of the file, outside the local/global costmap scope (look at the indentation). Try again with those sources and the configuration of the sources in their respective scopes.

edit flag offensive delete link more

Comments

I see. Thank you! I'll try it out tomorrow.

mzWang gravatar image mzWang  ( 2018-10-17 13:15:32 -0500 )edit
1

You are correct! I need to put those sources in right scope. Thanks again!

mzWang gravatar image mzWang  ( 2018-10-18 02:22:20 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-10-17 09:33:16 -0500

Seen: 634 times

Last updated: Oct 17 '18