Skip to main content

(Ⅰ) Virtual Machine Configuration

Ⅰ. Nokov-vm Virtual Machine Introduction

(Ⅰ) Introduction

Nokov-vm virtual machine image is a virtual machine image file exclusively customized for nokovflie drones, and is also compatible with crazyflie drones. The virtual machine contains the software and hardware development and deployment environment for nokovflie drones, integrates the ROS platform and crazyswarm platform, and supports rapid access to the nokov optical motion capture positioning system to achieve indoor swarm control algorithm verification.

Nokov-vm

Nokov-vm

Nokov-vm virtual machine image files use the open virtual machine format ova for storage, and can support mainstream virtual machines on the market, including VMware, VirtualBox, etc.

The public image file is located under the Release version of the open source code repository: nokov-vm.ova

Link: https://share.weiyun.com/WLUKpGVE Password: zm67f3

(Ⅲ) Custom Image File (Advanced)

Nokov-vm virtual machine is created based on scripts, supporting users to customize and add software packages by modifying scripts. For the generation of virtual machine images, please refer to How to Create Nokov VM image.

(Ⅳ) Public Code Repository

https://github.com/NOKOV-MOCAP/nokov-vm

Ⅱ. Virtual Machine Usage

(Ⅰ) VMWare WorkStation

Use vmware workstation pro16 to correctly configure and use the nokov-vm virtual machine.

  1. Import Virtual Machine
  1. Click File -> Open in the menu bar, check all supported files and select the target image file, as follows
NokovVM_2022.09.ova

NokovVM_2022.09.ova

  1. Set the virtual machine name and storage path as needed. Default settings are used here. Click Import as follows
导入虚拟机设置

Import Virtual Machine Settings

  1. If an import failure popup appears, click Retry
导入失败

Import Failed

  1. After successful import, open the virtual machine. After startup, the interface displays as follows
进入虚拟机

Enter Virtual Machine

  1. For convenient external copy-paste and full-screen display, install VMWareTools. First, right-click the virtual machine settings, add CD/DVD drive, then set to use ISO image, select linux.iso under the vmware installation path, and check Connect at startup
添加驱动器

Add Drive

使用ISO镜像

Use ISO Image

  1. Click the disc icon on the desktop, copy VMwareTools*.tar.gz to the desktop, open the terminal on the desktop, that is, right-click OpenTerminalHere, enter tar -zxvf VMwareTools*.tar (where * refers to the specific file name), then enter the extracted directory, run the vmware-install.pl script, enter yes and then press Enter by default throughout. After installation, the interface will display in full screen. The entire process operation commands are as follows:
解压VMwareTools

Extract VMwareTools

运行vmware-install.pl脚本

Run vmware-install.pl Script

  1. Code Repository

Open the projects shortcut on the desktop, which contains source code projects related to drone software and hardware

代码仓库

Code Repository

Click the Update all projects icon on the desktop, and the system will automatically update the repository code under projects. You can choose whether to update as needed. It is recommended to use a VPN

更新项目

Update Projects

(Ⅱ) Oracle VM VirtualBox

Use Oracle VM VirtualBox 6.1 to correctly configure and use the nokov-vm virtual machine

  1. Import Virtual Machine
  1. Click Management -> Import Virtual Computer in the menu bar, set the source as local file system, select the virtual machine file to import, then select Next
导入虚拟机

Import Virtual Machine

  1. Check the virtual computer import settings, set the default virtual computer location, other configuration parameters can remain default, the default memory size is 6GB, which can be adjusted appropriately according to the host situation. After configuration is complete, click the Import option to import the virtual machine, and wait for the import operation to complete
导入设置

Import Settings

  1. You can install VirtualBox Extension Pack and VBox Guest Additions as needed
  1. Code Repository

Same as VMWare above

Ⅲ. Software Tool Usage

(Ⅰ) cfclient

  1. Connect Radio PA

Insert the Radio PA USB device, and a popup will appear as shown below, or select Virtual Machine -> Removable Devices -> PA USB Dongle -> Connect in the menu bar. Only after correctly identifying the PA device can the cfclient tool work normally

PA连接

PA Connection

cfclient

cfclient

  1. Connect Drone
  1. Use USB cable to connect drone: When initially used and the drone communication address is unknown, you can use a USB cable to connect the drone and connect it to the virtual machine. In the cfClient interface, click the Scan button, and the tool can identify the drone device
连接crazyflie

Connect crazyflie

  1. Click the Connect button. After the drone is successfully connected, you can observe the pose value changes on the drone panel, as well as various information such as the current remaining battery power of the drone. Click Connect -> Configure2.x in the menu bar. In the configuration dialog, you can observe that the current drone's configured communication address is 0xE7E7E7E706. Record this address, and you can directly use Radio wireless communication to connect to the drone later. Similarly, you can directly modify the communication address here. Modify the value in the dialog, click Write to write, and restart to take effect
修改信道

Modify Channel

  1. Use wireless to connect drone: When the drone communication address is known, in the CfClient tool, set the drone communication address, for example 0xE7E7E7E706 here. When the drone is running normally, click Scan to detect the target drone, select the interface and click the connect button to connect
搜索无人机

