Object tracking.....
Jlittlemyer
Posts: 4
I was wondering if it is possible to "track" a moving object with the Ping sensor using the BS2?·The setup I’m trying to achieve is a ping sensor mounted to a servo that·will allow the sensor to follow an object from left to right or vice versa.
Comments
On a tank turret I had once implemented some basic tracking using two PING))) sensors. They were tuned for objects between 5 and 10 feet so that a person or other fairly sized object could be seen by both sensors. When one sensor had a higher range the system would move to keep both sensors on the object by turning the turret. It was supposed to fire a water hose at the target but I did have a few things cause me issues such as an even closer object coming into the FOV or sporadic readings from people due to poor reflection.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
Rafae;
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You've got to play the game.
You can't win.
You can't break even, except on a very cold day.
It doesn't get that cold.
~Laws of Thermodynamics~
The PING will work if you're using it·in·an otherwise movement-free enviroment, especially if the target is relatively close (but not too close to other objects).· Tracking is much easier with two or more PING's though because it allows you to check·for lateral movement.· On mobile robots you can use a ring of sensors and dispense with the power-hungry servo.
One trick if you're using a PING on a servo is to pan the servo on a centre-left-centre-right cycle.· This is faster than using·the standard·left-centre-right pan, because you don't have to wait for the servo to travel from full right to full left before·repeating each sweep.· Depending on the speed of your servo, it could save up to 200 ms per sweep.· I've used this method for programming a robotic "dog" which "barks" and charges at anyone who gets too close, but retreats to a safe distance when it is approached.· I've also used it for a robotic "statues" game, where the robot creeps up behind you but freezes when you turn around.·
Another trick is to do a series of overlapping pans and test to see which sectors the PING is active in.··This is slow, but it gives you better directionality.· With a standard·"left - centre - right" pan, an object could be detected in any one (or more) of three rather wide sectors.· If you increase this to·a five or seven sector pan·you·can get a better approximation of·the object's direction.··For instance, if the PING is active in sector one·but not in sector two (reading from left to right), the object must·be at the extreme left.· In a 120 degree sweep, a seven sector pan can give you a resolution of 17 degrees or so, which is·much better than the 40 degrees offered by the·PING.·
Don't forget that set distance measurement can be a drawback.· It's just as important to detect changes in distance.
Is it possible to use a small camera as a sensor with a basic stamp?
Not by itself. A Basic Stamp is incapable of handling the amount of data or the data rate involved from a camera. Have a look at the BoeBot CMUcam which contains a lot of external circuitry including a pretty fast co-processor that handles the video data and analyzes it so only a small amount of data needs to be sent to the Stamp (www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/29/Default.aspx?txtSearch=stamp+camera).
I will look for the new member discount thingee and buy them now.
j