Ask Your Question
0

How to use PointCloud from pedsim_sensors to update costmap obstacles

asked 2020-04-15 10:47:42 -0500

rk42 gravatar image

updated 2020-04-17 22:43:40 -0500

Hi, all

I have been trying to navigate pedsim_ros built-in diff-robot in environment created pedsim_similator

I have been able to navigate robot to desirable goal by navigation stack:

But as you seen, robot can't avoid obstacles (men) because I think that local costmap didn't update obstacles To update obstacles to local costmap, I have done as following:

  • In local_costmap_params.yaml, I place two layers obstacle_layer and inflation_layer, obstacle_layer updated from _pedsim_people_sensor/point_cloud_local_ topic:

    plugins:

     - {name: obstacle_layer,          type: "costmap_2d::ObstacleLayer"}
    
     - {name: inflation_layer,         type: "costmap_2d::InflationLayer"}
    

    obstacle_layer:

     observation_sources: bump
    
     bump: {data_type: PointCloud , sensor_frame: odom, topic: pedsim_people_sensor/point_cloud_local, marking: true, clearing: true, min_obstacle_height: 0.0, max_obstacle_height: 3 }
    

Hint: Pls view full source code at: https://github.com/AMRobots/pedsim_teb

  • I checked _pedsim_people_sensor/point_cloud_local_ topic, it is ok and can view it in rviz

--

I already have tried to solve this issue by:

  • Method 1: set min_obstacle_height to 0.0 cm as suggestion at here

  • Method 2: convert _pedsim_people_sensor/point_cloud_local_(PointCloud) to PointCloud2 (by point_cloud_converter package), then convert PointCloud2 to LaserScan (by pointcloud_to_laserscan package), finally use LaserScan to update local costmap

With two methods I failed.

pls suggest me the way to fix it.

edit retag flag offensive close merge delete

Comments

Does the pointcloud appear where you expect it to in RViz? Can you visualize what the costmap looks like? What happens if you set clearing to false?

David Lu gravatar image David Lu  ( 2020-04-16 11:29:16 -0500 )edit

PointCloud can appear like I expect in Rviz (it is very clearly). I can visualize local_costmap window_rolling in rviz, but window_rolling is empty (absolutely white, it don't have any obstacle). When I set clearing to false (both local_costmap and global_costmap), no one change.

rk42 gravatar image rk42  ( 2020-04-16 11:57:44 -0500 )edit

What about setting min_obstacle_height to -100. Also, how far away are the obstacles?

David Lu gravatar image David Lu  ( 2020-04-16 12:43:29 -0500 )edit

I set min_obstacle_height to -100, max_obstacle_height to 3 in both global_costmap and local_costmap.

I seen that global_costmap also show a part of many obstacles, and local_costmap still is unchanged.

rk42 gravatar image rk42  ( 2020-04-16 19:37:28 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-17 22:45:06 -0500

rk42 gravatar image

updated 2020-04-17 22:50:45 -0500

I already have solved this problem.

I have changed "sensor_frame" from "odom" to "base_footprint".

My result: https://youtu.be/jsmq_vauVTY

Full source code: https://github.com/AMRobots/pedsim_teb

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-04-15 10:47:42 -0500

Seen: 134 times

Last updated: Apr 17 '20