# VOXL2 Setup

## Hardware Setup

ACO is designed to run on the ModalAI VOXL 2 or Auterion Skynode and supports operation either with an external flight controller, such as the Pixhawk family or using VOXL-PX4 directly.

When using an external flight controller, connect the VOXL2 to the FCU via a serial link on one of the `TELEMx` ports. The LightWare SF45 should be connected to any available USB port on the VOXL2.

The SF45 is a rotating 2D LiDAR. For best performance with ACO, mount the unit upright or upside down on the drone, its internal sensors automatically determine orientation. Ensure the front of the LiDAR is precisely aligned with the front of the aircraft and that its field of view is unobstructed by propellers, ducts, or payloads.

When ACO is installed, it automatically detects the SF45’s USB port and connects to it. This auto-connection starts spinning the SF45 which provides a simple visual indication that ACO is active and operating correctly.

## Install ACO on the VOXL2

To purchase the ACO software license, use this [link](https://ascendengineering.lemonsqueezy.com/buy/53d2ef2e-e4d4-4b48-9c23-7df0c8c75a01).

Then use the [Ascend Installer](https://ascendengineering.github.io/ascend-software-hosted/) to install ACO on the drone with the purchased license.

By the end of this guide, on a successful install and hardware setup, you should start to see the SF45 start spinning automatically.

## Flight Controller Setup

This step involves configuring the flight controller, the component responsible for the drone’s overall control and behavior.

The next few steps would execute commands on the VOXL2, so make sure to have `ssh`/`adb` access.&#x20;

### If using an external Flight Controller

If you are using an external flight controller such as a Pixhawk 6C, connect the VOXL2 to the Pixhawk via a serial connection on a `TELEMx` port.

Next, we have to configure the `TELEMx` port to connect to ACO:&#x20;

* Connect to the FCU over QGC
* Go to the Parameters list, and edit the `MAV_x_CONFIG` to `TELEMx` , where `TELEMx` corresponds to the `TELEM` port the FCU is connected to the VOXL2
* Next, edit the `SER_TELx_BAUD` to 921600 (It should be by default)

{% hint style="info" %}
It should be noted that without setting `MAV_x_CONFIG` , the `SER_TELx_BAUD` parameter does not show up
{% endhint %}

For example, lets say the VOXL2 is connected to the `TELEM2` port on the FCU, then we could set `MAV_1_CONFIG` to `TELEM2` , and so `SER_TEL2_BAUD` would need to be set to 921600 (It should be by default)

#### Verify communication

Open `voxl-mavlink-server.conf` on the VOXL2

```bash
vi /etc/modalai/voxl-mavlink-server.conf
```

Edit the following:

* `en_external_uart_ap` : true
* `autopilot_uart_bus` :  Set this value based on which UART bus is connected to the FCU. Refer to the VOXL2 expansion board table in the ModalAI documentation and select the corresponding UART bus value from [here](https://docs.modalai.com/voxl2-external-flight-controller/#voxl-sdk-software-setup).
  * This parameter tells the VOXL MAVLink server which UART interface is connected to the flight controller.

Save and exit: `!qa`&#x20;

To verify if the VOXL2 and FCU are connected, run this on the VOXL2:

```bash
voxl-mavlink-server -k
```

`-k` switch shows debug info on messages coming FROM the FCU

You should be getting a stream of data like so:

```bash
RECV  msg ID:    83 sysid:  1 from bus: 1
RECV  msg ID:    85 sysid:  1 from bus: 1
RECV  msg ID:    74 sysid:  1 from bus: 1
RECV  msg ID:    30 sysid:  1 from bus: 1
RECV  msg ID:   111 sysid:  1 from bus: 1
RECV  msg ID:   105 sysid:  1 from bus: 1
RECV  msg ID:    30 sysid:  1 from bus: 1
RECV  msg ID:    31 sysid:  1 from bus: 1
RECV  msg ID:    33 sysid:  1 from bus: 1
RECV  msg ID:    32 sysid:  1 from bus: 1
RECV  msg ID:   331 sysid:  1 from bus: 1
RECV  msg ID:    24 sysid:  1 from bus: 1
RECV  msg ID:    30 sysid:  1 from bus: 1
```

With this, keep in mind the UART port (`/dev/ttyXXX`) the VOXL2 uses to connect to the FCU.

Open the `/etc/ascend/ascend-co.config` file:

```bash
vi /etc/ascend/ascend-co.config
```

{% hint style="info" %}
`MAV_PORT` by default is empty, and uses a default value of `serial:///dev/ttyHS2:921600`
{% endhint %}

Edit the `"MAV_PORT": "",` line, to reflect the UART port used by the VOXL2 for communication with the FCU:

```bash
"MAV_PORT": "serial://<YOUR PORT HERE>:921600",
```

For example, if the VOXL2 is connected on the `/dev/ttyHS1` port, the entry would be:

```bash
"MAV_PORT": "serial:///dev/ttyHS1:921600",
```

### If using `voxl-px4`&#x20;

If you are using the native `voxl-px4` flight controller running on the VOXL2:

* Make sure `voxl-px4` is enabled and running:

```bash
systemctl enable voxl-px4
systemctl start voxl-px4
```

* Verify that it is active and running:

```bash
voxl-inspect-services
```

* Edit the `"MAV_PORT": "",` in `/etc/ascend/ascend-co.config` to `"udp://0.0.0.0:14557"`

```bash
vi /etc/ascend/ascend-co.config
```

It should look like this:

```bash
"MAV_PORT": "udp://0.0.0.0:14557",
```

## Connecting ACO to a Ground Control Station (GCS)

To establish communication between the ACO running on the VOXL2 and a GCS, you can either:

1. **Add a Comm Link in GCS Application Settings**
2. **Manually Set GCS IP Address within ACO Parameters via QGC**

Before you begin, ensure both the VOXL2 and GCS device are connected over the same wireless communication network.

### Add a Comm Link in GCS Application Settings

Note down the IP address of your VOXL2.

#### QGroundControl

On QGC, navigate to `Application Settings → Comm Links` , and click **Add** under `Links`&#x20;

{% hint style="info" %}
Remember to replace **192.168.1.157** below with your drones IP address
{% endhint %}

For a **UDP connection**:

<figure><img src="/files/XrqmD1vyXL3SvhfO1zmZ" alt=""><figcaption></figcaption></figure>

For a **TCP connection**:

<figure><img src="/files/fz1WqQEWdgIRsJJOOl1w" alt=""><figcaption></figcaption></figure>

### Manually Set GCS IP Address within ACO Parameters via QGC

Another way to have ACO relay MAVLink data to your GCS, is by editing ACO's GCS IP parameters.

Note down your GCS device's IP address.&#x20;

ACO parameters can be edited through QGC. Among these parameters is the IP address of the GCS instance, which you can update to point to your QGC.

1. Connect the FCU to your GCS device via USB
2. Launch QGC, the MAVLink data should load up
3. Navigate to: `Vehicle Configuration → Parameters`
4. Locate **Component 85:** This corresponds to the ACO program running on the VOXL2.
5. Under **Component 85**, find the following parameters in `MAV`:
   * `MAV_GCS_IP1`
   * `MAV_GCS_IP2`

<figure><img src="/files/8ExX1iKRx8NDgetGapa4" alt=""><figcaption></figcaption></figure>

The GCS IP address must be split into two parts:

* **First half (first two octets)** → `MAV_GCS_IP1`
* **Second half (last two octets)** → `MAV_GCS_IP2`

#### Example IP Address Inputs

| GCS IP Address | MAV\_GCS\_IP1 | MAV\_GCS\_IP2 |
| -------------- | ------------- | ------------- |
| 192.168.1.12   | 192.168       | 1.12          |
| 10.92.11.120   | 10.92         | 11.120        |
| 172.16.5.45    | 172.16        | 5.45          |
| 192.168.100.7  | 192.168       | 100.7         |

Once entered, restart ACO for the changes to take effect: Under `MAV` , locate the parameter `MAV_ACO_RST`, set its value to `1` and hit **Save**. You can now disconnect the USB connection to the FCU.

As ACO restarts after the parameter change, ACO will automatically relaunch and attempt to reconnect using the configured IP address.&#x20;

Make sure you are able to see the ACO parameters load up under `Vehicle Configuration → Parameters` again.

## Foxglove

ACO visualizes pointcloud and collision-prevention data in Foxglove.

Install foxglove from here: <https://foxglove.dev/download>.

On the Foxglove Dashboard page, click **Open Connection**.

Replace **localhost** with the drones IP address (Make sure to be on the same local network), and you should see the points populate in a 3D environment.

<figure><img src="/files/kg4HHTnSh7GOg3glg2Ar" alt=""><figcaption></figcaption></figure>

## Edit PX4 Params

Make sure the `SYS_VEHICLE_RESP` is ≥ 0.5

* This is to make sure the drone stops aggressively and in time
* If the landing speed is aggressive, decrease the `MPC_Z_VEL_MAX_DN` to `1m/s`

## Diagnostics

1. Disconnecting the SF45 from the USB cable should result in a status text error

<figure><img src="/files/gfNzVsOYkEMr7442KCH3" alt=""><figcaption></figcaption></figure>

If this does not show up, that means the drone is not connected to GCS

* Double check the entered GCS IP address
* Ensure you are able to ping GCS from the drone and vice versa

2. ACO parameters should load up in your GCS

* Locate **Component 85:** This corresponds to the ACO program running on your Drone.

## Final things to keep in mind

* As a final setup step, please set `SYS_VEHICLE_RESP = 0.5` and `MPC_Z_VEL_MAX_DN = 1 m/s` in the PX4 parameters. These values help the drone stop in time, without them we’ve seen it get a bit too close to obstacles.
* The software is active only in `Mission mode` and `while airborne` (it’s inactive during takeoff, landing, or in other modes).
* For a first test flight, we recommend the following settings:&#x20;
  * Plan a simple mission, where the drone goes 15m forward, then returns to its take off point
  * Set the mission speed to 1 m/s.&#x20;
  * Try holding a stick or any movable object in front of the drone at some distance after takeoff to see the system react.&#x20;
  * Once that looks good, you can test it against a wall or tree. We’ve thoroughly tested this on our end and don’t expect issues, but it’s always good to take extra safety precautions when running it in a new environment.

{% hint style="warning" %}
Always make sure to have back up joysticks ready incase you see the drone get too close to the obstacle
{% endhint %}

* Note that the SF45 can detect dust particles, so in dusty conditions, it might falsely flag fine dust as an obstacle.
* Please refer to the [ACO Parameters Description](https://ascend-engineering.gitbook.io/ascend-collision-overwatch/aco-parameters-description) page for a better understanding of ACO’s features.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ascend-engineering.gitbook.io/ascend-collision-overwatch/voxl2-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
