Documentation Index
Fetch the complete documentation index at: https://docs.neuronav.io/llms.txt
Use this file to discover all available pages before exploring further.
Get started quickly with these essential SLAM examples.
Minimal Example
The simplest possible SLAM application:
#!/usr/bin/env python3
from neuronav import RealSenseSensor, run_slam, RTABMapSLAM
sensor = RealSenseSensor()
slam = RTABMapSLAM()
run_slam(sensor, slam)
With Visualization
Enable 3D visualization in your browser:
#!/usr/bin/env python3
from neuronav import RealSenseSensor, run_slam, RTABMapSLAM
sensor = RealSenseSensor()
slam = RTABMapSLAM()
print("Open http://localhost:8765 in your browser")
run_slam(sensor, slam, visualize=True)
Using OAK-D Pro
Switch to OAK-D Pro camera:
#!/usr/bin/env python3
from neuronav import OAKDSensor, run_slam, RTABMapSLAM
sensor = OAKDSensor()
slam = RTABMapSLAM()
run_slam(sensor, slam, visualize=True)
Custom Configuration
Configure sensor and SLAM parameters:
#!/usr/bin/env python3
from neuronav import RealSenseSensor, SensorConfig, RTABMapSLAM, SlamConfig, run_slam
# Configure sensor
sensor_config = SensorConfig(
rgb_width=1280,
rgb_height=720,
fps=30,
enable_imu=True
)
# Configure SLAM
slam_config = SlamConfig(
enable_loop_closing=True,
custom_params={
"Vis/MaxFeatures": "1000",
"Vis/MinInliers": "20"
}
)
sensor = RealSenseSensor(sensor_config)
slam = RTABMapSLAM(slam_config)
run_slam(sensor, slam, visualize=True)
Save and Load Maps
Work with persistent maps:
#!/usr/bin/env python3
from neuronav import RealSenseSensor, RTABMapSLAM, run_slam
import os
MAP_FILE = "my_map.db"
sensor = RealSenseSensor()
slam = RTABMapSLAM()
# Load existing map if available
if os.path.exists(MAP_FILE):
slam.load_map(MAP_FILE)
# Run SLAM
try:
run_slam(sensor, slam, duration=60)
finally:
slam.save_map(MAP_FILE)
Running Examples
Clone and run:
git clone https://github.com/neuronav-io/neuronav-slam-sdk.git
cd neuronav-slam-sdk/examples
python3 minimal_slam.py
With Docker:
docker run -it --rm --privileged -v /dev:/dev \
neuronav-slam python3 /workspace/examples/minimal_slam.py
Next Steps
Custom SLAM
Advanced examples and use cases
Configuration
Detailed configuration options
Custom Sensors
Add your own camera
Troubleshooting
Solve common issues