Hello everyone
I recently flashed the PX4 firmware on my Crazyflie 2.1 following the instructions from the PX4 documentation. However, after completing the process, I encountered a problem where one of the motors spins continuously as soon as the drone is powered on.
Here are the steps I followed:
-
Installed the required tools:
sudo apt-get update
sudo apt-get install git python3 python3-pip python3-venv cmake build-essential gcc-arm-none-eabi
git clone GitHub - PX4/PX4-Autopilot: PX4 Autopilot Software --recursive
cd PX4-Autopilot
bash ./Tools/setup/ubuntu.shAdded the path to
.bashrc
:export PATH=$PATH:/home/bob/.local/bin
source ~/.bashrc -
Cloned PX4 bootloader and created symbolic link to Python 3:
git clone GitHub - PX4/PX4-Bootloader: PX4 Bootloader for PX4FMU, PX4IO and PX4FLOW --recurse-submodules
cd Bootloader
sudo ln -s /usr/bin/python3 /usr/bin/python
make crazyflie21_bl -
Downloaded PX4 Autopilot source and compiled:
cd …/PX4-Autopilot/
make bitcraze_crazyflie21_default upload -
Put the Crazyflie 2.1 in DFU mode and installed
dfu-util
:sudo apt-get update
sudo apt-get install dfu-util -
Flashed the bootloader:
sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D ./build/bitcraze_crazyflie21_default/bitcraze_crazyflie21_default.bin
-
Allowed USB port access for Crazyradio:
sudo groupadd plugdev
sudo usermod -a -G plugdev $USER
cat <<EOF | sudo tee /etc/udev/rules.d/99-bitcraze.rules > /dev/nullCrazyradio (normal operation)
SUBSYSTEM==“usb”, ATTRS{idVendor}==“1915”, ATTRS{idProduct}==“7777”, MODE=“0664”, GROUP=“plugdev”
Bootloader
SUBSYSTEM==“usb”, ATTRS{idVendor}==“1915”, ATTRS{idProduct}==“0101”, MODE=“0664”, GROUP=“plugdev”
Crazyflie (over USB)
SUBSYSTEM==“usb”, ATTRS{idVendor}==“0483”, ATTRS{idProduct}==“5740”, MODE=“0664”, GROUP=“plugdev”
EOF
sudo udevadm control --reload-rules
sudo udevadm trigger -
Compiled and uploaded the firmware to the Crazyflie:
cd …/PX4-Autopilot/
make bitcraze_crazyflie21_default upload
After following these steps, one of the motors starts spinning continuously once the Crazyflie is powered on. I have verified the hardware connections and retried the steps multiple times but the issue persists.
Questions:
- Has anyone experienced similar issues with Crazyflie 2.1 and PX4?
- Are there any specific parameters or configurations that need adjustment to resolve this?
- Could this be a firmware bug or a hardware compatibility issue?
Any help or guidance would be greatly appreciated. Thank you!