Flow deck and LPS deck can't work with modified firmware

Discussions about all things Bitcraze
Post Reply
toni
Beginner
Posts: 13
Joined: Fri Aug 31, 2018 11:12 am

Flow deck and LPS deck can't work with modified firmware

Post by toni » Fri Aug 31, 2018 1:06 pm

Hello,

I was trying to fly a big quadcopter using my Crazyflie 2.0 with Bigquad deck and using Loco Positioning deck and Flow deck too. In order to do that, I have change config.mk to enable other options, and flowdeck_v1v2.c as said in other threads of the forum not to collide with bigquad pins (I have done hardware hack too). Changes were:
- config.mk

ESTIMATOR=kalman
CFLAGS += -DENABLE_BQ_DECK
CFLAGS += -DLOCODECK_NR_OF_ANCHORS=6
LPS_TDOA_ENABLE=1

-flowdeck_v1v2.c

#define NCS_PIN DECK_GPIO_IO4

When the three decks were connected crazyflie got stuck and led combination was M1-red ; M2-blue ; M3-off ; M4-red. However flowdeck and bigquad were working fine; as well as lps deck and bigquad.
Same error happens when I just connect flowdeck and lps deck. However if I use just basic firmware and remove the hardware hack, flow and lps decks work together fine. In other words only flow deck and lps deck collide with each other when firmware is modified.

Do you know what can cause this collision? Is another option possible to have working the three decks at same time?

Thanks for your help.

tobias
Bitcraze
Posts: 1736
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Flow deck and LPS deck can't work with modified firmware

Post by tobias » Thu Sep 06, 2018 12:45 pm

The CF2 seems to hit either a Hard Fault or an Assert. Maybe the there is some hint in the cfclient console?

Sounds like there is something in the BQ deck code that is interfering.

toni
Beginner
Posts: 13
Joined: Fri Aug 31, 2018 11:12 am

Re: Flow deck and LPS deck can't work with modified firmware

Post by toni » Fri Sep 07, 2018 10:11 am

Hello and thanks for the reply,

When Leds are in this mode the client cannot connect to the crazyflie, no matter how many times I try. This also happens when I just connect flow and lps deks, so I am not sure what causes the problem.
What causes the hard fault or the assert? Because from time to time it occurs when I have 2 decks at the same time. However when I have just one deck this never happens.

toni
Beginner
Posts: 13
Joined: Fri Aug 31, 2018 11:12 am

Re: Flow deck and LPS deck can't work with modified firmware

Post by toni » Thu Sep 13, 2018 1:27 pm

Hello,

Sorry, I had a pin not working properly on the flow deck, that is why it causes problems when attaching/reattaching the flow sometimes. I have resoldered it, in order to work fine and it works well in combination with LPS deck. However when having the three decks at same time the error happens causing hard fault or assert, so as you have said BQ is definetely the one causing trouble.

Tobias, would it be possible to have all three decks working properly by disabling all communications on Big Quad's firmware file (I2C, GPS...), or would it be easier to implement a hardware hack? Would be the Big quad working well by disabling those features?

Thanks for your help.

tobias
Bitcraze
Posts: 1736
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Flow deck and LPS deck can't work with modified firmware

Post by tobias » Mon Sep 17, 2018 12:41 pm

Last week I posted an issue on using LPS and flow together. Especially when using TWR mode the Loco deck hangs after a while. I don't know what is causing this but we will look at it as soon as we have time. Though this issue does not cause an assert so might not be the same problem you are experiencing.

Also the LPS and flow fusion needs more work, e.g. currently the heights of the two systems are not fused correctly if not zero is on the floor the CF2 is launching from.

toni
Beginner
Posts: 13
Joined: Fri Aug 31, 2018 11:12 am

Re: Flow deck and LPS deck can't work with modified firmware

Post by toni » Mon Dec 03, 2018 4:02 pm

Hello Tobias,

