motas
Posts: 11
Joined: Tue Mar 05, 2013 11:55 pm

Follow object

Mon Jul 01, 2013 9:27 am

Hi. I am trying to make a device which will always point to a small beacon up to 200m away. So for example if i have this beacon in my pocket then the device will point towards me no matter where I walk. I have a raspberry pi which i would like to use for this. I am confident i can build the physical device however what would I use to keep track of the beacon and how would i interface this with a program?
Thanks.

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Follow object

Mon Jul 01, 2013 9:57 am

A 200 metre fishing line. One end attached to the beacon, the other to an auto tensioning system?

Perhaps if the beacon contained a gps receiver it could broadcast its position via a 433MHz radio transmitter?

PiGraham
Posts: 3929
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Follow object

Mon Jul 01, 2013 10:13 am

motas wrote:Hi. I am trying to make a device which will always point to a small beacon up to 200m away. So for example if i have this beacon in my pocket then the device will point towards me no matter where I walk. I have a raspberry pi which i would like to use for this. I am confident i can build the physical device however what would I use to keep track of the beacon and how would i interface this with a program?
Thanks.
You are confident you can build it, but you have no idea what it is?

You could use triangulation of a radio signal. There are lots of very cheap 433MHz radio modules around. If you can find one that outputs signal strength you could measure signal strength at two or three locations and triangulate the transmitter position.

You could possibly measure phase difference between the signals from three receivers, if you can get those signals to a common point. You would need some hardware to measure phase.

You could use a GPS receiver to get a position

You could use the Pi with a servo to point a directional antenna to track the strongest signal and that should be pointing at the transmitter.

Buildings and trees may bounce or block radio signals, so accuracy of radio-beacon methods may vary with environment.

Google this

PiGraham
Posts: 3929
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Follow object

Mon Jul 01, 2013 10:16 am

joan wrote:A 200 metre fishing line. One end attached to the beacon, the other to an auto tensioning system?
:lol:

Trees & buildings could be even more of a problem with that one Joan.

Another option is a helium balloon tied to the target with a long string, a high vantage point and a pair of binoculars.

motas
Posts: 11
Joined: Tue Mar 05, 2013 11:55 pm

Re: Follow object

Mon Jul 01, 2013 10:29 am

Should have been more clear. It must be wireless and be able to track a fast moving object. I am confident i can build the physical linkages and frame and do the wiring etc, i am not confident in the programming of it.
You have given me two seemingly good ideas.
One is a GPS chip on both and compare the two locations and with trigonometry determine an angle to move a servo to so it is pointing in the right direction. Requires two GPS chips, a TX, a RX (plus obviously servo and raspberry pi etc).
Option 2 is to use two directional recievers pointing different directions and a transmitter on the moving object and by comparing the two antennas the servo can turn towards the stronger signal until the signals are equal in strength. Requires one transmitter and two or more receivers.
Any thoughts on which would be better?
Thanks.

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Follow object

Mon Jul 01, 2013 10:33 am

I'd go for GPS. Anything relying on accurately measuring signal strength sounds pretty expensive.

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Follow object

Mon Jul 01, 2013 10:43 am

GPS sounds like it'll work, but aren't the updates not very fast, and of limited resolution? I'm not sure how fast and accurate you need it. Will the person always/mostly be in line of sight to a camera, perhaps?

(The classical navigation fix for gaps between GPS updates is to couple it with an accelerometer so you can output faster updates, between each GPS fix. Sensor fusion & Kalman filters and all that stuff - in theory. A few people around here have used this in their quadcopters I think.)

motas
Posts: 11
Joined: Tue Mar 05, 2013 11:55 pm

Re: Follow object

Mon Jul 01, 2013 10:49 am

Its basically to track a car as it drives past. It doesnt have to be very accurate (probably within 10 degrees) but it needs to be smooth and fast because its moving about 200km/h. Will be in line of sight when it needs to be tracked but i think camera tracking is over my head.

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Follow object

Mon Jul 01, 2013 10:51 am

Ravenous wrote:GPS sounds like it'll work, but aren't the updates not very fast, and of limited resolution? I'm not sure how fast and accurate you need it. Will the person always/mostly be in line of sight to a camera, perhaps?

(The classical navigation fix for gaps between GPS updates is to couple it with an accelerometer so you can output faster updates, between each GPS fix. Sensor fusion & Kalman filters and all that stuff - in theory. A few people around here have used this in their quadcopters I think.)
GPS updates are normally once per second. Depends what "fast moving" means. If it's reasonably straight line motion you might as well filter the gps updates.

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Follow object

Mon Jul 01, 2013 10:52 am

