AdaCore / Certyflie

GNU General Public License v3.0
32 stars 17 forks source link

Certyflie on Crazyflie 2.1 Device #22

Closed SevanBadal closed 3 years ago

SevanBadal commented 3 years ago

I'm looking to use the Certyflie firmware on a Crazyflie 2.1 device. I have identified differences between the 2.0 and 2.1 hardware and firmware that may make the Certflie firmware incompatible with the 2.1 device. Additionally, I have flashed the Certyflie firmware on a 2.1 device and recorded my findings below.

First, they have different IMUs:

Crazyflie 2.1:

Crazyflie 2.0:

Next, there is a difference in the firmware source code:

The drivers in the 2.1 firmware source code suggests the Crazyflie 2.1 device is using an MPU-6050 vs the MPU-9250 in the 2.0 device. This is likely related to the differences in IMU hardware listed above.

I was able to build and flash the Certyflie firmware successfully onto a 2.1 device. After turning on the device, the LED state is as follows: M1: Solid Red M2: Solid Blue M3: Slowly Blinking Blue M4: Off

When attempting to connect to the device with the most recent build of the python client, I have observed two outcomes:

  1. The client hangs while establishing a connection with the Crazyflie and never successfully connects. The M4 LED is solid green with constant red flashes intermittently.
  2. The client successfully connects. the M4 LED is solid green with constant red flashes intermittently. No telemetry data from the device is shown in the client GUI and no commands from the client are reflected in the Crazyflie device.

M2 and M3 LEDs remain solid blue and blinking blue respectively. Interestingly, the M4 goes from solid red to off in both cases listed above.

The issues/concerns I have outlined are likely not exhaustive.

Are there plans of making this repo compatible with the 2.1 device? If not, any suggestions on how to achieve compatibility would be very welcomed.

Fabien-Chouteau commented 3 years ago

Hello @SevanBadal,

I am not surprised that our version doesn't work on the v2.1 hardware, the difference is quite significant. At the moment we do not plan to update our firmware for the 2.1 hardware.

I think the first thing to do would be to implement drivers for the new sensors: BMI088 and BMP388. Then replace the old drivers in the Certyflie software,

In terms of device compatibly, I personally wouldn't mind if the sources only support one version of the hardware. So I am ok to drop support for 2.0 in favor of 2.1.

Regards,