[Solved] Interfacing with Loco Deck

All discussions related to the Loco Positioning system
Post Reply
snyderthorst
Beginner
Posts: 21
Joined: Thu Jun 28, 2018 12:00 am

[Solved] Interfacing with Loco Deck

Post by snyderthorst » Fri Dec 13, 2019 2:34 am

Hello,

I am working on getting the LPS tag working on some ground robots. I currently am able to blink the LEDs and am setting the following configuration settings:
  • Mode: MODE_LONGDATA_FAST_LOWPOWER
  • Preamble Code: PREAMBLE_CODE_64MHZ_9
  • Channel: CHANNEL_2
These are the settings that you all seem to be setting in locodeck.c in the dwm1000Init() function (excluding all of the default parameters). I am currently able to set the LED registers and blink the LEDs both with the debounce clock and via manual writing to the PMSC_LEDC register on the chip. However, I have not been able to receive any packets from the LPS anchor system (currently on TDoA2). I have registered the proper callbacks and have checked that they are triggered by shorting the microcontroller pin to HIGH and observing that the callback is being called, so I know that the dw1000 is never pulling its IRQ to HIGH. Is there anything that I'm missing? I am using the Arduino library found here that is cited in your loco deck driver code.

I am aware of this post #14660

Thank you in advance for your help,
Thomas
Last edited by snyderthorst on Tue Dec 17, 2019 12:14 am, edited 1 time in total.



kristoffer
Bitcraze
Posts: 209
Joined: Tue Jun 30, 2015 7:47 am

Re: Interfacing with Loco Deck

Post by kristoffer » Fri Dec 13, 2019 8:01 am

Hi, sounds cool!

The default mode is MODE_SHORTDATA_FAST_ACCURACY (https://github.com/bitcraze/crazyflie-f ... eck.c#L451 as LPS_LONGER_RANGE is not set by default).

And MODE_SHORTDATA_FAST_ACCURACY is defined in libdw1000 as

Code: Select all

const uint8_t MODE_SHORTDATA_FAST_ACCURACY[] = {TRX_RATE_6800KBPS, TX_PULSE_FREQ_64MHZ, TX_PREAMBLE_LEN_128};
What have you set the preamble length to?

snyderthorst
Beginner
Posts: 21
Joined: Thu Jun 28, 2018 12:00 am

Re: Interfacing with Loco Deck

Post by snyderthorst » Sat Dec 14, 2019 12:10 am

Oh, I was setting it to a different mode than was in the CF firmware. The MODE_LONGDATA_FAST_LOWPOWER is defined as

Code: Select all

static constexpr byte MODE_LONGDATA_FAST_ACCURACY[]  = {TRX_RATE_6800KBPS, TX_PULSE_FREQ_64MHZ, TX_PREAMBLE_LEN_1024};
I will try it with the different mode that you have recommended which is defined identically to what you have said.

Thank you,
Thomas

snyderthorst
Beginner
Posts: 21
Joined: Thu Jun 28, 2018 12:00 am

Re: Interfacing with Loco Deck

Post by snyderthorst » Sun Dec 15, 2019 6:14 am

I tried the new settings today and unfortunately, I am still not receiving any packets. The settings are:
  • Mode: MODE_SHORTDATA_FAST_ACCURACY
  • Preamble Code: PREAMBLE_CODE_64MHZ_9
  • Channel: CHANNEL_2
Are there any other configuration options available that you all are changing from the default settings? Please let me know if you have any questions about the setup.

Thank you,
Thomas

kristoffer
Bitcraze
Posts: 209
Joined: Tue Jun 30, 2015 7:47 am

Re: Interfacing with Loco Deck

Post by kristoffer » Mon Dec 16, 2019 10:51 am

There are settings in the anchor for bitrate and preamble length. If you have not changed those it should be using the default settings mentioned earlier.

Just to rule out possible error sources; are you sure the anchors are transmitting? Do you have access to a Crazyflie? Just to make sure the system is working and you can receive data at all.

You might want to change to TDoA3 on the anchors as well. In TDoA2 anchor 0 must be on and transmitting for the other anchors to work, while in TDoA3 all anchors are always transmitting. Just to make sure there are messages to receive :-)

snyderthorst
Beginner
Posts: 21
Joined: Thu Jun 28, 2018 12:00 am

Re: Interfacing with Loco Deck

Post by snyderthorst » Tue Dec 17, 2019 12:13 am

I checked with the Crazyflie and the LPS system wasn't working properly. We have two systems and it turns out that some of the anchors were switched, so a couple were on TDoA3 and the others on TDoA2. I reconfigured them and it works. I am running into issues with the LPS tag stopping its reception after several seconds, but it successfully receives packets and can interpret the data. Now I'm trying to understand and implement the TDoA algorithm.

Thank you,
Thomas

kristoffer
Bitcraze
Posts: 209
Joined: Tue Jun 30, 2015 7:47 am

Re: [Solved] Interfacing with Loco Deck

Post by kristoffer » Tue Dec 17, 2019 7:35 am

Great!

Post Reply