Autonomous RC Tank controlled by a NXT brick

Discussion specific to projects ideas and support.
robotrandi
Posts: 7
Joined: 15 Aug 2011, 13:40
Contact:

Autonomous RC Tank controlled by a NXT brick

Post by robotrandi »




Hi guys,

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... !

Thanks,
Dan

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/
Last edited by robotrandi on 15 Aug 2011, 19:47, edited 1 time in total.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Autonomous RC Tank controlled by a NXT brick

Post by HaWe »

very nice, but:
...controlled by a NXT brick?
where and how?
robotrandi
Posts: 7
Joined: 15 Aug 2011, 13:40
Contact:

Re: Autonomous RC Tank controlled by a NXT brick

Post by robotrandi »

Sorry, there are no pictures in that post of the internal of the tank.
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.

Dan
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Autonomous RC Tank controlled by a NXT brick

Post by HaWe »

thx for the new movie but I'm still not clear about what the NXT is actually doing and in which respect this tank is autonomous...?
robotrandi
Posts: 7
Joined: 15 Aug 2011, 13:40
Contact:

Re: Autonomous RC Tank controlled by a NXT brick

Post by robotrandi »

The link that I've posted in my 1st reply doesn't just show a new movie, but it has plenty of details / pictures about the internals:
- 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,
dan

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
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: Autonomous RC Tank controlled by a NXT brick

Post by mightor »

I love the mix of NXT and home brew! Nice job :)

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
hergipotter
Posts: 48
Joined: 12 Jan 2011, 18:40
Contact:

Re: Autonomous RC Tank controlled by a NXT brick

Post by hergipotter »

VERY cool!!

One question, why is it waiting so long after it has found a target before it is shooting? A technical reason?
link to my youtube channel under my avatar!
robotrandi
Posts: 7
Joined: 15 Aug 2011, 13:40
Contact:

Re: Autonomous RC Tank controlled by a NXT brick

Post by robotrandi »

Mightor : yes, if I don't solder a few wires / pins in a project I don't feel like "owning" it ! :)

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.

dan
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: Autonomous RC Tank controlled by a NXT brick

Post by HaWe »

how is the tank detecting a target?
nxtreme
Posts: 246
Joined: 29 Sep 2010, 03:53
Location: 192.168.1.2

Re: Autonomous RC Tank controlled by a NXT brick

Post by nxtreme »

doc-helmut wrote:how is the tank detecting a target?
!!!
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...
I vote that we put up a PayPal fund called the "Get Doc a new pair of glasses fund" :).

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 rule them all, One King to find them,
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 3 guests