I have found the same issue with flow deck and lps deck. Also I found the same behaviour while passing external position data to Crazyflie with just LPS deck working. I thought that not pushing LPS TWR into kalman filter would solve this issue but same thing happens even with the LPS deck rangings are not being published to Kalman filter.
However if I send external data to LPS deck without any anchor powered, LPS never hangs up when sending external positions, even when it is connected with flow deck or flow deck v2.
I don't know if this could help you, but I write here just in case it could be useful.

john_drone
Beginner
Posts: 3
Joined: Tue May 15, 2018 7:40 am

Re: Flow deck and LPS deck can't work with modified firmware

Post by john_drone » Thu Dec 06, 2018 10:58 am

toni wrote:
Mon Dec 03, 2018 4:02 pm
Hello Tobias,

I have found the same issue with flow deck and lps deck. Also I found the same behaviour while passing external position data to Crazyflie with just LPS deck working. I thought that not pushing LPS TWR into kalman filter would solve this issue but same thing happens even with the LPS deck rangings are not being published to Kalman filter.
However if I send external data to LPS deck without any anchor powered, LPS never hangs up when sending external positions, even when it is connected with flow deck or flow deck v2.
I don't know if this could help you, but I write here just in case it could be useful.
Hi guys,

How did you get the Big Quad to work with the LPS deck?

I've done all the configurations on config.mk and also taken out the C1 capacitor, but the Crazyflie can only work with one deck at a time.

Whenever I compile with "CFLAGS += -DENABLE_BQ_DECK" in the config.mk, the Loco deck stops working, but the Big Quad deck works.
I feel there's something I need to do in the config.mk file to enable the Loco deck, but I don't know what it is.

Could anyone tell me how they got theirs to work?

toni
Beginner
Posts: 13
Joined: Fri Aug 31, 2018 11:12 am

Re: Flow deck and LPS deck can't work with modified firmware

Post by toni » Thu Dec 06, 2018 5:07 pm

Hello john_drone,

When I was trying this I check that was working by looking the console output in client, and with both decks everything was ok. I don't know if this is working for you. I tried flying bigquad and flow deck and I was able to fly, but I didn't try flying with loco deck, only checking the deck compatibility in the console.
In both cases the config.mk file for me was this (TDOA enable is optional) with the previous firmware release :
## Copy this file to config.mk and modify to get you personal build configuration

## Set CRTP link to E-SKY receiver
# CFLAGS += -DUSE_ESKYLINK

## Redirect the console output to the UART
# CFLAGS += -DDEBUG_PRINT_ON_UART

## Load a deck driver that has no OW memory
# CFLAGS += -DDECK_FORCE=bcBuzzer

ESTIMATOR=kalman

## Enable biq quad deck features
CFLAGS += -DENABLE_BQ_DECK
# CFLAGS += -DBQ_DECK_ENABLE_PM
# CFLAGS += -DBQ_DECK_ENABLE_OSD

## Use morse when flashing the LED to indicate that the Crazyflie is calibrated
# CFLAGS += -DCALIBRATED_LED_MORSE

## Turn on monitoring of queue usages
# CFLAGS += -DDEBUG_QUEUE_MONITOR

## Automatically reboot to bootloader before flashing
# CLOAD_CMDS = -w radio://0/100/2M/E7E7E7E7E7

## Set number of anchor in LocoPositioningSystem
CFLAGS += -DLOCODECK_NR_OF_ANCHORS=6

## Set alternative pins for LOCO deck (IRQ=IO_2, RESET=IO_3, default are RX1 and TX1)
# CFLAGS += -DLOCODECK_USE_ALT_PINS

## Compile positioning system for TDoA mode
LPS_TDOA_ENABLE=1

## Use J-Link as Debugger/flasher
# OPENOCD_INTERFACE ?= interface/jlink.cfg
# OPENOCD_TARGET ?= target/stm32f4x.cfg
# OPENOCD_CMDS ?= -c "transport select swd"
I think the only difference with you is the firmware version and the kalman estimator flag.

I hope that this can help.

Best regards

Post Reply