> ## Documentation Index
> Fetch the complete documentation index at: https://qualcomm-3.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up the environment for running sample applications

To successfully run the sample applications provided by the QIR SDK, you must complete the following settings on the host environment and the device to ensure proper running of the subsequent steps.

## Set up the device

Get the device ready for running sample applications by completing the following configurations:

<Tabs>
  <Tab title="IQ-9075 EVK">
    1. Navigate to [Set up the device](../../Linux/devices/iq9075-evk/set-up-the-device) of IQ-9075 documentation.
    2. Complete the following settings:

       a. [Set up the debug UART](../../Linux/devices/iq9075-evk/set-up-the-device#set-up-the-debug-uart).

       b. Connect the device to a network according to [Connect to the network](../../Linux/devices/iq9075-evk/set-up-the-device#connect-to-the-network).

       c. Connect to the device SSH shell according to [Connect over SSH](../../Linux/devices/iq9075-evk/set-up-the-device#connect-over-ssh).
  </Tab>

  <Tab title="IQ-8275 EVK">
    1. Navigate to [Set up the device](../../Linux/devices/iq8275-evk/set-up-the-device) of IQ-8275 documentation.
    2. Complete the following settings:

       a. [Set up the debug UART](../../Linux/devices/iq8275-evk/set-up-the-device#set-up-the-debug-uart).

       b. Connect the device to a network according to [Connect to the network](../../Linux/devices/iq8275-evk/set-up-the-device#connect-to-the-network).

       c. Connect to the device SSH shell according to [Connect over SSH](../../Linux/devices/iq8275-evk/set-up-the-device#connect-over-ssh).
  </Tab>
</Tabs>

## Set up the host computer

Ensure that the Ubuntu host and the device are in the same network by running `ping <device IP address>` on both the host computer and device.

```python theme={null}
ping <device/host IP address>
```

## **Set up the host Docker**

The sample applications use ROS 2 Jazzy for communication on the host. To isolate the impact of the host's Ubuntu version on ROS communication, perform the following steps to configure the Ubuntu 24.04 Docker environment.

## Prerequisites

Before you begin, ensure that:

* The host computer is running Ubuntu 24.04.
* Docker Engine is installed.
* The Docker service is running.
* The current user belongs to the `docker` group.

1. Download the `qrb_ros_simulation` repository and mesh files.
   ```powershell theme={null}
   mkdir -p ~/qrb_ros_simulation_ws
   cd ~/qrb_ros_simulation_ws
   git clone https://github.com/qualcomm-qrb-ros/qrb_ros_simulation.git
   cd qrb_ros_simulation
   git checkout -b 4dec08e7f35905389d7e76c5045a73616b6ec04c
   ```
2. Build the local Docker image.

   ```python theme={null}
   chmod +x scripts/docker_build.sh
   bash ./scripts/docker_build.sh
   ```

   <Note>
     **Note**

     If you encounter issues with Docker, see [Troubleshoot common issues](./troubleshoot).
   </Note>
3. Start a Docker container.
   ```python theme={null}
   chmod +x scripts/docker_run.sh
   bash ./scripts/docker_run.sh
   ```
4. In the Docker container, set a password for the `root` user and start the SSH service.
   ```powershell theme={null}
   # Set the password of user root
   passwd
   # Enable SSH service
   service ssh start
   ```
5. Identify the host IP address that the Docker container, development kit, and X server can reach. Do not use `127.0.0.1`, `localhost`, or a Docker-only bridge address such as `docker0`. On the host, list the interface addresses:
   ```bash theme={null}
   ip -4 addr show
   ```
   Use the IP address on the same network as the development kit. You can verify the address from the device with:
   ```bash theme={null}
   ping <host-interface-ip-address>
   ```
6. Open a new terminal on the host and connect to the Docker container through SSH.
   ```bash theme={null}
   ssh -X -p 222 root@<host-interface-ip-address>
   ```
7. Configure the ROS 2 environment and display settings. Set `DISPLAY` to the same reachable host interface address, because this is where the sample output is displayed.
   ```bash theme={null}
   (ssh) source /opt/ros/jazzy/setup.bash
   (ssh) export DISPLAY=<host-interface-ip-address>:0
   (ssh) export ROS_DOMAIN_ID=123
   (ssh) rqt
   ```

You have now built the Docker environment for ROS 2 Jazzy. If the environment is configured correctly, the `rqt` window is displayed on the host system.

<Note>
  **Note**

  For how to use `rqt` to view the running effect of the sample applications, see the steps of each sample application.
</Note>

## Next steps

* [Run the demo application](./run-demo-application)
* [Evaluate more sample applications](./qir-sdk-sample-applications)
* [Develop robotics applications](./develop-applications-using-the-qir-sdk)
