jmfoss98
Posts: 2
Joined: Tue Oct 04, 2016 11:44 pm

Relative position

Mon Aug 10, 2020 6:42 pm

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

pidd
Posts: 723
Joined: Fri May 29, 2020 8:29 pm
Location: Birkenhead, Wirral, UK
Contact: Website

Re: Relative position

Mon Aug 10, 2020 7:25 pm

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.

jayben
Posts: 68
Joined: Mon Aug 19, 2019 9:56 pm

Re: Relative position

Tue Aug 11, 2020 9:48 am

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/

cleverca22
Posts: 844
Joined: Sat Aug 18, 2012 2:33 pm

Re: Relative position

Tue Aug 11, 2020 12:17 pm

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

Return to “Automation, sensing and robotics”