Costmap Laser Messages Dropped

asked 2018-05-15 14:03:07 -0500

updated 2018-05-15 14:04:44 -0500

I am attempting to run the move_base node in the ROS navigation stack package. I ran this in simulation on Gazebo and thought that it worked correctly but evidently not. I am running into an issue where things are not added to my local costmap from the LiDAR data even though it is visualize-able in Rviz. I have attached a bag file where I bring my robot into a known environment, set a pose in Rviz, and give a navigation goal. Note that the robot does not move because the motor driving node was not active.

I am under the impression that the costmap should turn dark where there is an obstacle but mine is not behaving like that. The robot navigates without adding anything to the costmap.

Below are the .yaml configuation files:

base_local_planner: 
controller_frequency: 5.0

TrajectoryPlannerROS:
  max_vel_x: 1.0
  min_vel_x: 0.0
  max_vel_y: 0.0
  min_vel_y: 0.0
  max_vel_theta: 1.0
  min_vel_theta: -1.0
  min_in_place_vel_theta: 0.25
  acc_lim_theta: 3.0
  acc_lim_x: 3.0
  acc_lim_y: 0
  escape_vel: -2.0
  holonomic_robot: false
  # Parameters for a simulation
  sim_time: 1.0
  sim_granularity: 0.02
  angular_sim_granularity: 0.02
  dwa: true
  meter_scoring: true

costmap_common_params

obstacle_range: 0.25 # the maximum distance without updating the costmap
raytrace_range: 1.5 # the range to which the robot will attempt to clear in front of itself
footprint: [[-0.47, 0.47], [0.47, 0.47], [0.47, -0.47], [-0.47, -0.47]] # simple box configuration
#robot_radius: ir_of_robot
inflation_radius: 0.25 # 25 centemeters away from the robot - minimum distance away from an obsticle
min_obstacle_height: 0.0
max_obstacle_height: 10.0
publish_frequency: 10.0

obstacle_layer:
    enabled: true
    obstacle_range: 3.0
    raytrace_range: 5.0
    max_obstacle_height:    20.0            # 2.0 m set to higher than flight height
    min_obstacle_height:    -20.0            # set just below flight height
    inflation_radius: 0.7
    track_unknown_space: true
    combination_method: 1
    observation_sources: LiDAR_scan
    LiDAR_scan: {data_type: LaserScan, sensor_frame: /scan, clearing: true, marking: true, topic: /scan, inf_is_valid: false}

global_costmap_params

global_costmap:
  global_frame: /map # defines what coordinate frame the costmap should run in
  robot_base_frame: /base_footprint # the coordinate frame the robot should reference as the base of the bot
  update_frequency: 1.0 # (Hz)
  publish_frequency: 1.0
  static_map: true # should the costmap initialize itself based on a map served by the map_server.
  # Put this to false if there is not a static map of if there is no map at all
  #resolution: 0.1
  transform_tolerance: 10.0
  #map_type: costmap
  plugins:
    - {name: static_layer,            type: "costmap_2d::StaticLayer"}
    - {name: obstacle_layer,          type: "costmap_2d::ObstacleLayer"}
    - {name: inflation_layer,         type: "costmap_2d::InflationLayer"}

  #width: 200
  #height: 200
  #resolution: 0.5

local_costmap_params

local_costmap:
  global_frame: /odom
  robot_base_frame: /base_footprint
  update_frequency: 5.0 # (Hz)
  publish_frequency: 2.0 # (Hz)
  static_map: false
  rolling_window: true # Setting to true means that the costmap will remain centered around the robot as it moves around the world
  width: 5.0
  height: 5.0
  resolution: 0.1
  # These three set the width, height, and resolution of the costmap. Should (but do not have to be) the same as the static map
  transform_tolerance: 10.0
plugins:
    - {name: static_layer,        type: "costmap_2d::StaticLayer"}
    - {name: obstacle_layer,      type: "costmap_2d::ObstacleLayer"}
    - {name ...
(more)
edit retag flag offensive close merge delete

Comments

When the system is running, what does rostopic info /scan show?

David Lu gravatar imageDavid Lu ( 2018-05-15 14:30:57 -0500 )edit

There is data shown in the topic. I can also visualize the data in Rviz

cmfuhrman gravatar imagecmfuhrman ( 2018-05-15 15:15:58 -0500 )edit

Is it connected to /move_base? Also, is there any output in the terminal?

David Lu gravatar imageDavid Lu ( 2018-05-15 15:17:07 -0500 )edit