OctoMap / octomap_mapping

ROS stack for mapping with OctoMap, contains octomap_server package
http://www.ros.org/wiki/octomap_mapping
335 stars 280 forks source link

Is it possible to have the map in the robot frame? #117

Open himanshuak opened 1 year ago

himanshuak commented 1 year ago

Hello, I am trying to use to octomap to get an idea of the close surrounding of the robot. My intention is to have a fixed sized map in the robot frame and update the map with the pointcloud . The map will not be saved and everytime the map is updated I will be using this to check for the presense of obstacles close to the robot. I tried to use the package but it builds the complete map which is not my requirement. I would like to know if its possible using this package. Any suggestions to implement this would be very helpful. Thanks in advance.

laelliott commented 1 year ago

There's a service request to reset the map to empty that you could call.

However Octomap is designed to build an occupancy map like you're referring to so you might end up modifying it a lot for your purposes.

However I don't think that's efficient for what you're doing. Sound like you're just looking for a downsampling or voxelization which can be done using pcl.

You could do a nearest neighbor type search using pcl to look at what is generally close or ray cast if you know what direction you're moving in

https://pointclouds.org/documentation/structpcl_1_1gpu_1_1_ray_caster.html