Cube Rover Demonstration

Hi. I’m just here to share some tips on building a rover with Cube and other common peripherals. Most of the instructions are written in Ardupilot wiki.

Rover with Here2

Screenshot 2022-01-07 153241

Cube: Black

GPS: Here3

Lidar: Rplidar A2

This build is quite straight forward. Setting up everything and it should work. The couplers on my rover were 3D printed and they loosen over time. Therefore it is not moving quite perfectly straight in the video.

Setup are exactly same as instruction in Ardupilot wiki

Rover with Realsense T265

Cube: Black

Companion computer: Raspberry Pi (w. APSync) /Intel UP2 (w. Ubuntu 18)

Motion camera: Intel Realsense T265

Another build a rover with companion computer and vision positioning sensor

Companion computer Setup

Raspberry Pi connection

Flash APSync into the SD card. The T265 scripts should be already installed.

If you want to use raspbian, setup as mentioned here

If you use Ubuntu, follow the steps here

UP2 connection

Connect the UP2 with telem port, according to its pinout.

Setup the UP2 system as mentioned in their wiki (eg: Ubuntu). You will need to install their kernal to enable the HAT.

I’m using ubuntu 18.

If you connect them as shown in the figure above, the Cube should appear in ttyS5.

Software Installation and Parameter Setup

Setup the companion computer if you are not using APSync. If you use APSync, start from Configure ArduPilot.

I’m using EK3 with compass disabled.


Install mavproxy for ease on verifying connection to autopilot

Remove modemmanager so that it won’t conflict with serial communication

Install mavlink router to route more ports for potential usages

Follow the instructions in wiki to complete the remaining steps:

Mavlink Router Setting

Create the config file in /etc/mavlink-router/main.conf

[UartEndpoint alfa]
Device = /dev/ttyS5
Baud = 921600
[UdpEndpoint bravo]
Mode = Normal
Address =
Port = 14460
[UdpEndpoint Charlie]
Mode = Normal
Address =
Port = 14470
Make autorun at boot

Create the bash script


Create the service in /etc/systemd/system/mavlink_router.service

Description=Mavlink Router Service
User={your username}
ExecStart={path to}

Enable and start the service

systemctl start mavlink_router
systemctl enable mavlink_router

T265 with UDP port

We have routed port 14460 and 14470 from serial port. Now we can use them to connect to autopilot.

Base on the T265 script (serial) in wiki, further modify it:

connection_string_default = 'udpin:'
conn = mavutil.mavlink_connection(
autoreconnect = True,
source_system = 255,
source_component = 93,
target_system = 1
Make autorun at boot

Same as wiki but since we use udp routed my mavlink router, we want it to start after mavlink router service. In the first part of t265.service:

Description=Realsense T265 Service mavlink_outer.service

Don’t forget to start and enable the service.

Connection Test

Now if you have gone through the steps, it should work. Verify this in Mission Planner as mentioned in wiki.

The port 14470 is a spare, you can connect it from companion computer via mavproxy to confirm the connection. --master=udp:localhost:14470 --console --map --target-system=1 --target-component=0

You can also use it for various applications such as ROS.

Auto Mission Test