f-army / arduino-dw1000-ng Goto Github PK
View Code? Open in Web Editor NEWArduino driver and library to use Decawave's DW1000 IC and relative modules.
License: MIT License
Arduino driver and library to use Decawave's DW1000 IC and relative modules.
License: MIT License
I am trying to use the basic connectivity example with an ESP8266 and get the following error whenever a DW1000 function is called:
Abort called
stack>>>
ctx: cont
sp: 3ffffd80 end: 3fffffc0 offset: 01b0
3fffff30: 3ffe87b0 3ffee358 3ffe84fc 00000004
3fffff40: 3ffe84ce 00000000 3ffee240 00000004
3fffff50: 3ffe84ce 3ffe84cd 00000005 40100452
3fffff60: feefeffe 0000000f 00000005 40201b1c
3fffff70: 3fffdad0 00000001 3ffee2a8 402021d0
3fffff80: 00002580 0000001c 00000000 3ffee300
3fffff90: 3fffdad0 00000000 3ffee2d0 4020103c
3fffffa0: feefeffe feefeffe feefeffe 402026e8
3fffffb0: feefeffe feefeffe 3ffe84fc 4010073d
<<<stack<<<
�⸮�!9⸮^⸮⸮ISR not in IRAM!
defines are not clear and are missing some options like TX and RX clocks
Changing it should not cause problems, but needs to be checked.
Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRTLS.cpp: In function 'RangeRequestResult DW1000NgRTLS::tagRangeRequest()':
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRTLS.cpp:175:51: error: narrowing conversion of 'DW1000NgUtils::bytesAsValue((& init_recv[13]), 2)' from 'uint64_t {aka long long unsigned int}' to 'uint16_t {aka short unsigned int}' inside { } [-Werror=narrowing]
return { true, DW1000NgUtils::bytesAsValue(&init_recv[13], 2) };
^
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRTLS.cpp: In function 'RangeResult DW1000NgRTLS::tagFinishRange(uint16_t, uint16_t)':
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRTLS.cpp:208:64: error: narrowing conversion of 'DW1000NgUtils::bytesAsValue((& act_recv[11]), 2)' from 'uint64_t {aka long long unsigned int}' to 'uint16_t {aka short unsigned int}' inside { } [-Werror=narrowing]
return {true, true, DW1000NgUtils::bytesAsValue(&act_recv[11], 2), 0};
^
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRTLS.cpp: In function 'RangeInfrastructureResult DW1000NgRTLS::tagRangeInfrastructure(uint16_t, uint16_t)':
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRTLS.cpp:231:35: error: narrowing conversion of 'result.RangeResult::new_blink_rate' from 'uint32_t {aka unsigned int}' to 'uint16_t {aka short unsigned int}' inside { } [-Werror=narrowing]
return { true, result.new_blink_rate };
^
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRanging.cpp: In function 'double DW1000NgRanging::correctRange(double)':
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRanging.cpp:81:5: error: control reaches end of non-void function [-Werror=return-type]
}
^
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRTLS.cpp:236:5: error: control reaches end of non-void function [-Werror=return-type]
}
^
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRTLS.cpp: In function 'RangeResult DW1000NgRTLS::tagFinishRange(uint16_t, uint16_t)':
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRTLS.cpp:215:5: error: control reaches end of non-void function [-Werror=return-type]
}
^
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRTLS.cpp: In function 'RangeAcceptResult DW1000NgRTLS::anchorRangeAccept(NextActivity, uint16_t)':
/Users/aalbino/Documents/Arduino/libraries/arduino-dw1000-ng/src/DW1000NgRTLS.cpp:301:5: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1plus: some warnings being treated as errors
cc1plus: some warnings being treated as errors
This is an advanced feature of the DW1000 that lets you specify a user-defined SFD sequence.
For reference check register file 0x21 - Channel inside DW1000 User manual.
Thus I tried Basic Connectivity Test.
I'm not sure it's correct output because I'm a beginner of Arduino and DWM1000.
But I don't think there is any noticeable problem.
And then I uploaded Basic Sender/Receiver to Arduino.
I still have no clue about this, but it seems to work fine.
EDIT: thotro/arduino-dw1000
I tried also thotro's library.
The device is removed immediately after it is added.
Why are BasicSender and Receiver working but TwoWayRanging not working?
Hello~
I am doing a university project, and using thoros' code. Thoro's project is not active and stop to develop, so I always find nowhere to communicate and solve problems, it confused me for a long time until I found you.(maybe because i'm not familiar with github)
As for my part of DW1000 research. I simple use thotro's code, and do a little modification to meet my own demand. I read and understand most source code in his project like DW1000.cpp, DW1000Ranging.cpp etc. At first, the ranging always have a drift in distance, after I change the antenna delay, the drift disappear.
However, my goal is to use three anchors to locate the tags. So I open the three anchors at same time. But there are only one anchor reads the right data, while the other two anchors read very wrong data. and it's strange that, when I only turn off the well-working anchor, one of the rest anchor will reads the right distance. Same things happen when I turn off the second well-working anchor, and the only left anchor will reads the right distance. This is first of my problem.
Then I use some debug code trying to find out why this strange things happen, I print out the time stamp to get the Treply and Tround. However, I found that Treply is bigger than Tround sometime(not seldom but frequently appear in a bulk of continues ranging data). We know in the ranging algorithm, Tround = Treply +2 * Tof (time of flight). However, those ridiculous can calculate out the right distance (after antenna delay). This is my second problem.
And I have briefly read your example TwoWayRangingInitiator/Responder, and I think maybe you haven't start to develop the multiple anchors and multiple tags system. And I test your code in my device and found your ranging accuracy is very high, plus no timestamp error as I found in thoro's project. If you want to develop the multiple system, I'd like to help.
Here are my calibration system and my device: 4 * DWM1000; 4 * Arduino UNO R3
And this is data when I test your example TwoWayRangingInitiator/Responder, the ripple is around ±3 cm, which is every good, very few point got extreme big distance having 15cm error can be removed by filter.
Looking forward to your reply.
Best wishes,
Elon
This permits you to hide implementation details from header files.
To begin with, I use the Arduino UNO R3. and use 5V to supply the DW1000 chips.
The situation is that, main anchor can range with the tag, and so does the anchor B, so main anchor can receive the ranging report from anchor B.
However, main anchor can't receive message from anchor C, even I tried to use different DW1000 chips to have the test, the main anchor still can't find anchor C. So, this might not be a hardware problem.
Needs a check on the input value of the function
This is currently done in a automated way, but the driver should allow user to set it manually.
This will give a way to fix errors programmatically.
This still uses thotro/arduino-dw1000 and should be changed or at least checked
Wiki should be filled to enable newcomers to have a better grasp about this project.
This will help a lot new programmers looking at the code.
This could be a nice feature for the user, to abstract away saving the antenna delay.
This will decrease performance but make the program more stable because there will never be interrupt when they (the interrupts) are locked.
This will use less memory and have more performance.
DeepSleep is bugged. After Weak up, ranging doesn't work.
All configurations are restored from AON (except txAntennaDelay and EUI).
Using an enum class provided by C++11 should be useful to receive feedback about problems inside functions.
The device doesn't seem to range, a possible problem seems the 0x08 as sfd length but the manual states it should work.
NOTE: Correction of N inside receive power functions use value inside sfd length register 0x21, so a change in this should be strictly controlled.
This leads to a better organized code for future developing.
Hi,
So I am trying to get the range between an Anchor and a Tag. I do get a decent range however the ranges change a lot over time. The anchor and tag are at fixed positions however the range between the two keep dropping lower and lower or increasing higher and higherI have plotted the ranges below.
I am looking for any help as to why this is happening. I am using two AA batteries to power the DWM Modules and the grounds and powers are all connected. I have scoped power lines I get a 5% noise tolerance and the power is stable throughout.
I use Single Sided Two Way Ranging as I get better values than the Asymmetric method. I am looking for any help as to why the values are inconsistent.
Even inside DW1000Ranging abstraction i see this setDefaults() used after newTransmit() and newReceive() function calls.
setDefaults() checks if the devicemode is IDLE otherwise it does nothing, but in the cases I mentioned the device is never in idle.
Hi,
I am trying to achieve TDOA approach and biggest problem here is to sync clocks. I am trying wireless clock sync.
The main idea here is to use 4 anchors, 1 is going to be the main anchor and send timestamp sync packages to other 3 slave anchors.
And TAGs are going to send blink messages to those 3 anchors and anchors will caculate TDOA's.
And I want to seperate sync and tag blink requests by sending and receiving them from different channels to use bandwidth more effieciently.
With these scenario I have some questions.
1 - Is it possible to achieve this ? Because 3 Slave Anchors needs to listen 2 channels at the same time? (Both tag blinks and Main Anchor sync packages)
2 - Is it possible to achieve wireless sync with such method? Because 1 nanosecond error in calculations means 30cm error localization.
There are companies achieved wireless sync with such method but it is not clear how they achieved this. May be they purchased IP from Decawave about Wireless Sync implementation.
I just want to here from you, and your ideas.
Thank you...
Regards
Testing out the StandardRTLSAnchorMain and wondering how I measure the positions of each of my anchor to add to the Position position_self = {0, 0}; so it gets the correction positioning. Also if i attached 3 anchors to a robot and used a tag would trilateration work or would I need to look at alternative method?
Testing the base will speed up developing times and give confindence in new features.
Something like a Wiki page or a github pages website or even read the docs.
Hello.
I want to improve your library for my goal. I'm searching about a way to implement sending Rang to Tag side.
in this method A tag side can print its Rang from each anchor that it blinks with.
right now we don't have it.
We read dwm1000 manuall.If i understand correclty there are some optional ways to do that.
I understood the tag and anchor connect in this way :
Tag : blink
Anchor : Ranging_INIT
Tag : Poll
Anchor: Poll-Ack
Tag: Sending Final Message to anchor
Anchor: have Rang
at this time Anchor calculates and have a Correct Rang then print it but Tag does not have. it does not print anything right now.
in the best solution We should send a Rang String to Tag after "Final Message" from anchor.
I found some lib codes in each side, tag and anchor.step by step what happend.
I could send a packet frame with "0x60" value from anchor side,
but I could not find a way to wait to recieve this packet frame "0x60" in Tag side.
I don't know what "command - code - function" i should use to wait in Tag side to receive "0x60" packet frame in correct time.
I mean the waiting time for receiving packet in Tag side.(halt time)
This needs to be checked urgently.
As stated in pag. 98 of DW1000 user manual, standard SFD needs a different adjustment to RXPACC.
The code referred is:
https://github.com/F-Army/arduino-dwm1000/blob/5005c83819cf42d401b840085aa9d423a0c7d4fc/src/DWM1000.cpp#L1621-L1636
Using a whole object for a simple conversion is overkill.
The API should let the user set standard and non-standard Decawave sfd sequences.
This is bad as a bad configuration can slip away to someone not aware of this behavior.
Data should instead be read from device using readBytes
It should be a check rather than a force set to default values.
//static constexpr byte MODE_LONGRANGE_LOWPRF_LONGPREAMBLE[] = {TRX_RATE_110KBPS, TX_PULSE_FREQ_16MHZ, TX_PREAMBLE_LEN_4096};
//static constexpr byte MODE_LONGRANGE_HIGHPRF_LONGPREAMBLE[] = {TRX_RATE_110KBPS, TX_PULSE_FREQ_64MHZ, TX_PREAMBLE_LEN_4096};
They should be settable but a bug makes the device not work, so they are commented while working at this problem.
For example a file for registers and offsets.
They are always set to 4096 by default for now.
Hi, I am trying to work with multiple tags. I mean at least 1 anchor and 2 tags at the same time
(thotro's library don't have this support yet, If you put second tag in to the test environment everything goes bad)
I couldn't find any info about multiple tag support in your wiki.
Is your library has multiple tag support?
Thanks
This will be useful to arduino IDE users.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.