ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You can try to use these packages:
https://github.com/awesomebytes/occupancy_grid_python
https://github.com/anybotics/grid_map
Especially last one, in C++, could be faster than your custom code
This is a C++ library with ROS interface to manage two-dimensional grid maps with multiple data layers
In general, you can try to speed up of your code if you reduce the scale of the map array to at most a few hundreds pixels in width and height - usually these types of hacks allow you to accelerate the code execution significantly