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

move_base costmap not updating or publishing GridCell topics

asked 2014-04-13 08:08:02 -0600

corichman gravatar image

I am trying to run the move_base package and visualize it in rviz. The costmap for the static map from the map server works. However when the robot moves close to an obstacle, the costmap doesn't update. I don't think this is a problem with the point cloud or laser scan since these can be seen working in rviz. There are also no GridCells topics being published like there should be.

The following is the params file for move_base:

obstacle_range: 2.5
raytrace_range: 3.0
max_obstacle_height: 2.0
footprint: [[0.285, 0.6365], [0.285, -0.6365], [-0.285, -0.6365], [-0.285, 0.6365]]
inflation_radius: 0.3

observation_sources: laser_scan_sensor point_cloud_sensor

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

point_cloud_sensor: {sensor_frame: camera_frame, data_type: PointCloud, topic: /camera/depth/points, marking: true, clearing: true}


planner_patience: 5.0
shutdown_costmaps: false


TrajectoryPlannerROS:
  max_vel_x: 0.45
  min_vel_x: 0.1
  max_rotational_vel: 1.0
  min_in_place_rotational_vel: 0.4

  acc_lim_th: 2.0
  acc_lim_x: 2.0
  acc_lim_y: 2.0

  sim_time: 1.0

  pdist_scale: 0.6
  gdist_scale: 0.8
  occdist_scale: 0.01

  holonomic_robot: true


global_costmap:
  global_frame: map
  robot_base_frame: base_footprint
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: true


local_costmap:
  global_frame: odom
  robot_base_frame: base_footprint
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 3.0
  height: 3.0
  resolution: 0.01

I have read some stuff about namespaces for the costmap parameters and was wondering if this has anything to do with it? Thanks ahead of time for your suggestions on how to fix this.

edit retag flag offensive close merge delete

Comments

>>>"However when the robot moves close to an obstacle, the costmap doesn't update" How close? Or local costmap doesn't update at all?

Mike Charikov gravatar image Mike Charikov  ( 2014-04-14 02:01:29 -0600 )edit

It never updates

corichman gravatar image corichman  ( 2014-04-14 04:09:45 -0600 )edit

Can you show your launch file? BTW check if everything ok with odom frame.

Mike Charikov gravatar image Mike Charikov  ( 2014-04-15 23:13:26 -0600 )edit

I currently am not using a launch file. I have been using "rosparam load move_base_params.yaml move_base_node". And then using "rosrun move_base move_base". The odom also seems to work fine.

corichman gravatar image corichman  ( 2014-04-16 04:20:06 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-05-30 16:13:14 -0600

joao.aguizo gravatar image

updated 2022-05-30 16:22:55 -0600

You are defining the parameters in different namespaces. Try defining the obstacle_sources under each costmap, i.e.:

obstacle_range: 2.5
raytrace_range: 3.0
max_obstacle_height: 2.0
footprint: [[0.285, 0.6365], [0.285, -0.6365], [-0.285, -0.6365], [-0.285, 0.6365]]
inflation_radius: 0.3

global_costmap/observation_sources: laser_scan_sensor point_cloud_sensor
local_costmap/observation_sources: laser_scan_sensor point_cloud_sensor

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

global_costmap/point_cloud_sensor: {sensor_frame: camera_frame, data_type: PointCloud, topic: /camera/depth/points, marking: true, clearing: true}

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

local_costmap/point_cloud_sensor: {sensor_frame: camera_frame, data_type: PointCloud, topic: /camera/depth/points, marking: true, clearing: true}

planner_patience: 5.0
shutdown_costmaps: false


TrajectoryPlannerROS:
  max_vel_x: 0.45
  min_vel_x: 0.1
  max_rotational_vel: 1.0
  min_in_place_rotational_vel: 0.4

  acc_lim_th: 2.0
  acc_lim_x: 2.0
  acc_lim_y: 2.0

  sim_time: 1.0

  pdist_scale: 0.6
  gdist_scale: 0.8
  occdist_scale: 0.01

  holonomic_robot: true


global_costmap:
  global_frame: map
  robot_base_frame: base_footprint
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: true


local_costmap:
  global_frame: odom
  robot_base_frame: base_footprint
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  width: 3.0
  height: 3.0
  resolution: 0.01

Source: http://wiki.ros.org/costmap_2d/hydro/...

I assumed that you want marking and clearing in both costmaps (which I do not think it is a common setup).

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-04-13 08:08:02 -0600

Seen: 1,554 times

Last updated: May 30 '22