Page 1 of 1

Relative position

Posted: Mon Aug 10, 2020 6:42 pm
by jmfoss98
Hi,

I am trying to figure out a way in which two raspberry pi can determine their position relative to each other. I'm primarily wanting to just get the direction but the distance would also be useful if possible. I have thought about a couple different things like Zigbee or bluetooth, but haven't been able to find much information on doing this. In the end, I am wanting to place a bunch of pi zeros, but I am starting with a pi 2 and 3 I currently have, along the permitter of a room in-order to "map" it.
So does anyone have any idea how I could do this using Zigbee or bluetooth or even something else that would work better? I'm fairly new to raspberry pi but I have experience programming. Any tips would be much appreciated!

Thank you for the help!
-jmfoss98

Re: Relative position

Posted: Mon Aug 10, 2020 7:25 pm
by pidd
None of the above I'm afraid. Radio direction finding inside a room at those frequencies is fraught with problems unless you construct very special antenna arrays or have extremely precise clocks. The key finders etc you see advertised measure rough distance and don't measure angle statically (measuring three distances will give you an angle).

The options that I think may be workable depending on accuracy you want and the distance involved.

GPS (with luck)
Cameras
Lights and light sensors (maybe infrared)
Ultrasonics or sonics

I'm trying to work on a completely different system with a "measuring wand" which uses accelerometers, gyros and perhaps magnetometers to allow you to plot a room by moving the wand to each corner. Basically an inertial navigation system. Its not looking very promising so far and I've got bogged down with other matters.

Re: Relative position

Posted: Tue Aug 11, 2020 9:48 am
by jayben
You can determine the distance between 2 or more units using Ultra Wideband, see https://iosoft.blog/real-time-location-ultra-wideband/

Alternatively, with a few cameras, you could do optical triangulation of LED markers or fiducial tags:
https://iosoft.blog/position-measuremen ... as-opencv/
https://iosoft.blog/raspberry-pi-positi ... cial-tags/

Re: Relative position

Posted: Tue Aug 11, 2020 12:17 pm
by cleverca22
jayben wrote:
Tue Aug 11, 2020 9:48 am
Alternatively, with a few cameras, you could do optical triangulation of LED markers or fiducial tags:
https://iosoft.blog/position-measuremen ... as-opencv/
https://iosoft.blog/raspberry-pi-positi ... cial-tags/
thats also exactly how the wii controller works
you have 2 IR led's on the "sensor bar" (which doesnt sense anything)
and then you have an IR camera on the controller

you also have a number of great videos from johnny lee like https://www.youtube.com/watch?v=Jd3-eiid-Uw

and you dont need the wiimote either, just get a noir pi camera for the same effect, tricky part is having a wider viewing angle, either some 360 mirror (that can reflect ir), or a pan&tilt mount