My platform: CF2.1. I am trying to develop a dock which will essentially perform the EKF computation, but not on the original CF2.1 but on model. I essentially made a copy of the EKF codes (available from kalman_core.c). After doing this and defining the new code essentially a new deck, I am not being able to do anything. The code got compiled alright, but problem arises after flashing in the system. The quad just does not boot or anything. The M1 led is blinking. I want to ask if there is any restriction to use Axis3f variables. I defined a couple of those in the system. I am also attaching the codes with this post (the deck file is: ekfOptiEngine.c which uses some functions defined in cfJacobian.c, and its header is cfJacobian.h).
[I commented/uncommented some line of code to see the effect, and then I got the quad to fly but it looks like it is having proper sensor readings to its control computation. It is not honoring to lighthouse or flowdeck.]
I am totally lost here. Please help me how to do it proper way.
PS: Following is the console output, if this helps:
Code: Select all
SYS: ----------------------------
SYS: Crazyflie 2.1 is up and running!
SYS: Build 29:5d4350e645a2 (2020.04 +29) MODIFIED
SYS: I am 0x20383347344D5008003D002D and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_INFO: DECK_FORCE=ekfOptiEngine found
DECK_INFO: compile-time forced driver ekfOptiEngine added
DECK_CORE: 3 deck(s) found
DECK_CORE: Calling INIT on driver bcLighthouse4 for deck 0
DECK_CORE: Calling INIT on driver bcFlow2 for deck 1
ZR2: Z-down sensor [OK]
PMW: Motion chip id: 0x49:0xB6
DECK_CORE: Calling INIT on driver ekfOptiEngine for deck 2
Hello Crazyflie 2.1 deck world!
IMU: BMI088 Gyro I2C connection [OK].
IMU: BMI088 Accel I2C connection [OK]
IMU: BMP388 I2C connection [OK]
ESTIMATOR: Using Kalman (2) estimator
CONTROLLER: Using PID (1) controller
MTR-DRV: Using brushed motor driver
EEPROM: I2C connection [OK].
IMU: BMI088 gyro self-test [OK]
DECK_CORE: Deck 1 test [OK].
ekfOptiEngine test passed!
DECK_CORE: Deck 2 test [OK].
SYS: The system resumed after watchdog timeout [WARNING]
SYS: No assert information found