no obstacle layer published

asked 2017-02-12 11:54:48 -0500

b-sriram gravatar image

updated 2017-02-13 05:19:08 -0500

Hi,

I am having trouble with the local costmap while using the navigation stack. The problem is that the obstacle layer is not getting published as a result the local cost map is always empty.

If i try to use the static map for local map too, the there is no problem.

I looked up some solutions suggested like setting max_obstacle_height and min_obstacle_height but nothing works.

The funny part is it had worked a few days ago and I had just changed the height and width of the rolling window and suddenly it disappeared.

I had previously downloaded the navigation stack via source, so I deleted it and installed it again but via apt-get. Then the obstacle layer worked again but when I changed some setting it disappeared again.

I tried re-installing everything again but nothing works.

Is it some sort of problem with the navigation stack? I'm running ros-kinetic and use a kinect camera as a laser source. Can someone please help me solve this.

Thanks & Regards Sriram

costmap_common.yaml

footprint: [[0.75, 0.55], [0.75, -0.55], [-0.75, -0.55], [-0.75, 0.55]] 
map_type: costmap

obstacle_layer:
  enabled: true
  obstacle_range: 2.5
  raytrace_range: 3.0
  max_obstacle_height: 2.0
  min_obstacle_height: 0.0
  observation_sources: laser_scan_sensor 

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

inflation_layer:
  enabled:              true
  cost_scaling_factor:  5.0  # exponential rate at which the obstacle cost drops off (default: 10)
  inflation_radius:     0.2  # max. distance from an obstacle at which costs are incurred for planning paths.

static_layer:
  enabled: true


transform_tolerance: 0.5

global_costmap:

  global_frame: /map
  robot_base_frame: /base_link
  update_frequency: 4.0
  static_map: true
  rolling_window: false
  plugins:
     - {name: static_layer,            type: "costmap_2d::StaticLayer"}
     - {name: obstacle_layer,          type: "costmap_2d::VoxelLayer"}
     - {name: inflation_layer,         type: "costmap_2d::InflationLayer"}

local_costmap:

  global_frame: /odom
  robot_base_frame: /base_link
  update_frequency: 4.0
  publish_frequency: 2.0
  static_map: false
  rolling_window: true
  resolution: 0.05
  transform_tolerance: 0.5
  plugins:
    - {name: obstacle_layer,      type: "costmap_2d::VoxelLayer"}
    - {name: inflation_layer,     type: "costmap_2d::InflationLayer"}

SUMMARY

PARAMETERS
 * /amcl/gui_publish_rate: 10.0
 * /amcl/kld_err: 0.05
 * /amcl/kld_z: 0.99
 * /amcl/laser_lambda_short: 0.1
 * /amcl/laser_likelihood_max_dist: 2.0
 * /amcl/laser_max_beams: 30
 * /amcl/laser_model_type: likelihood_field
 * /amcl/laser_sigma_hit: 0.2
 * /amcl/laser_z_hit: 0.5
 * /amcl/laser_z_max: 0.05
 * /amcl/laser_z_rand: 0.5
 * /amcl/laser_z_short: 0.05
 * /amcl/max_particles: 500
 * /amcl/min_particles: 50
 * /amcl/odom_alpha1: 0.5
 * /amcl/odom_alpha2: 0.2
 * /amcl/odom_alpha3: 0.8
 * /amcl/odom_alpha4: 0.2
 * /amcl/odom_alpha5: 0.1
 * /amcl/odom_frame_id: odom
 * /amcl/odom_model_type: diff
 * /amcl/recovery_alpha_fast: 0.0
 * /amcl/recovery_alpha_slow: 0.0
 * /amcl/resample_interval: 1
 * /amcl/transform_tolerance: 0.1
 * /amcl/update_min_a: 0.5
 * /amcl/update_min_d: 0.2
 * /move_base/TrajectoryPlannerROS/acc_lim_theta: 5.0
 * /move_base/TrajectoryPlannerROS/acc_lim_x: 5.0
 * /move_base/TrajectoryPlannerROS/acc_lim_y: 5.0
 * /move_base/TrajectoryPlannerROS/dwa: False
 * /move_base/TrajectoryPlannerROS/escape_vel: -0.5
 * /move_base/TrajectoryPlannerROS/holonomic_robot: False
 * /move_base/TrajectoryPlannerROS/max_vel_theta: 1.0
 * /move_base/TrajectoryPlannerROS/max_vel_x: 1.0
 * /move_base/TrajectoryPlannerROS/meter_scoring: True
 * /move_base/TrajectoryPlannerROS/min_in_place_vel_theta: 0.6
 * /move_base/TrajectoryPlannerROS/min_vel_x: 0.3
 * /move_base/TrajectoryPlannerROS/path_distance_bias: 0.5
 * /move_base/TrajectoryPlannerROS/xy_goal_tolerance: 0.5
 * /move_base/controller_frequency: 5.0
 * /move_base/global_costmap/footprint: [[0.75, 0.55], [0...
 * /move_base/global_costmap/global_frame: /map
 * /move_base ...
(more)
edit retag flag offensive close merge delete

Comments

Can you post the output of the node and rosparam get /move_base_node or whatever your move base namespace is?

David Lu gravatar image David Lu  ( 2017-02-12 20:26:23 -0500 )edit

Hi,

Ive edited my question by adding what you asked.

PS: It stared working again when I tried it after the weekend. Is it some sort of a problem in the code or it has to do something with my PC?

b-sriram gravatar image b-sriram  ( 2017-02-13 02:04:29 -0500 )edit

Does /scan show in rviz? Can you include your tf-tree?

Humpelstilzchen gravatar image Humpelstilzchen  ( 2017-02-13 05:01:26 -0500 )edit

hi,

Yeah, /scan is shown in rviz and amcl is able to use it for localization. I've included the tf tree in my question as an image

b-sriram gravatar image b-sriram  ( 2017-02-13 05:15:58 -0500 )edit

I see scan and laser in your tf tree, is that a duplicate? Can you add the output of

rosrun tf tf_echo base_link scan
Humpelstilzchen gravatar image Humpelstilzchen  ( 2017-02-13 07:16:50 -0500 )edit

the /scan frame is for the laserscan published by depthimage_to_laserscan package and /laser frame is for laser scan published by Rplidar scanner

b-sriram gravatar image b-sriram  ( 2017-02-13 10:49:31 -0500 )edit

At time 1487004667.862 - Translation: [0.000, -0.140, 0.537] - Rotation: in Quaternion [0.000, 0.000, 0.000, 1.000] in RPY (radian) [0.000, -0.000, 0.000] in RPY (degree) [0.000, -0.000, 0.000]

b-sriram gravatar image b-sriram  ( 2017-02-13 10:51:51 -0500 )edit

How about a screenshot of rviz that includes the global/local costmaps, an indication of /base_link and the laser data.

David Lu gravatar image David Lu  ( 2017-02-13 11:10:12 -0500 )edit