Will you be using the servo to point a video camera at the car?

motas
Posts: 11
Joined: Tue Mar 05, 2013 11:55 pm

Re: Follow object

Mon Jul 01, 2013 10:53 am

Yes.

mikerr
Posts: 2825
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Follow object

Mon Jul 01, 2013 10:55 am

motas wrote:Hi. I am trying to make a device which will always point to a small beacon up to 200m away. So for example if i have this beacon in my pocket then the device will point towards me no matter where I walk
motas wrote:Its basically to track a car as it drives past. It doesnt have to be very accurate (probably within 10 degrees) but it needs to be smooth and fast because its moving about 200km/h. Will be in line of sight when it needs to be tracked but i think camera tracking is over my head.
walking speed, or 200km/h ?

Make yer mind up ;)
Last edited by mikerr on Mon Jul 01, 2013 11:01 am, edited 1 time in total.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

motas
Posts: 11
Joined: Tue Mar 05, 2013 11:55 pm

Re: Follow object

Mon Jul 01, 2013 11:00 am

Ok well I figured I wouldnt bother writing the whole thing about what im doing but i guess it will help. I race in off road racing and would like to get some footage at various places around tracks. I'd like to mount a go pro to a servo and have it point towards us as we go past (or alternatively a continuously shooting camera). We have a top speed of about 200km/h and would like the video to be smooth as we go past. Would like to have the vehicle mounted part small and self contained so it can be interchanged and used for other things as well. Also has to be waterproof and dust proof.
Filming part can be bigger but also need to be self contained and tough.

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Follow object

Mon Jul 01, 2013 11:03 am

GPS tracking should work as long as there are no sudden changes in direction for say 10 seconds before and during the part of the course you want to monitor.

The problem will be getting the GPS data from the car to your receiver.

Child with video camera might be a cheaper and more reliable method though.

motas
Posts: 11
Joined: Tue Mar 05, 2013 11:55 pm

Re: Follow object

Mon Jul 01, 2013 11:05 am

I definitely think a child is more expensive. Cheaper upfront but the cost to maintain it is ridiculous.
Our courses are mostly fairly open so shouldnt be a big problem.

motas
Posts: 11
Joined: Tue Mar 05, 2013 11:55 pm

Re: Follow object

Mon Jul 01, 2013 11:09 am

What about utilizing a mobile phone?
Or a UHF radio?
Both are always carried when racing for recovery situations.

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Follow object

Mon Jul 01, 2013 11:09 am

motas wrote:I definitely think a child is more expensive. Cheaper upfront but the cost to maintain it is ridiculous.
Our courses are mostly fairly open so shouldnt be a big problem.
:D

Ravenous
Posts: 1956
Joined: Fri Feb 24, 2012 1:01 pm
Location: UK

Re: Follow object

Mon Jul 01, 2013 11:26 am

Ah. GPS would have worked, I'm sure, for cars on a straight racetrack. But tight corners or ups and downs in mad off road driving, is different as the updates won't be quick (frequent) enough.

So you'd need something faster and more precise - either the inertial navigation system (i.e. accelerometers coupled with GPS I mentioned) or some sort of camera-based recognition of a car to point at. Both would be a challenging program to write I think...

