(Ⅱ) Nokovflie User Manual
Ⅰ. Pre-use Preparation
-
Nokov Optical Motion Capture System
Correctly connect the Nokov optical motion capture system and open XingYing software; the motion capture system uses an L-shaped calibration frame to create a coordinate system, with the corner point as the origin, the long side as the positive X-axis direction, the short side as the positive Y-axis direction, and the normal upward as the positive Z-axis direction; use this as a benchmark to determine the three-dimensional space origin and coordinate axis orientation, ensuring that the drone nose is placed facing the positive X-axis direction during experiments;
 (1).png)
L Calibration Bar
-
Nokov-vm Virtual Machine
Correctly connect the virtual machine and complete the corresponding virtual machine configuration; Nokov-vm virtual machine login password: nokovflie
.png)
Nokov-vm Virtual Machine Interface
If you have any questions, please refer to "Nokovflie Virtual Machine User Tutorial.pdf" for settings;
- crazyflie drones * 4
① Configure the addresses of 4 aircraft. For details, see Chapter 3 CFClient Description in "Nokovflie Virtual Machine User Tutorial.pdf";
② Update drone firmware (skip this step if the firmware has not been modified or has been updated recently);
③ Connect the drone power supply and turn on the switch. The drone will sound a prompt and perform propeller self-check. Confirm the rotation direction as shown in the figure below.
.png)
Propeller Rotation Direction Diagram
-
crazyradio wireless communication module * 1
Insert into USB port, and select Connect to Virtual Machine in the popup dialog;
.png)
Crazyradio Wireless Module
Ⅱ. Crazyswarm Parameter Modification
Double-click to open Visual Studio Code on the virtual machine desktop, and modify the parameter configuration of the following files in the path:
/home/nokov/projects/crazyswarm/ros_ws/src/crazyswarm/launch
- mocap_helper.launch
.png)
mocap_helper.launch
Description: motion_capture_host_name is set to the SDK broadcast IP set in the motion capture environment;
mocap_helper.launch--This file can obtain motion capture data in real time;
- hover_swarm.launch
.png)
hover_swarm.launch
Description: object_tracking_type has two types: motionCapture is used for rigid body mode; libobjecttracker is used for single point or point cloud mode;
hover_swarm.launch--This file is used to start simulation and Nokovflie aircraft communication, and is the real test startup item for aircraft;
- crazyflies.yaml
.png)
crazyflies.yaml
Description: crazyflies.yaml--Aircraft configuration file;
channel -> Aircraft communication channel;
id -> Last digit of aircraft physical address;
initialPosition -> Initial coordinate position of aircraft;
type -> Aircraft mode type; CF21SingleMarker: single point mode; default: rigid body mode and point cloud mode;
- crazyflieTypes.yaml
.png)
crazyflieTypes.yaml
Description: Generally no modification is needed. Modify this file when using point cloud mode; modification method see Section Ⅲ.3 of this article;
Ⅲ. Nokovflie Marker Placement Instructions and Related Parameter Configuration
- Single Point Mode
Advantages and disadvantages: Only one point is placed on each aircraft, and the marker placement position can be repeated;
Avoid the impact of stray points;
Suitable for position trajectory tracking;
No velocity and attitude control;
Configuration method:
① crazyflies.yaml
Modify Channel, ip, initialPosition according to the aircraft taking off;
type: CF21SingleMarker
② hover_swarm.launch
object_tracking_type: libobjecttracker
.png)
Single Point Mode Marker Placement Diagram
- Rigid Body Mode
Advantages and disadvantages: At least 3 points are placed on each aircraft, and the marker placement positions of each aircraft cannot be repeated. The motion capture software must be able to identify them as different rigid bodies;
Avoid the impact of stray points;
Suitable for position trajectory tracking, velocity and attitude control, and other development methods;
Configuration method:
① crazyflies.yaml
Modify Channel, ip, initialPosition according to the aircraft taking off;
type: default
② hover_swarm.launch
object_tracking_type: motionCapture
③ The rigid body name created in the motion capture software must correspond to the aircraft ip. For example, if the aircraft ip is 1, the rigid body name is "cf1"
.png)
Rigid Body Mode Marker Placement Diagram
- Point Cloud Mode
Advantages and disadvantages: At least 3 points are placed on each aircraft, and the marker placement positions of each aircraft must be the same (recommended as shown in the diagram);
Suitable for position trajectory tracking, velocity control, and other development;
Configuration method:
① crazyflies.yaml
Modify Channel, ip, initialPosition according to the aircraft taking off;
type: default
② hover_swarm.launch
object_tracking_type: libobjecttracker
③ Modify crazyflieTypes.yaml file
numPoints -> Fill in the specific number of points placed;
points -> Position of markers placed on the aircraft, can be obtained by calling mocap_helper.launch;
.png)
Point Cloud crazyflieTypes.yaml Configuration
.png)
Point Cloud Mode Marker Placement Diagram
Ⅳ. Nokovflie Simulation and Real Aircraft Flight Experiments
- Single Aircraft Takeoff and Hover
Description: Use single point mode, single aircraft takes off to a height of 1 meter, hovers for 2.5 seconds, then lands in place;
Operation steps:
① Connect Crazyflie power supply and turn on, self-check completed;
② Insert Crazyradio PA, select Connect to Virtual Machine in the popup dialog;
.png)
Crazyradio PA Connected to Virtual Machine
③ Open Crazyflie client on the virtual machine desktop, enter the correct aircraft address in the address field, click Scan (if not found, click a few more times, or unplug and replug the PA and click Scan again); after Connect is highlighted, click to connect the aircraft. After correctly connecting the aircraft, it displays as follows:
.png)
Crazyflie client Correctly Connected to Aircraft
At this time, if you swing the aircraft, the horizontal line will change accordingly, then the aircraft is normal; the arrow in the figure above points to the aircraft channel, and the box points to the aircraft id; after recording these two values, close the Crazyflie client.
④ Place the drone at the origin of the motion capture area (a slight deviation is fine), with the nose facing the positive X-axis direction.
⑤ Ensure that Xingying software sends data to the virtual machine network card network segment, and SDK is checked, as shown below:
.png)
XingYing Correctly Selects Network Card Address and Checks SDK
⑥ Open Visual Studio Code, right-click at /home/nokov/projects/crazyswarm/ros_ws/src/crazyswarm/launch and select "Open in Integrated Terminal". Enter roslaunch crazyswarm mocap_helper.launch in the window to verify whether the system can receive motion capture data. The following interface indicates that data is being sent normally, that is, it displays the real-time position coordinates of a single marker point and continuously refreshes. Press Ctrl+c to exit. Select any frame of data to copy as the initial position of the drone.
.png)
Normally Receiving Motion Capture Data
⑦ Open the crazyflies.yaml file (path crazyswarm/ros_ws/src/crazyswarm/launch), and according to the results of the above steps, configure channel to 12, ID to 5, and initial position to [-0.0127547,-0.00048209,-0.00438987], save the modifications.
.png)
Drone Configuration Sheet
⑧ Open the hover_swarm.launch file (path is crazyswarm/ros_ws/src/crazyswarm/launch), and modify the target tracking method (object_tracking_type) to libobjecttracker.
.png)
Modify Target Tracking Method
⑨ Right-click at /home/nokov/projects/crazyswarm/ros_ws/src/crazyswarm/launch and select "Open in Integrated Terminal". Enter roslaunch crazyswarm hover_swarm.launch in the new window. After startup, crazyswarm_server.RVIZ visualization software automatically opens. When the connection is successful, it displays that the drone coordinate system coincides with the coordinate origin.
.png)
rviz Visualization Interface Displaying Drone Estimated Pose
⑩ Right-click to open two new terminals in the crazyswarm/ros_ws/src/crazyswarm/scripts path. Enter rosservice call /land in one terminal, double-click tab, modify the secs value to 2, and the height value to 0.02, as a safety setting. When an emergency occurs, press Enter in this interface to forcibly stop the drone flight.
.png)
Emergency Stop Safety Settings Interface
Enter python3 hello_world.py –sim in another terminal to run the simulation program. You can see the drone (simplified as a point) take off to a certain height, hover in the air for 2.5 seconds, and then land in the simulation interface.
.png)
Simulation Flight Interface
After simulation testing, enter python3 hello_world.py to run the script program, and the drone will take off, hover, and land.
Note: After the flight ends, make sure to close roslaunch crazyswarm hover_swarm.launch (press CTRL+C in that window) to prevent the aircraft from crashing due to misoperation.
- Multi-Aircraft Formation Figure-8 Flight
Description: Use 3 drones, all using single point mode; the three aircraft can be scattered within the motion capture site (note that the aircraft movement path must be within the motion capture area. This experiment's flight coverage area is about 2 meters long and 1 meter wide); all three aircraft noses face the positive X-axis direction.
.png)
Three-Aircraft Swarm Placement Example
Operation steps: Same as "Single Aircraft Takeoff and Hover"
But note:
Step ⑥ will output 3 position data, as shown in the figure:
.png)
Multiple Aircraft in Motion Capture Area Calling mocap_helper.launch
The position coordinates in the figure above need to correspond to the positions of the aircraft in the real scene (you can also bring the aircraft into the site one by one and record them one by one), and configure them into the crazyflies.yaml file in sequence, as shown:
Step ⑨ Execute crazyswarm hover_swarm.launch, start crazyswarm_server. RVIZ visualization software automatically opens. The normal display screen is as follows:
.png)
Multi-Aircraft rviz Visualization Interface
Step 10 Enter python3 figure8_csv.py --sim in another terminal to run the simulation program. You can see the drones (shown as three points) take off to a certain height in the simulation interface, draw two figure-8s (forward and reverse) in the air, and then land at their respective initial positions;
.png)
Multi-Aircraft Figure-8 Simulation
After simulation testing shows no problems, enter python3 figure8_csv.py to run the script program, and the drone formation will take off, fly figure-8s forward and reverse, and then land.
Note: After the flight ends, make sure to close roslaunch crazyswarm hover_swarm.launch (press CTRL+C in that window) to prevent the aircraft from crashing due to misoperation.
- Custom Trajectory Flight
Description: 1 drone, using single point mode; the aircraft can fly according to a preset trajectory within the motion capture area, and the flight trajectory is closed (any path that does not leave the motion capture environment).
Operation steps: Same as "Single Aircraft Takeoff and Hover"
But note:
Step ⑥ Move the aircraft position, collect the aircraft positions (mainly moving nodes) by calling mocap_helper.launch multiple times, and modify /home/nokov/projects/crazyswarm/ros_ws/src/crazyswarm/scripts/trajectory_generator.py, and modify the code, as shown below:
.png)
Custom Flight Trajectory Collection
.png)
Custom Flight Trajectory Code Modification
Step 10 Enter python3 trajectory_generator.py in the terminal, and a route simulation diagram and node code will pop up, as shown below:
.png)
Aircraft Custom Node Data
.png)
Custom Flight Trajectory Route Diagram
Copy this output code to /home/nokov/projects/crazyswarm/ros_ws/src/crazyswarm/scripts/nokov_custom.py
As shown below:
.png)
Custom Flight Trajectory Node Modification
Enter python3 nokov_custom.py --sim in the terminal to run the simulation program. You can see the drone flying according to the preset trajectory route in the simulation interface.
After simulation testing shows no problems, enter python3 nokov_custom.py to run the script program, and the drone will fly one lap according to the preset path.
Note: After the flight ends, make sure to close roslaunch crazyswarm hover_swarm.launch (press CTRL+C in that window) to prevent the aircraft from crashing due to misoperation.
Description: All the above experiments can be replaced with rigid body or point cloud methods. You can refer to Chapter 3 documentation for modification.
Ⅴ. Reference Materials
-
bitcraze official website: https://www.bitcraze.io/documentation/start/
-
crazyswarm system paper: Preiss_ICRA2017.pdf (usc.edu)