I'm quite new on this forum and I wanted to share with you one of my latest projects:
http://trandi.wordpress.com/2011/05/14/ ... %80%93-v3/
The above post contains all the details, including the code (for the Arduino slave board too !) but in a nutsell, it's about an airsoft RC tank that I hacked so that it can be FULLY controlled by a NXT brick (programmed in LeJOS) and fully AUTONOMOUS.
I've also added an IR Camera hacked from a WiiMote, which allows it to track and lock on targets (a simple IR LED) and then fire plastic pellets at it...
I'd be very keen to have some feedback from you guys and / or any suggestions for improvement... !
P.S. There's a link at the beginning of the post to the previous post which has plenty of pictures with the actual NXT brick inside the tank: http://trandi.wordpress.com/2011/05/02/ ... c-tank-v2/
There's a link at the beginning of the post, to the previous post which has plenty of them:
http://trandi.wordpress.com/2011/05/02/ ... c-tank-v2/
Also the Java code you see in the main post IS the code running on the Lego NXT, using LeJOS.
- how the NXT brick is connected to the Arduino board (that controls the tracks motors)
- how one NXT motor is moving the turret
- etc. ...
The NXT brick is running all the high level algorithms, in a multi-threaded manner 1 thread controlling the turret and another independent one for the chassis. Which means that the 2 are independent.
Now for the AUTONOMOUS part, as you can see in the videos (or in the code if you care reading it) the tank wonders by itself and looks for a target. Once it finds it, it "locks" on it and then tries to approach it. Once it's at around 80cm it stops and fires at it !
Hope this answers your questions,
P.S. you do see a remote control in some of the videos, this is because there are 2 modes for the tank :
- a manual one, where it simply responds to your commands, as any other RC toy
- an AUTONOMOUS one, where it does what I've just mentionned with absolutely no external intervention
Hergipotter : exactly, it's a technical reason. It is supposed to wait a little bit, but only 2 seconds not 20-30 as in the video... I'm not sure what's happening there but I think it's a concurrency issue between the "firing thread" and the turret control one... and as everybody know, multithreading issues are hard to find / debug.
!!!doc-helmut wrote:how is the tank detecting a target?
I vote that we put up a PayPal fund called the "Get Doc a new pair of glasses fund" .robotrandi wrote:I've also added an IR Camera hacked from a WiiMote, which allows it to track and lock on targets (a simple IR LED) and then fire plastic pellets at it...
Seriously now, that is very cool! I had the same idea a while back, using a WiiMote camera to track IR light sources but I never got my hands on a WiiMote, which made it a bit hard to hack it . Keep it up!
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.
Users browsing this forum: No registered users and 3 guests