Ask Your Question
1

Costmap_layers problem with plugins [closed]

asked 2014-04-09 03:09:35 -0500

Raul Gui gravatar image

updated 2014-04-11 00:14:36 -0500

demmeln gravatar image

Hi, everyone!!

I am trying to create a new layer for costmap to be use in turtlebot, I follow the two tutorials for costmap_2d. 1.Configuring Layered Costmaps 2.Creating a New Layer

So my costmap layers ymal results in these:

1.costmap_common_params.yaml

max_obstacle_height: 0.60  # assume something like an arm is mounted on top of the robot
obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-0.2, -0.2], [-0.2, 0.2], [0.2, 0.2], [0.2, -0.2]]
robot_radius: 0.18
inflation_radius: 0.50


# voxel map configuration; z-voxels 0 are filled by bumpers and 1 by laser scan (kinect)
map_type: voxel
origin_z: 0.0
z_resolution: 0.2
z_voxels: 2
publish_voxel_map: false

observation_sources: scan bump

scan: {data_type: LaserScan, topic: scan, marking: true, clearing: true, min_obstacle_height: 0.25, max_obstacle_height: 0.35}
bump: {data_type: PointCloud2, topic: mobile_base/sensors/bumper_pointcloud, marking: true, clearing: false, min_obstacle_height: 0.0, max_obstacle_height: 0.15}

2.global_costmap_params.yaml global_costmap:

   global_frame: /map
   robot_base_frame: /base_footprint
   update_frequency: 1.0
   publish_frequency: 0.5
   static_map: true
   transform_tolerance: 0.5

3.my_local_costmap_params.yaml

local_costmap:
   global_frame: /map
   robot_base_frame: /base_footprint
   update_frequency: 5.0
   publish_frequency: 2.0
   static_map: false
   rolling_window: true
   width: 4.0
   height: 4.0
   resolution: 0.05
   transform_tolerance: 0.5
   plugins:
   - {name: footprint_layer,     type: "costmap_2d::FootprintLayer"}      
   - {name: obstacle_layer_my,   type: "costmap_2d::ObstacleLayer" }     
   - {name: inflation_layer_my,  type: "costmap_2d::InflationLayer"}      
   - {name: grid_layer,          type: "simple_layer_namespace::GridLayer"}     
     #name: simple_layer
     #type: "simple_layer_namespace::SimpleLayer"

obstacle_layer_my:
    observation_sources: scan bump
    scan: {data_type: LaserScan, topic: scan, marking: true, clearing: true, min_obstacle_height: 0.25, max_obstacle_height: 0.35}
    bump: {data_type: PointCloud2, topic: mobile_base/sensors/bumper_pointcloud, marking: true, clearing: false, min_obstacle_height: 0.0, max_obstacle_height: 0.15}


inflation_layer_my:
    observation_sources: scan bump
    scan: {data_type: LaserScan, topic: scan, marking: true, clearing: true, min_obstacle_height: 0.25, max_obstacle_height: 0.35}
    bump: {data_type: PointCloud2, topic: mobile_base/sensors/bumper_pointcloud, marking: true, clearing: false, min_obstacle_height: 0.0, max_obstacle_height: 0.15}


grid_layer:
    observation_sources: scan bump
    scan: {data_type: LaserScan, topic: scan, marking: true, clearing: true, min_obstacle_height: 0.25, max_obstacle_height: 0.35}
    bump: {data_type: PointCloud2, topic: mobile_base/sensors/bumper_pointcloud, marking: true, clearing: false, min_obstacle_height: 0.0, max_obstacle_height: 0.15}

My problem is after running the gazebo and the my_gmapping_demo.launch, and rviz of turtlebot navigation like this:

  1. optirun roslaunch turtlebotraul_gazebo turtlebot_empty_world.launch
  2. roslaunch turtlebotraul_gazebo my_gmapping_demo.launch
  3. optirun roslaunch turtlebot_rviz_launchers view_navigation.launch

I try to navigate the turtlebot in rviz using "2D Nav Goal" the path of global planner is all good, circumvents the obstacles, but for the local planner the path is wrong, for him doesn't exist obstacles so he try to pass through the obstacles, because my layer simple_layer or grid_layer aren't saving costs in the map. So I don't know if the problem is the cpp files of the layers: simple_layer or grid_layer, or the way I put the plugins in my_local_costmap_params.yaml, because when I run the roslaunch turtlebotraul_gazebo my_gmapping_demo.launch I get this:

[ INFO] [1397036705.765097077, 34.590000000]: Laser is mounted upwards.
 -maxUrange 6 -maxUrange 8 -sigma     0.05 -kernelSize 1 -lstep 0.05 -lobsGain 3 -astep 0.05
 -srr 0.01 -srt 0.02 -str 0.01 -stt ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2017-04-20 17:08:44.825106

Comments

Is this still an open question, or have you figured it out?

David Lu gravatar imageDavid Lu ( 2014-06-24 14:22:04 -0500 )edit

@David Lu , I believe question is still open and i also have the same question/problem. Cheers!

sobot gravatar imagesobot ( 2015-03-16 12:08:17 -0500 )edit

Does it work without your custom layer?

David Lu gravatar imageDavid Lu ( 2015-03-16 18:46:21 -0500 )edit

Yes, without the layers there is no problem in launching the files. but i use gmapping to produce a map on the fly & i get no inflation, move_base doest account for the obstacles and plan the path right through them. i dont know what im doing wrong here. should i put plugins in a each .yaml?

sobot gravatar imagesobot ( 2015-03-17 04:01:17 -0500 )edit

@sobot - can you open your own question (unless you have the same exact configuration as above)?

David Lu gravatar imageDavid Lu ( 2015-03-17 11:25:59 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-07-21 04:50:58 -0500

Raul Gui gravatar image

it's still open.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2014-04-09 03:09:35 -0500

Seen: 690 times

Last updated: Jul 21 '14