Virtual Skynode

Usage of Virtual Skynode and its apps. Virtual Skynode simulates a Skynode device that can be used for app development

The Virtual Skynode allows you to fully simulate a Skynode device running AuterionOS. With Virtual Skynode you get all the benefits of a physical Skynode during app development. For example:

  • Virtual Skynode offers the same APIs for installing and managing apps as a physical Skynode

  • The MAVLink communication inside Virtual Skynode is set up identically to a physical Skynode

  • Apps do not need to be aware that they are being installed in a Virtual Skynode. This significantly simplifies the build workflow of apps

  • Virtual Skynode's simulated hardware closely resembles a real device when it comes to number of CPU cores, amount of system memory, file system partitioning and size etc.

Getting started

Virtual Skynode requires two components:

  1. virtual-skynode launcher package installed through your operating system's package manager

  2. virtual-skynode's AuterionOS image which can be found on Suite

The installation of both components is explained in the following section.

Installation

In order to use the Virtual Skynode, the launcher has to be installed on the developer machine first.

The following instructions were tested on Ubuntu 22.04:

Verify that your system supports Kernel-based Virtual Machine (KVM) by running:

sudo apt install cpu-checker
sudo kvm-ok

If this check does not return positively, CPU virtualization is most likely disabled in the BIOS. Virtual Skynode can be used without KVM, but this comes with a heavy performance penalty as the Virtual Skynode CPU will then be fully emulated in software.

Add the public Auterion debian package repository to apt:

curl -1sLf 'https://dl.cloudsmith.io/public/auterion/public/setup.deb.sh'| sudo -E bash

Install the Virtual Skynode:

sudo apt update
sudo apt install virtual-skynode

Downloading the AuterionOS image for Virtual Skynode

In order to run Virtual Skynode, you have to download AuterionOS for Virtual Skynode by visiting https://suite.auterion.com and then browsing the Downloads > App Developer Tools page.

You have to be part the Skynode Developer program to obtain AuterionOS for Virtual Skynode

Launching the Virtual Skynode

Ensure that you are currently in the directory that contains the downloaded AuterionOS rootfs and run (replace <VERSION-NUMBER>):

virtual-skynode run --rootfs virtual-skynode-rootfs-<VERSION-NUMBER>.qcow2 --storage ~/.virtual-skynode --guest-ip 10.41.200.2

Running this command will launch the Virtual Skynode using the downloaded version of AuterionOS. It will also (if not already present) create a storage repo in ~/.virtual-skynode that will be used as persistent storage for all apps and files that will be created/uploaded to the Virtual Skynode.

If you want to run a different AuterionOS rootfs, make sure to use a different storage location or clear your current storage location by resetting your Virtual Skynode.

The IP specified in --guest-ip can be used to interface with the running Virtual Skynode. You can choose any IP in the 10.41.200.0/24 subnet. If you are looking for an interactive setup you can also just type virtual-skynode.

Check that Virtual Skynode is up and running by visiting the IPv4 address specified at launch. By default this is http://10.41.200.2:

When you run the virtual-skynode command for the first time, it initiates an app installation process. Do not prematurely stop the virtual-skynode process before it successfully completes the installation. If you do so, it may result in a corrupt configuration, which cannot automatically recover and you will have to reset your Virtual Skynode. You can ensure the installation is complete with the web interface in Dashboard panel.

Virtual FMU app

The backbone of any Virtual Skynode setup is formed by the Virtual-FMU app. This app runs the PX4 Autopilot code on your Virtual Skynode and allows you to use PX4 as you would on a real Skynode.

The Virtual FMU is automatically installed as a system default app on your Virtual Skynode

Usage

  1. With Virtual Skynode running visit its web interface at http://10.41.200.2

  2. Virtual FMU starts in self-contained SIH mode by default. This mode doesn't require an external gazebo instance, you can directly connect with Auterion Mission Control and fly.

Gazebo Simulation

As an alternative to running in self-contained SIH mode, the Virtual FMU app can also run an external Gazebo Sim.

Auterion provides a meta Debian package called simulation-gazebo that essentially acts as a wrapper for default Gazebo Sim. It sets several environmental variables that are required to create a network connection between Gazebo and the Virtual FMU app.

Installation

If you have not done so already, setup simulation-gazebo by following the instructions here: Simulation-Gazebo Reference

Switch to Gazebo Simulation Mode

  1. Run simulation-gazebo to launch gazebo. This should open up a Gazebo Sim window

  2. Go to the Virtual FMU configuration browser tab

  3. Click the Simulation mode dropdown menu and select the desired simulation mode

  4. Then click the "Reload Simulation" button

If you don't have gazebo running on your host, you will see the following warning: WARN [gz_bridge] Service call timed out as Gazebo has not been detected

If everything has been installed correctly you should see the vehicle show up in your Gazebo Sim window.

Build and Install Auterion Apps

Your Auterion apps that you have built for Skynode will fail to install on Virtual Skynode. This is because apps for Skynode target the linux/arm64 architecture, whereas apps for Virtual Skynode running on your machine need to target linux/amd64.

To build your Auterion app for Virtual Skynode, you can follow the Application Development workflow:

auterion-cli app build --simulation

This will produce a *-simulation.auterionos artifact compatible with Virtual Skynode. You can now install your app either via auterion-cli app install, or navigating the web interface at http://10.41.200.2 to Dashboard > Install Software.

Auterion Mission Control

You can also connect Auterion Mission Control (AMC) to the Virtual FMU. To do so open the AMC settings and select the tab "Settings/Comm Links". There create a new comm link configuration with the following settings:

SettingValue

Name

Can be an arbitrary string

Type

TCP

Automatically Connect on Start

True or False, based on personal preference

High Latency

False

Host Address

10.41.200.2

TCP Port

5790

Click on the created comm link and select "Connect" at the bottom.

Last updated