This may be a dumb question, but would it be possible to find the distance between a transmitter and receiver (such as the NRF24L01) by measuring the time it takes to go from the transmitter to the receiver? If possible, my goal would be to use this method put a transmitter and receiver on 3 robots, find the distance between each of them, and triangulate to find each robot's relative location.
Google GPS.
Yes, use these: ESP32 UWB(Ultra Wideband) | Makerfabs
use this method put a transmitter and receiver on 3 robots, find the distance between each of them, and triangulate to find each robot's relative location.
Unfortunately, there is not enough information in 3 distance measurements to solve for three locations. You need a minimum of 3 beacons and a tag to solve for 2D location.
There should be enough information (the lengths of all three sides of a triangle) to calculate the relative position of the robots to each other, although there would be no way to locate where that triangle was relative to the surrounding area.
< edit >
Moving one of the robots, while the other two remain stationary, should allow for determining in which direction the other robots are located. Would help if all three had an accurately known compass heading.
Relative to what?
Relative to each other, as in how far and in what direction each robot is from each other. I hope that makes sense, maybe relative location wasn't the right term.
"How far" and "what direction" are six independent pieces of information.
To uniquely determine those, you must make least six independent measurements. Constraints, like forming a triangle, count as measurements.
Here is a handy triangle calculator, which calculates any desired quantity from input data (ignoring measurement error). Triangle Calculator
As an aside, how would you define "direction to another robot" relative to each robot?
Microsoft Word - rf_tof_ranging_dist.doc (berkeley.edu)
But, with generic hardware like Arduino, the reference clock is not accurate enough.
LiDAR would provide a viable option.
GPS works but you are looking at approx. 10 Meter accuracy for generic system.
Distance Measurement With Radio Waves : 7 Steps (with Pictures) - Instructables
inexpensive device to measure distances up to 1.5km (about 1 mile) with accuracy about ±5 Meter (15 feet).
Are there any GPS systems that have centimeter precision for cheaper prices, or are they all expensive?
Are there any GPS that have something like +/- 5 cm accuracy?
I may have forgotten to mention that I just need 2d location, not 3d. I would like every robot to know how many degrees to turn in what direction and move how far to reach another robot. I want to generate a virtual map/grid with each robot's location it.
My comments were directed to the 2D case.
The beacons and method of location described on my Github site (linked in post #3) is the minimum setup required to " generate a virtual map/grid with each robot's location" by the distance method.
An overhead cam with a PC performing image processing is another possibility.
Yes, but RTK-GPS works only outdoors, with a clear view of the sky. A setup costs around $400+ for a pair (base station and robot).
look into how surveying systems work when using GPS.
Measuring distances between them will get you a triangle, but it has rotation symmetry: the same distances would be measured if all robots positions are rotated around vertical axis. And this is a fundamental constrain: no matter how many robots there are, rotation around vertical axis always would lead to the same distances measured between them.
One way to solve that is to use UWB sensors which can measure not only distance, but also angle of arrival. Trimension SR150 chips seem to be capable of that, but I have no idea if they are actually suitable: you can't program those and their API may or may not provide the necessary data.
DWM1000, 3000 chips allow to do anything - but they don't support AoA measurements (can't have those due to single antenna input).
Another way to solve it is to use IMU on robots so each one knows it heading, and calculate relative angle from their (communicated to each other) motion directions and speeds: if you know that one robot moves north, another moves east, then by observing change of distance between over some time you can find out their relative positions, even though precision would be not so great and dependent on particular speeds/directions at the moment.
Yet another way is optical direction detection (like rotating photodiode and omnidirectional emitter on each)
I was reading more about the ESP32 UWB, but I was confused about why the anchors are necessary. Would it not be possible for three ESP32 UWBs, all acting as tags, to find the distance between each of them and use law of cosines to find all three angles, therefore finding the distance and angle from each ESP32 UWB to another? Is there something I am missing about the purpose of the anchors?
All of what you wrote is possible. What is impossible it's to find angle vs north direction (or vs robot's heading direction). You will know that your robots move in a certain triangle - so each of them knows angle between two others, but doesn't know angle between its nose and any of them. They as a formation could move north, west or south - and in any case all distances and relative angles (parameters you can measure) will be the same
Yes. The anchors are in known locations, so there is nothing to solve about them.
Your robots are all in unknown locations, with unknown orientations.
Hi, I saw your reply and I'm sure you're the one who can solve my curiosity.
I bought an ESP32 UWB DW3000 (Ultra Wideband) from makerfabs.
I'm currently conducting a distance measurement experiment with dwm3000, and I'm measuring using only one anchor and one tag, but the distance seems to come out pretty well. (The measured distance is about 0 to 2m)
I thought this was the TOA method, and I saw a lot of people saying that at least 3 anchor nodes are needed to measure with TOA.
I'm going to continue experimenting with one tag and anchor, but is there any problem?
These modules measure distance to each other. To measure distance, you need 2 of them: they send signals one to another and measure time it took.
When you want to know your coordinates (that's what localization means), you need distances to at least 2 anchors (that will produce two possible solutions on a plane), or to 3 anchors for a definite solution