Search Drone

  1. Firmware Online Upgrade
  1. When the drone is successfully connected through Radio PA and has sufficient power, you can perform online firmware upgrade through the client tool. Click Connect -> Bootloader in the menu bar to enter the firmware update interface. At this time, the status is displayed as connected in firmware mode. Pull down the dropdown box, select the latest update package (with cf2), click Program, wait for firmware download and automatic installation. Do not disconnect during installation. After completion, the drone will automatically restart
更新固件

Update Firmware

4 Other Functions

For other functions of the cfclient tool, please refer to the User Guide

Ⅳ. CrazySwarm Platform Usage

(Ⅰ) Introduction

Crazyswarm is a platform suitable for close flight control of multiple micro drones (swarms). The platform supports multiple different positioning systems, especially optimized for optical motion capture positioning systems, and supports mainstream motion capture systems.

(Ⅱ) Project Introduction

The Crazyswarm project is located in the projects directory. It is recommended to open it with VSCode editor

项目目录

Project Directory

There are several important file directories and configuration files in the Crazyswarm project, which are introduced one by one below

ros_ws directory: This directory is the ROS workspace, created based on catkin. The compilation and running of the platform source code are all completed in this directory

编译

Compilation

externalDependencies directory: This directory stores libraries related to external motion capture dependencies, supporting nokov optical positioning motion capture data access to the crazyswarm platform

Src directory: The source code directory of the crazyswarm platform, maintaining and managing the communication control of drone swarms

crazyswarm目录

crazyswarm Directory

Launch directory: Contains defined launch files and necessary key configuration files

Hover_swarm.launch file: Responsible for establishing communication connection between the drone swarm and the platform, then waiting for external control commands

Mocap_helper.launch: Specifically used to test whether the external motion capture system is working normally, whether motion capture data can be correctly received, including unnamed points and rigid body data, and to visually observe and verify data

CrazyflieTypes.yaml: Used to configure drone types and various firmware parameters

Crazyflies.yaml: Used to configure the communication connection address and initial position information of each drone

(Ⅲ) Test and Verify Motion Capture Positioning System

Before drone flight, in addition to completing necessary flight checks, you also need to test and verify whether the motion capture positioning system data is normally accessed. The following demonstrates the test process. First, correctly configure the network environment.

  1. NAT Mode Connection
  1. VMWare menu bar Edit -> Virtual Network Editor, view NAT network segment
虚拟网络配置

Virtual Network Configuration

  1. Set the broadcast network card address in the motion capture software to the host virtual adapter address (on the same network segment, you can view the IP through the command line), and check the SDK Enable checkbox
开启SDK

Enable SDK

  1. Set and modify the motion_capture_host_name parameter in the mocap_helper.launch file, change it to the above address, save, and run the roslaunch crazyswarm mocap_helper.launch command as follows. Motion capture data can be received normally
mocap_helper.launch

mocap_helper.launch

  1. Bridged Mode Connection
  1. Virtual machine settings, add network adapter, select bridged mode (automatic)

  2. Open Edit -> Virtual Network Editor, check bridge settings, default automatically bridge all, you can bridge only to a specific target network card as needed

桥接网络适配器

Bridged Network Adapter

  1. Click the upper left corner of the desktop, search for ad, open the first recommended option, Advanced Network Configurator, select the newly appeared wired connection1, double-click to enter edit state, select the newly added Device
连接目标网卡

Connect Target Network Card

  1. Manually configure the IP address to be on the same network segment as the motion capture broadcast network card interface. The configuration below is 192.168.1.13, and the motion capture broadcast network card interface is changed to 192.168.1.12. Click Save, restart the virtual machine, and check the network card. The address takes effect
网络连接

Network Connection

ifconfig查看网卡

ifconfig View Network Card

  1. Configure the mocap_helper.launch file interface parameter motion capture broadcast network card interface to 192.168.1.12, run the roslaunch command, output as follows
mocap_helper.launch

mocap_helper.launch

(Ⅳ) Drone Flight Control

After completing necessary flight checks and motion capture system positioning data access tests, you can then control single/multiple drone flights through Python scripts under the crazyswarm platform to complete specified formation actions or complex algorithm verification work

CrazySwarm supports different object tracking modes under the motion capture positioning system, which are:

  1. Unique point arrangement

  2. Repeated point arrangement

  3. Single point. For different tracking modes and parameter settings before flight, please refer to the official documentation: Drone Flight Configuration. The following uses a simple flight experiment as an example to explain the specific operation process

  1. Takeoff and Landing in Place

The takeoff and landing in place experiment is the most basic indoor flight test experiment. After startup, the drone will complete several steps (takeoff -> hover at specified height -> landing) at the fixed placement point, which can quickly test the stability of single/multiple machines in the experimental environment and pave the way for subsequent experiments.

This experiment uses the repeated point arrangement method. For specific experimental steps, please refer to the Nokov official series document "Hover Experiment"

Ⅴ. Friendly Tips

  1. Nokovflie series drones can be mixed with Crazyflie 2.X series drones, and both are suitable for this virtual machine
  2. It is recommended to use the VMWare virtual machine environment, which is more stable than VirtualBox in terms of external device connections
  3. Problems during virtual machine use can be viewed or reported to the Issues section of the public repository
  4. The virtual machine username is: nokov Password: nokovflie