Arduino Motion Tracker

So I am looking to try and track a moving object and possibly intercept said moving object.

First issue that comes to mind is computing power. I don't think the arduino would be strong enough to make all sorts of calculations like that - like predicting the direction an object is moving, and then adjusting another object with predictions etc.

  • Is it possible to use an arduino to piggy back off of my computer? ie use my computer as the processor and the arduino as a means to control and relay certain actions. If so, how?

Also, trying to think of how I would actually set this up.
1- Have a central station that will map the nearby area and check for changes. If an object is sensed, try to calculate its projected distance by taking 2 points and making a calculation. Does anyone have experience with this? I have seen people use actual cameras to do maping, however, I don't think it is reliable / accurate. I also do have laser imagers but all I have is the scan engine and haven't figured out a way to utilize them yet.

2- Now for the interesting part, have another projectile intercept - I am thinking the best way to do this would be something like laser guidance? so from my central station have a laser paint the target, and on the intercepting projectile have an arduino mini with something that can track where a laser is, and direct the projectile accordingly.

If anyone has any experience with any of these and can offer any advice that would be greatly appreciated.

Aren't you forgetting to tell us something?

Is it possible to use an arduino to piggy back off of my computer? ie use my computer as the processor and the arduino as a means to control and relay certain actions.

Yes.

If so, how?

Talk between the two systems using serial communications. The Serial.print / Serial.write is what you use at the Arduino end. The computer end depends on what language you write the program in.

That is as much as I can answer, but it sounds like heavy weight military stuff.

AWOL:
Aren't you forgetting to tell us something?

What am I missing on this? This is just an idea that I thought of, did some googling and couldn't really find anything solid on this so figured I would voice my idea here, and see if anyone has done something like this before.

Grumpy_Mike:
Yes.
Talk between the two systems using serial communications. The Serial.print / Serial.write is what you use at the Arduino end. The computer end depends on what language you write the program in.

That is as much as I can answer, but it sounds like heavy weight military stuff.

I mean, I got the concept from military stuff, just trying to replicate on a smaller scale.

So, ideally I would probably be trying to code in C/C# depending on whichever is easier for this kind of application. Do you possibly have a link to something in which I can use as a guideline for using an arduino to run commands on a computer program?

What am I missing on this?

Speed, size, environment, detection method...
How much more do you want to tell us?

Do you possibly have a link to something in which I can use as a guideline for using an arduino to run commands on a computer program?

No you have it wrong. The Arduino does not run a command on an other computer. The Arduino sends a message to the other computer and that computer does something with the data it is sent.

You have chosen a heavy weight project and I think your current skills are not up to it. It is sort of like if you have to ask then it is too hard. Start off with something that won't get you arrested as a terrorist.

A soccer robot can work independently to intercept a ball but that is an example of a very tightly controlled environment and the motion of the ball is constrained to 2 dimensions.

Without some more details it is impossible to propose solutions.

IR LEDs are often used to make tracking easier. A WiiMote uses the four IR LEDs on top of a TV to figure out where in the room the WiiMote is located.

There's some cool tracking demos using a WiiMote.

A WiiMote isn't really microcontroller friendly but the camera from a WiiMote can be used to make a microcontroller friendly tracking system. Depending on the microcontroller used, you might also need a crystal to provide a clock pulse.

There are lots of other cameras which could be used to track objects. It's generally a lot easier to track something if there's a lot of contrast between the object and the background. An IR LED with a filter (on the camera) which only allow IR through it, can make it much easier to track an object.

I've used a black and white camera with an 8-bit parallel ADC chip to make a low res scanner (of sorts). To visualize what the camera saw, I had the image displayed on a LED matrix. (I think this is a cool photo so I look for excuses to post it.)

The LEDs are displaying what is seen by the camera in the top left of the photo. (Can you see the image of the text "HI" as seen from the camera?) I'm not sure why, (probably because I can understand the code) but I like these sorts of low res images more than a high res image possible with a webcam or a Raspberry Pi computer/camera.

While a low res image could be used for line following and tracking a high contrast object, you'd probably be better off using a "real" machine vision solution such as OpenCV. A program using OpenCV could issue commands over a serial port and instruct a microcontroller to move servos so the camera follows the object being tracked.

CMUcam 4 and CMUcam 5 (aka Pixy) both have demo programs which allows one to use the camera with a pair of servos to track the position of some high contrast object. Now that I've been thinking about this issue a bit it seems like a Pixy would probably be the easiest way to getting started with some sort of machine vision tracking system.

AWOL:
Speed, size, environment, detection method...

Detection method - that is something I was hoping you could tell me. I mean I have seen some people use PIRs, or Ultrasonic sensors, but I was hoping to get other peoples input on what they think might be a viable detection method.

Environment - I want to start off as basic as possible. Maybe like a slow moving object, and using an array of PIR's to track it moving horizontally. That would be a start most likely. Maybe also try it with ultrasound and see what works better. Or maybe even using a camera - but then I would need to figure out how to use a camera in that fashion. Would it be possible for me to send data to the arduino from my PC via serial? what about having the arduino utilize a file on my computer that is written to by another program reading the camera data - is that possible?

