Kopis Drone Setup
In this section, we describe the setup of the Kopis Cinewhoop 3” drone. Equipped with either a KakuteH7 or a KakuteH7v2 flight controller and an ESP8266 module for communication with an offboard computer, the Kopis Cinewhoop 3” is a small drone that enables the fast prototyping and testing of control algoritms in dedicated flight arenas such as the Taguspark Flight Arena.
Arena Setup
ID |
IP |
Port |
AP SSID |
AP Password |
Station SSID |
Status |
Kakute version |
Config File |
---|---|---|---|---|---|---|---|---|
7 |
192.168.1.247 |
15007 |
CineWhoop3-7 |
pixracer |
Quadrotor |
❌/✔️ |
KakuteH7v2 |
|
8 |
192.168.1.248 |
15008 |
CineWhoop3-8 |
pixracer |
Quadrotor |
✔️ |
KakuteH7v2 |
|
9 |
192.168.1.249 |
15009 |
CineWhoop3-9 |
pixracer |
Quadrotor |
✔️ |
KakuteH7v2 |
|
10 |
192.168.1.250 |
15010 |
CineWhoop3-10 |
pixracer |
Quadrotor |
✔️ |
KakuteH7v2 |
|
11 |
192.168.1.251 |
15011 |
CineWhoop3-11 |
pixracer |
Quadrotor |
❌ |
KakuteH7 |
TBD |
12 |
192.168.1.252 |
15012 |
CineWhoop3-12 |
pixracer |
Quadrotor |
❌ |
KakuteH7 |
TBD |
The vehicles are configured to connect to the station network if the Statis SSID is detected. Otherwise, the vehicles will create an AP with the AP SSID and AP Password, according to the table above.
Running the Kopis 3”
Install the Pegasus GNC code by following the instructions on the Installation page.
Turn on the Kopis 3” drone by connecting the battery.
Make sure your computer is connected to the station network or the AP network generated by the vehicle.
Ensure that you can see the vehicle in the Flight Arena desktop computer using the Mocap system.
Flight arena desktop computer
The name of the vehicle must follow the standard naming convention, e.g.,
drone7
, in order for the GNC code to properly receive and use the pose information. Check the Taguspark Flight Arena page for more information.Run the following command to start the GNC code:
ros2 launch pegasus kopis.launch.py vehicle_id:=<vehicle_id>Default vehicle ID and namespace
If no vehicle_id is provided, the default
vehicle_id
is 7. The default namespace isvehicle_namespace:=drone
.
The vehicle should now be connected to the offboard computer and ready to receive commands.
Open the terminal console to control the vehicle
ros2 run pegasus_console pegasus_console -i <vehicle_id>Launching all kopis drones at the same time
You can also launch all the Kopis drones at the same time by running the following command:
ros2 launch pegasus all_kopis.launch.pyNote that you will still need to open a console for each vehicle to control them individually, or you can write a script to perform automated tasks.
All the provided vehicles are configured such that they will not arm unless an RC remote is connected. This is a safety feature to prevent the vehicle from taking off unintentionally. All the vehicles are binded to the same RC remote, so you can use the same remote to control all the vehicles.
Bill of Materials
In order to replicate the Kopis setup adopted on the Taguspark Flight Arena, the following components are required:
Kakute Flight Controller Setup
Two different approaches are considered to setup the Kakute flight controller: 1) using our custom precompiled binaries (recommended), or 2) compiling PX4 from source.
Option 1 - Using custom precompiled binaries (recommended)
We provide some precompiled binaries of the PX4-autopilot source code (release v1.14.2), with some minor corrections and modifications for our specific use case. To flash these custom images, proceed as follows.
Install DFU-Util to flash the bootloader into the Kakute board:
sudo apt-get install dfu-util
Open a terminal, and download the bootloader images into your computer, depending on the required board version. Do not close the terminal once you finish.
# Use these command for the KakuteH7 wget "https://github.com/PegasusResearch/drone_configs/raw/refs/heads/main/Kopis/PX4-Autopilot(v1.14.2)/KakuteH7/holybro_kakuteh7_bootloader.bin" # Use this command for the KakuteH7v2 wget "https://github.com/PegasusResearch/drone_configs/raw/refs/heads/main/Kopis/PX4-Autopilot(v1.14.2)/KakuteH7v2/holybro_kakuteh7v2_bootloader.bin"
Connect the Kakute to the computer using a USB cable and put the board in bootloader mode by pressing the button on the board while connecting the cable. Flash the bootloader into the Kakute:
# Use these commands for the KakuteH7 dfu-util -a 0 --dfuse-address 0x08000000:force:mass-erase:leave -D ./holybro_kakuteh7_bootloader.bin dfu-util -a 0 --dfuse-address 0x08000000 -D ./holybro_kakuteh7_bootloader.bin # Use these commands for the KakuteH7v2 dfu-util -a 0 --dfuse-address 0x08000000:force:mass-erase:leave -D ./holybro_kakuteh7v2_bootloader.bin dfu-util -a 0 --dfuse-address 0x08000000 -D ./holybro_kakuteh7v2_bootloader.bin
After flashing the bootloader, reboot the Kakute without pressing the button. Download the firmware for the KakuteH7 or for the KakuteH7v2 and load it to the board using QGroundControl (instrutions here). Note that you want to install a custom version (specific instructions here).
After having the firmware installed, connect the Kakute to the computer and open QGroundControl.
Load the Kopis parameters from the configuration file kopis7.params.
Change the MAV_SYS_ID parameter to the ID of the new vehicle.
Option 2 - Compiling PX4 from source
Configure the KakuteH7/KakuteH7v2 flight controller with PX4 firmware (v1.14.2), by following the instructions on the PX4 documentation. Start by cloning and compiling the PX4 firmware repository:
# Clone PX4 firmware repository git clone https://github.com/PX4/PX4-Autopilot.git cd PX4-Autopilot git checkout v1.14.2
Compile the bootloader and the firmware for the flight controller. Use the commands depending on the board version (KakuteH7/KakuteH7v2):
# Use these commands to compile the bootloader and the firmware for the KakuteH7 make holybro_kakuteh7_bootloader make holybro_kakuteh7_default # Use these commands to compile the bootloader and the firmware for the KakuteH7v2 make holybro_kakuteh7v2_bootloader make holybro_kakuteh7v2_default
Install DFU-Util to flash the bootloader into the Kakute board:
sudo apt-get install dfu-util
Connect the Kakute to the computer using a USB cable and put the board in bootloader mode by pressing the button on the board while connecting the cable. Flash the bootloader into the Kakute:
# Use these commands for the KakuteH7 dfu-util -a 0 --dfuse-address 0x08000000:force:mass-erase:leave -D build/holybro_kakuteh7_bootloader/holybro_kakuteh7_bootloader.bin dfu-util -a 0 --dfuse-address 0x08000000 -D build/holybro_kakuteh7_bootloader/holybro_kakuteh7_bootloader.bin # Use these commands for the KakuteH7v2 dfu-util -a 0 --dfuse-address 0x08000000:force:mass-erase:leave -D build/holybro_kakuteh7v2_bootloader/holybro_kakuteh7v2_bootloader.bin dfu-util -a 0 --dfuse-address 0x08000000 -D build/holybro_kakuteh7v2_bootloader/holybro_kakuteh7v2_bootloader.bin
After flashing the bootloader, reboot the Kakute without pressing the button. Upload the firmware by using QGroundControl or run one of the following commands
# Use this command for the KakuteH7 make holybro_kakuteh7_default upload # Use this command for the KakuteH7v2 make holybro_kakuteh7v2_default upload
After having the firmware installed, connect the Kakute to the computer and open QGroundControl.
Load the Kopis parameters from the configuration file kopis7.params.
Change the MAV_SYS_ID parameter to the ID of the new vehicle.
ESP Configuration
Connect the USB-FDTI cable to the ESP, and turn the switch into the
PROGRAM
position.
Warning
Check whether your ESP runs with 3.3V or 5V before connecting the FDTI cable
Install the esptool by running the following command:
pip install esptool
Download the custom compiled firmware from here.
Erase the ESP flash memory by running the following command:
Flash the firmware into the ESP using the following command:
Reboot the ESP with the switch in the
UART
position.Connect the computer to the
PixRacer
wifi network generated by the ESP. The password ispixracer
.
On your browser, go to the IP address
192.168.4.1
and click on theSetup
link. This will open a page with the default configurations.
Change the configurations according to the image bellow, by setting the
UDP Port
,AP SSID``and ``Station IP
according to the standard adopted in the table above.
Connection Diagram
TODO
If you have any questions or need help with the setup, please check the ardupilot reference page.