(By the way the full on navigation would allow some fun 3-axis acceleration graphs etc to boast about after each run. But that's beside the point.)

One idea by the way - If they're going over laps repeatedly, most of the cars will go through the same sort of path at each corner. So even if GPS updates aren't frequent enough, it might be possible to record the whole run and "average" the path so later attempts will get better as more data is collected. You could imagine an unskilled camera man at the corner, after a few attempts he'd learn to anticipate the most common route through the corner. Wouldn't work very well if one particular attempt at the corner is a bit more spectacular than the rest though! In other words it wouldn't respond well to those little thrills and spills.

Also the little boy with the camera will definitely not work - he'll get bored standing beside the track and not getting any riding! :)

User avatar
joan
Posts: 14887
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Follow object

Mon Jul 01, 2013 11:32 am

Ravenous wrote:Ah. GPS would have worked, I'm sure, for cars on a straight racetrack. But tight corners or ups and downs in mad off road driving, is different as the updates won't be quick (frequent) enough.
...
Unless he's Jeremy Clarkson he won't be making any tight corners at 200kph (just the one perhaps)!

motas
Posts: 11
Joined: Tue Mar 05, 2013 11:55 pm

Re: Follow object

Mon Jul 01, 2013 11:33 am

Could anyone explain to me what the problem would be with a few directional antennas tracking the strongest signal. Seems to me (in my severely limited experience and knowledge) that a signal could be sent many time during the pass and the pi could constantly be comparing signal strength until it is balanced. Say three directional antennas spaced 15 degrees apart.
I'm sure there is a problem I am unaware of but i like to learn :)
Also yes we dont actually make that many tight turns, and those we do make are much slower and would be filming from inside the corner.
Thanks.

PiGraham
Posts: 3929
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Follow object

Mon Jul 01, 2013 12:23 pm

A GPS with compass can give you position, heading and speed.
Log GPS data for one lap and you should have a good predictor for next lap.
Coding it isn't trivial! If you aren't experienced with software this is too much to tackle as a first project, IMHO
Radio location could work, but it will probably be difficult to get the speed and accuracy you require to point a camera at a fast moving vehicle.

Radio location is use to track animals that have been tagged. It works well if a human waves an antenna and keeps moving toward the stronger signal direction, but I doubt that kit would be so good in a fixed automated system. You could have one directional antenna rotating continuously (say 5 - 10 rev/sec?) and sample the signal level to log the angle of peak signal.

Perhaps spinning an antenna like this might work.
Image

These receivers give "digital signal strength indication"

Maybe?

motas
Posts: 11
Joined: Tue Mar 05, 2013 11:55 pm

Re: Follow object

Wed Jul 03, 2013 8:13 am

Ok this does have to fairly simple to program I'm not very experienced.
A spinning antenna sounds much much simpler to program. Do you think it would be fast enough to follow a moving vehicle? What would be best to use to sense the angle the antenna is on at a given point?
It seems like such a simple thing to make, its just pointing at an object but is so hard to do.

PiGraham
Posts: 3929
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Follow object

Wed Jul 03, 2013 8:45 am

You have no idea how clever your visual system is to make it so easy for you to point at a moving object in natural scenes.

I put the spinning antenna idea up for discussion, not as any sort of recommendation or particular expectation that it will work.

If you want good photos your best option is a human photographer.

If you want photos at specific places, on a corner perhaps, you could fix up a camera on a tripod and some sort of automatic shutter trigger. It would capture every car that passes, but jpg bytes are cheap.

I don't think there are any quick, cheap and easy solutions to this problem that will meet all your expectations.

I like GPS tracking the best. GPS is used commercially to track racing cars.
http://www.race-capture.com/

I think i would input a digital circuit map use a Kalman filter and track profile to anticipate the car's position with resolution better than 1 Second GPS update. Inertial sensors and compass bearing could be integrated into the tracking.

The camera could then turn to selected points just before the car arrives, go to pre-defined focus and zoom and shoot a rapid series of photos before moving to the next photo point.
The data traffic is not high so there are lots of options for a radio link with the car. I think I'd probably go for WiFi or 433MHz, but if I could find a class I bluetooth serial device that works with external antenna that might be a contender. Use a high gain antenna at the receiver.

This is a difficult project that would take a lot of time to do.

motas
Posts: 11
Joined: Tue Mar 05, 2013 11:55 pm

Re: Follow object

Wed Jul 03, 2013 9:05 am

I understand how complicated it is for me to distinguish and follow a moving object (hence why I dont want to use a webcam for it), it just seems like a simple task to do.
I think its too hard for me though. So unless someone has a simpler suggestion for me i think i will give up.
Thanks anyway for everyones help.

jwl
Posts: 5
Joined: Mon Apr 17, 2017 2:21 pm

Re: Follow object

Mon Apr 17, 2017 5:40 pm

Sounds like an interesting project. Was there ever a solution for this? It would have other useful applications such as pointing a directional antenna toward a flying model with a low power TV transmitter.

One possibility would be to use a tracker which transmits the location from a GPS receiver. https://github.com/wb2osz/direwolf/raw/ ... racker.pdf A GPS receiver will typically send a location update once a second but many can be instructed to send 5 or 10 per second. The tracker code would need to be slightly modified to transmit updates at a very high rate.

On the receiving end use a software defined radio (SDR) dongle because it is small, cheap, and doesn't need extra wiring. Another RPi can decode the signals and provide latitude, longitude, direction, and speed. https://github.com/wb2osz/direwolf/raw/ ... -IGate.pdf With an add-on mapping application you could watch the location real time. Well known equations (hint: look for great circle) can calculate the direction from the observer to the moving object.

A model airplane servo could be used to aim the camera from the RPi PWM output. https://learn.adafruit.com/adafruits-ra ... ervo-motor

Finally, the motion would be jerky if the direction is updated only a couple times a second. I would use dead reckoning to calculate the location a couple dozen times per second between the GPS updates. This should result in smoother tracking.

Return to “Automation, sensing and robotics”