> ## 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.

# Installation

> Complete installation guide for Neuronav SLAM SDK with Docker and native setup

Choose your installation method based on your needs. Docker is recommended for the fastest setup.

<Tabs>
  <Tab title="Docker (Recommended)">
    ## Quick Setup with Provided Scripts

    The SDK includes scripts for easy Docker deployment with all dependencies pre-configured.

    ```bash theme={null}
    # 1. Clone the repository
    git clone https://github.com/neuronav-io/neuronav-slam-sdk.git
    cd neuronav-slam-sdk

    # 2. Build Docker image
    ./docker_build.sh

    # 3. Run container with camera access
    ./docker_run.sh
    ```

    ## What's Included

    The Docker image automatically installs:

    * ROS2 Humble
    * RTAB-Map SLAM
    * Intel RealSense drivers
    * OAK-D Pro (DepthAI) drivers
    * All Python dependencies

    ## Verify Installation

    Inside the container:

    ```bash theme={null}
    # Test SDK import
    python3 -c "from neuronav import RealSenseSensor; print('✅ SDK ready!')"

    # Test camera detection
    realsense-viewer  # For RealSense cameras
    ```

    ## Manual Docker Setup

    If you prefer manual control:

    ```bash theme={null}
    # Build image
    docker build -t neuronav-slam .

    # Run with camera access
    docker run -it --rm \
      --privileged \
      --network host \
      -v /dev:/dev \
      -v $(pwd):/workspace \
      -e DISPLAY=$DISPLAY \
      -v /tmp/.X11-unix:/tmp/.X11-unix \
      neuronav-slam
    ```

    <Note>
      **Windows Users**: Use WSL2 with Ubuntu 22.04 and follow the Docker instructions above.
    </Note>
  </Tab>

  <Tab title="Native Ubuntu">
    ## Step 1: Install System Dependencies

    ```bash theme={null}
    # Update system
    sudo apt update && sudo apt upgrade -y

    # Install essential tools
    sudo apt install -y curl git python3-pip build-essential cmake
    ```

    ## Step 2: Install ROS2 Humble

    ```bash theme={null}
    # Add ROS2 repository
    sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
      -o /usr/share/keyrings/ros-archive-keyring.gpg

    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] \
      http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | \
      sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

    # Install ROS2
    sudo apt update
    sudo apt install ros-humble-desktop ros-dev-tools -y

    # Setup environment
    echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
    source ~/.bashrc
    ```

    ## Step 3: Install RTAB-Map SLAM

    ```bash theme={null}
    # RTAB-Map and required packages
    sudo apt install -y \
      ros-humble-rtabmap-ros \
      ros-humble-imu-filter-madgwick \
      ros-humble-foxglove-bridge \
      ros-humble-image-transport-plugins
    ```

    ## Step 4: Install Camera Drivers

    **For Intel RealSense:**

    ```bash theme={null}
    # Add Intel repository
    sudo mkdir -p /etc/apt/keyrings
    curl -sSf https://librealsense.intel.com/Debian/librealsense.pgp | \
      sudo tee /etc/apt/keyrings/librealsense.pgp > /dev/null

    echo "deb [signed-by=/etc/apt/keyrings/librealsense.pgp] \
      https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" | \
      sudo tee /etc/apt/sources.list.d/librealsense.list

    # Install
    sudo apt update
    sudo apt install -y \
      librealsense2-dkms \
      librealsense2-utils \
      ros-humble-realsense2-camera
    ```

    **For OAK-D Pro:**

    ```bash theme={null}
    # Install DepthAI
    pip3 install depthai opencv-python
    sudo apt install -y ros-humble-depthai-ros

    # Setup udev rules
    echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"' | \
      sudo tee /etc/udev/rules.d/80-depthai.rules
    sudo udevadm control --reload-rules && sudo udevadm trigger
    ```

    ## Step 5: Install Neuronav SDK

    ```bash theme={null}
    # Clone repository
    git clone https://github.com/neuronav-io/neuronav-slam-sdk.git
    cd neuronav-slam-sdk

    # Install SDK
    pip3 install -e .
    ```

    ## Step 6: Verify Installation

    ```bash theme={null}
    # Test SDK
    python3 -c "from neuronav import RealSenseSensor; print('✅ SDK ready!')"

    # Test camera
    realsense-viewer  # For RealSense
    ```

    <Note>
      **WSL2 Users**: Follow these instructions inside your Ubuntu 22.04 WSL2 distribution. You'll need USBIPD to connect cameras.
    </Note>
  </Tab>
</Tabs>

## Troubleshooting

**Camera not detected:**

```bash theme={null}
# Check USB connection
lsusb | grep -E "Intel|Luxonis"

# Add user to video group
sudo usermod -a -G video $USER
# Log out and back in
```

**ROS2 not found:**

```bash theme={null}
# Source ROS2 environment
source /opt/ros/humble/setup.bash
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
```

For more help, see the [full troubleshooting guide](/configuration/troubleshooting).

## What's Next?

<CardGroup cols={3}>
  <Card title="Quick Start" icon="play" href="/getting-started/quickstart">
    Run your first SLAM
  </Card>

  <Card title="Examples" icon="code" href="/examples/basic-slam">
    See code examples
  </Card>

  <Card title="Configuration" icon="sliders" href="/configuration/overview">
    Customize settings
  </Card>
</CardGroup>
