(Ⅰ) 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.
.png)
Nokov-vm
(Ⅱ) Image File Download (Recommended Method)
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.
- Import Virtual Machine
- Click File -> Open in the menu bar, check all supported files and select the target image file, as follows
.png)
NokovVM_2022.09.ova
- Set the virtual machine name and storage path as needed. Default settings are used here. Click Import as follows
.png)
Import Virtual Machine Settings
- If an import failure popup appears, click Retry
.png)
Import Failed
- After successful import, open the virtual machine. After startup, the interface displays as follows
.png)
Enter Virtual Machine
- 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
.png)
Add Drive
.png)
Use ISO Image
- 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:
.png)
Extract VMwareTools
.png)
Run vmware-install.pl Script
- Code Repository
Open the projects shortcut on the desktop, which contains source code projects related to drone software and hardware
.png)
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
.png)
Update Projects
(Ⅱ) Oracle VM VirtualBox
Use Oracle VM VirtualBox 6.1 to correctly configure and use the nokov-vm virtual machine
- Import Virtual Machine
- 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
.png)
Import Virtual Machine
- 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
.png)
Import Settings
- You can install VirtualBox Extension Pack and VBox Guest Additions as needed
- Code Repository
Same as VMWare above
Ⅲ. Software Tool Usage
(Ⅰ) cfclient
- 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
.png)
PA Connection
.png)
cfclient
- Connect Drone
- 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
.png)
Connect crazyflie
- 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
.png)
Modify Channel
- 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
.png)
Search Drone
- Firmware Online Upgrade
- 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
.png)
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
.png)
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
.png)
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
.png)
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.
- NAT Mode Connection
- VMWare menu bar Edit -> Virtual Network Editor, view NAT network segment
.png)
Virtual Network Configuration
- 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
.png)
Enable SDK
- 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
.png)
mocap_helper.launch
- Bridged Mode Connection
-
Virtual machine settings, add network adapter, select bridged mode (automatic)
-
Open Edit -> Virtual Network Editor, check bridge settings, default automatically bridge all, you can bridge only to a specific target network card as needed
.png)
Bridged Network Adapter
- 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
.png)
Connect Target Network Card
- 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
.png)
Network Connection
.png)
ifconfig View Network Card
- 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
.png)
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:
-
Unique point arrangement
-
Repeated point arrangement
-
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
- 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
- Nokovflie series drones can be mixed with Crazyflie 2.X series drones, and both are suitable for this virtual machine
- It is recommended to use the VMWare virtual machine environment, which is more stable than VirtualBox in terms of external device connections
- Problems during virtual machine use can be viewed or reported to the Issues section of the public repository
- The virtual machine username is: nokov Password: nokovflie