how to change uwb update rate

All discussions related to the Loco Positioning system
arix
Member
Posts: 47
Joined: Fri Sep 01, 2017 1:45 am

Re: how to change uwb update rate

Post by arix »

arnaud wrote: Tue Oct 24, 2017 7:58 am Do you mean that by changing the printf you get different precision? Are you sure you are printing the anchor ID correctly?

For TDoA mode, you can put the node in sniffer mode and switch the sniffer to binary (there is a python script for that). This will give you all the raw packets and they can be used to calculate TDoA. If you are interested I might have some experimental python script to calculate TDoA lying around.

What you are doing in ROS is interesting, are you planning on sharing the work at some point?
I only use 1 anchor and 1 tag. I // all printf only want to get distance from serial port,because lots of printf data make me can't extract distance data easy. But i find if i // printf("%02x%08x", (unsigned int)poll_tx.high8, (unsigned int)poll_tx.low32) and other printf only printf distance 。 twr become very inaccurate . and if i don't // these twr become precision. i want to know why .you can have a try.

i use raspberry and beagebone blue to make car and copter. i want to use uwb to make multi - robot research. so i need to use usb to connect to get distance data for tdoa . if i complete all the work i will share.

i try sniffer mode , can you tell me how to change "%02" to i can identify and rxPacket.payload means?Thank you!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: how to change uwb update rate

Post by arnaud »

For TWR, one reason could be that you modified the algorithm in such a way that you are starting a new ranging before the previous is finished, this would induce this kind of problems. You can test this assumption by putting back the 10ms timeout and see if it solves the problem. If it does, you should port the algorithm from the Crazyflie to the node since the Crazyflie algorithm keeps track of rangings better.

For the sniffer I do not understand the question about "%02x", for the sniffer to work fast enough for TDoA you will need the binary mode anyway so there should not be any printf involved.
The TDoA payload format is not documented other than in the Crazyflie and Node firmware implementation. I have recently devised a new packet format that is easier to use and that is already in the anchor master firmware, this one is documented in the wiki: https://wiki.bitcraze.io/doc:lps:tdoa:protocol. It is used in a branch of the Crazyflie firmware.
arix
Member
Posts: 47
Joined: Fri Sep 01, 2017 1:45 am

Re: how to change uwb update rate

Post by arix »

arnaud wrote: Wed Oct 25, 2017 8:17 am For TWR, one reason could be that you modified the algorithm in such a way that you are starting a new ranging before the previous is finished, this would induce this kind of problems. You can test this assumption by putting back the 10ms timeout and see if it solves the problem. If it does, you should port the algorithm from the Crazyflie to the node since the Crazyflie algorithm keeps track of rangings better.

For the sniffer I do not understand the question about "%02x", for the sniffer to work fast enough for TDoA you will need the binary mode anyway so there should not be any printf involved.
The TDoA payload format is not documented other than in the Crazyflie and Node firmware implementation. I have recently devised a new packet format that is easier to use and that is already in the anchor master firmware, this one is documented in the wiki: https://wiki.bitcraze.io/doc:lps:tdoa:protocol. It is used in a branch of the Crazyflie firmware.
Thank you !
I also have other three questions. how many tags this node-firmware support? and if i want to increase tag where i need to modify the lps-node-firmware? tdoa/tdoa2 mode is only for crazyflie and don't support node tag mode?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: how to change uwb update rate

Post by arnaud »

In TWR mode there is no hard limit, you can just scann more anchor in the tag. For TDoA mode there is a harder limit of 8 anchors: the anchors are time-slotted using TDMA, so there needs to be a modification on the TDoA anchor to add more timeslot in TDMA.

The tag mode is a TWR tag mode. For TDoA you can use the binary sniffer and do the math on the host to implement a TDoA tag mode.
arix
Member
Posts: 47
Joined: Fri Sep 01, 2017 1:45 am

Re: how to change uwb update rate

Post by arix »

arnaud wrote: Fri Oct 27, 2017 7:04 am In TWR mode there is no hard limit, you can just scann more anchor in the tag. For TDoA mode there is a harder limit of 8 anchors: the anchors are time-slotted using TDMA, so there needs to be a modification on the TDoA anchor to add more timeslot in TDMA.

The tag mode is a TWR tag mode. For TDoA you can use the binary sniffer and do the math on the host to implement a TDoA tag mode.
follow you answer, I set 4 tdoa anchor , 1 sniffer and 1 tdoa address 0X0 . I use python sniffer_binary . i get data like these

@7d0f1656e3 from 0 to 255: 21000000000000fa7fc0e059ff8088e03a098190e0cd0f8198e0d01781a0e0000000000000000000000000000000
@7d1716d1dc from 1 to 255: 2100000000003ebbe4ece100bce4f4e17e5de5bce1da60e5c4e17965e5cce1000000000000000000000000000000
@7d1f16d16d from 2 to 255: 21000000000088fb50fd320c7a51053300fc500d33a8b051d53233b251dd32000000000000000000000000000000
@7d2716cfca from 3 to 255: 2100000000008a6669b32f84e469bb2f6ce869c32f006869cb2fa21f6a932f000000000000000000000000000000
@7d2f16cbcb from 4 to 255: 21000000000096cde75950674be86150404fe86950674fe8715000cee77950000000000000000000000000000000

tdoa2 like this
@978630b35f from 0 to 255: 22f68dfdfe6600000000fa7f80dafd8048a40781501e1081584b1c81600000000000000000000000000000498059806e809a81000000000000
@978e312ef8 from 1 to 255: 22f68efdfe66000000869a8558009c856046398628f63e8630384886380000000000000000000000004a8000006c809180c981000000000000
@9796312e79 from 2 to 255: 22f68efefe6600000044f8e9008276ea0800f8e91089aeead8f8b3eae000000000000000000000000059806c80000094808881000000000000
@979e312e52 from 3 to 255: 22f68efeff66000000c4f3186e7a711976c472197e00f4188674b1194e00000000000000000000000070809280918000007f81000000000000
@97a63130a6 from 4 to 255: 22f68efeff67000000e56032462bde324ed6de3256f9df325e00623266000000000000000000000000a681ce81908183810000000000000000


i don't know what these means. can you tell me how to handle these data that i can know what these means .
Post Reply