Candy Hunting robot

Post your NXJ projects, project ideas, etc here!

Moderators: 99jonathan, roger, imaqine

Candy Hunting robot

Postby naarok » Wed Nov 12, 2008 3:19 am

Here's a video of a "Candy Hunting" robot I built.

The three NXT motors are used for the tracks and rotating the arm that holds the ultrasonic sensor. A power functions motor is used to raise and lower the arm that holds the ultrasonic sensor. A second power functions motor is used to open/close the gripper and raise it slightly when it has hold of a cut down pop can. A HiTecnic IR Link is used to control the power functions motors.

The basic mission is to scan for the closest object, move to that object, collect it, return to the starting point. Deposit the object and then return to the starting orientation.

To find the closest object I do two scans. One close to the ground. The second with the sensor raised up. The intention is that if I see something when the scanner is close to the ground that isn't there higher up, it is something I'm interested in. If the object is seen in both the lower and upper scans, I assume a wall and ignore it. This works sometimes. With a sensor that has a smaller angular spread, I expect this would work better.

I also found that the sensing wasn't as accurate as I needed it to be to collect objects more than 40 cm away. To minimize this problem, the robot moves to within 20cm of where it things the object is and then does a second scan to refine the objects location.

I keep track of total distance and angle travelled and then do some simple math to find the return vector.

The robot is programmed in LeJOS.

The tracks are almost directly from the Technic Bulldozer. The rest is my design, build and code.
The LeJOS class to drive the power functions motors is checked out from the LeJOS repository and
naarok
New User
 
Posts: 1
Joined: Wed Nov 12, 2008 3:18 am

Postby lawrie » Wed Nov 12, 2008 7:24 am

Very impressive. It is good to see the IRLink class that I wrote some time ago being used. The latest release has been so long coming out that not many people will have had a chance to try controlling PF motors. The support for servos in the 0.7 release gives more options for extra motors.
lawrie
leJOS Team Member
 
Posts: 921
Joined: Mon Feb 05, 2007 1:27 pm


Return to NXJ Projects

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff