Registry / ai-ml / cmeel-octomap

cmeel-octomap

JSON →
library1.10.0pypypiunverified

cmeel-octomap provides efficient Python bindings for the OctoMap library, a probabilistic 3D mapping framework based on octrees. It enables users to build, query, and manage 3D occupancy maps in Python. The current version is 1.10.0, with updates typically aligned with upstream OctoMap releases or cmeel improvements.

pip install cmeel-octomap
INSTALL
IMPORT
SIG · CMEEL-OCTOMAP
C
cmeel-octomap
ai-mlpythonv1.10.0
Install
1.7s avg
Import
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.10.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.2MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.7s · import 0.000s · 22MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

OcTree
from octomap import OcTree
from cmeel.octomap import OcTree

This quickstart demonstrates how to create an OctoMap, insert occupied and free points, and query their occupancy status. It highlights basic map manipulation and information retrieval.

from octomap import OcTree, Point3D # Create an OcTree with a resolution of 0.1 meters tree = OcTree(0.1) # Insert some occupied points tree.insert_point(Point3D(0.0, 0.0, 0.0), occupied=True) tree.insert_point(Point3D(0.1, 0.0, 0.0), occupied=True) tree.insert_point(Point3D(0.5, 0.5, 0.5), occupied=True) # Insert a free point (clears any occupied status at this node) tree.insert_point(Point3D(0.0, 0.1, 0.0), occupied=False) # Query occupancy of points is_occupied_000 = tree.is_node_occupied(Point3D(0.0, 0.0, 0.0)) is_occupied_055 = tree.is_node_occupied(Point3D(0.5, 0.5, 0.5)) is_occupied_001 = tree.is_node_occupied(Point3D(0.0, 0.0, 1.0)) print(f"Point (0,0,0) is occupied: {is_occupied_000}") print(f"Point (0.5,0.5,0.5) is occupied: {is_occupied_055}") print(f"Point (0,0,1) is occupied: {is_occupied_001} (outside inserted points)") # Get the total number of occupied nodes print(f"Total occupied nodes: {tree.num_occupied_nodes}") # You can also save and load the map (uncomment to run) # tree.write_binary("my_octomap.bt") # loaded_tree = OcTree("my_octomap.bt") # print(f"Loaded tree has {loaded_tree.num_occupied_nodes} occupied nodes.")
Debug
Known issues
gotchaOctoMap uses a specific coordinate system convention (e.g., Z-up). Mismatches with other libraries or sensor data (e.g., ROS, custom camera setups) are a common source of bugs. Always verify your coordinate transformations.
fix
Explicitly transform your points to the OctoMap coordinate system before insertion, or ensure your data source aligns with it. Consult OctoMap C++ documentation for exact conventions.
affects: All versions
gotchaOctoMaps, especially at fine resolutions and for large environments, can consume significant amounts of RAM. Monitor memory usage to avoid out-of-memory errors in your applications.
fix
Optimize your map resolution based on actual application needs. Consider using smaller sub-maps or streaming data if memory becomes a constraint. Use `tree.prune()` to reduce memory if applicable.
affects: All versions
gotchaAs a wrapper around a C++ library, some errors might originate from the underlying OctoMap C++ code. These can sometimes manifest as cryptic Python exceptions or segfaults without clear Python tracebacks.
fix
Ensure all inputs to OctoMap functions are valid (e.g., non-NaN points, valid resolutions). For complex issues, isolating the problematic input or operation and consulting OctoMap's C++ documentation might be necessary.
affects: All versions
gotchaThere are multiple Python wrappers for OctoMap (e.g., `octomap-python`, `coctomap`). Ensure you are importing from the `octomap` module provided by `cmeel-octomap` to avoid conflicts or unexpected behavior if you have other wrappers installed.
fix
Always use `from octomap import ...` after installing `cmeel-octomap`. If issues arise, check `pip freeze` for other OctoMap-related packages and consider using a dedicated virtual environment.
affects: All versions
Upgrade
Version history
1.10.0latest on PyPI · released Jan 6, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
36 hits · last 30 days
node
32
OpenAI (training)
1
Resources
cmeel-octomap — pip install cmeel-octomap · libregistry