How to use PointCloud from pedsim_sensors to update costmap obstacles
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:
- I have recorded and placed at https://www.youtube.com/watch?v=d6atQ...
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.
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?
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.
What about setting min_obstacle_height to -100. Also, how far away are the obstacles?
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.