Speed - I would love for it to be really fast, but then that is really all dependent on how good my motion tracking is. I do have 2 laser scanners with a horizontal laser that I could attempt to make some sort of LIDAR, and I think that would probably be the fastest method... however, that is way beyond me and would not be a starting point.

Size - I'm thinking like mini rc helicopter size. Like something that can easily fit on my table

Grumpy_Mike:
No you have it wrong. The Arduino does not run a command on an other computer. The Arduino sends a message to the other computer and that computer does something with the data it is sent.

Got it. So based on some more research it seems it is also possible to send messages through serial to the arduino - is that true? Or above, i suggested maybe having the arduino read a file on my computer that is altered by an external program.

Grumpy_Mike:
You have chosen a heavy weight project and I think your current skills are not up to it. It is sort of like if you have to ask then it is too hard. Start off with something that won't get you arrested as a terrorist.

It's fairly straightforward honestly. The technology has been around for years. I think the hardest part of the project would be the physics algorithms. But for now I am going to gradually work my way up. Start with a basic concept. First I need to figure out how to communicate between my computer and my arduino. Then try and figure out how to track an object in 2d space. Next try and track an object in 3d space. Next step would be tracking and prediction, followed by tracking and intercepting. It's not "sort of like if you have to ask then it is too hard". It's sort of like I'm trying to get a baseline / feel for the project - is it possible with items that I have or are easy to obtain, what would be some issues I might need to look out for.

I also don't see how this could get me arrested for terrorism. I'm not building a giant turret or anything, just a concept I was curious about.

DuaneDegn:
Pixy would probably be the easiest way to getting started with some sort of machine vision tracking system.

That looks pretty cool actually. I think you may be right with this being a starting point. I'll have to do some more research on pixy.

Is your goal to create an automated indoor air traffic control system like the following?

Go back to that "environment" paragraph and look at it again. It says nothing about the environment other than "basic." The second sentence immediately starts describing the solution without describing the problem.

mikb55:
Is your goal to create an automated indoor air traffic control system like the following?
The astounding athletic power of quadcopters | Raffaello D'Andrea - YouTube

I think that's a great example of a tracking system. It looks like all those quadcopters have little balls which make it easier for the tracking cameras to identify them. I don't know if the balls have IR LEDs inside or if the balls reflect IR well.

I've wanted to use a camera from a WiiMote to guide my Roomba.

My thought was to add three IR LEDs to the top of the Roomba and use a camera from a WiiMote to locate the three IR LEDs. I'd then use the information from the camera to calculate the position and orientation of the Roomba and send commands to the Roomba so it would follow some predetermined path.

I think controlling a Roomba would be much easier than controlling a quadcopter. Of course the robot wouldn't need to be a Roomba. I thought the Roomba would be a good robot to use since there would be a practical application for the tracking/control system. A smarter Roomba could clean an area faster than a Roomba driving around in random directions.

mikb55:
Is your goal to create an automated indoor air traffic control system like the following?
The astounding athletic power of quadcopters | Raffaello D'Andrea - YouTube

That is a really cool concept, however, no that is not my goal. Some of the things / algorithms that he utilizes might be applicable to my project. My goal is really object tracking and prediction.

The tracking system being in a fixed position, analyzing the environment. If it detects an object within its field of view (hoping that you guys could help me determine what would be the best idea for tracking an object, but as of now pixy might be it) track it and then predict where the object is moving to. Ideally I do not want the object to have any sensors on it making it easier to track, however, that may be required at least at the start. So for instance, I want to be able to toss a tennis ball into the field of view, and then have the program/algorithm track and predict that balls movement

Another issue that I can think of is determining distance. For that, if I decide to go with pixy, I think using 2 pixy's and parallax to determine how far away the object is would be the right approach.

I think that if you wish to detect an arbitrary object traveling on an arbitrary trajectory, you won't get by with less that rather sophisticated pattern recognition, or perhaps a radar. Either way, its a very expensive project well beyond an Arduino's capabilities.

You might be able to solve the problem in a fixed area, in two dimensions, with some distance sensors, and triangulation. But it'll be a long ways from an antimissile system.

It's fairly straightforward honestly. The technology has been around for years. I think the hardest part of the project would be the physics algorithms. But for now I am going to gradually work my way up. Start with a basic concept. First I need to figure out how to communicate between my computer and my arduino.

Yes, get an arduino and start experimenting. Programs like roborealm can use a pc/cam setup for object detection.

I found this kit - has anyone had experience with it

RobotGeek Desktop Roboturret w/ Vision Tracking
http://www.robotgeek.com/roboturret-w-vision-tracking

If the gizmo you want to point is small, you could use a pan/tilt gimbal like the one used here for about $10 (including the servos).

I noticed they mention using a Wii Nunchuck as a pointing device. Adding Nunchuck control is really easy.

I have a different round about approach to this...which I have not tried....lay out an array of fixed motion sensors in front of your turret...when they detect motion they transmit to the turret and the turret tracks onto the sensor...as the movement sets of different sensors the turret tracks onto that particular sensor....it is indirect motion detection really but it could work...an advantage would be that you know the position of your sensors so you can program the turret to their fixed positions...much like pre targeting an artillery piece..

I have a different round about approach to this...which I have not tried.

When you have tried it then post, do not resurrect a 7 month old thread on just speculation.