• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

lejos, java, and legos

 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a legos rcx brick and a few motors/sensors, I have heard of people reprograming thier rcx with java called "lejos." Does anybody know anything about this or has anybody done it themselves and would like to offer me some advice about it? It sounds really cool to me and I would like to try it, but I don't know how or where to get started. Any help or comments would be greatly appriciated. Thanks in advance- Dan
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about the lejos website? I use the Lego firmware and Bricx Command Center myself.
 
Dan Maples
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks Joe , just curious, what have you done with your legos, anything cool?
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Lots of cool stuff. Two robots that play tag. All manner of line following robots. A robot that chases a flashlight. Right now I'm working on a reactive target range, a "Hogan's Alley". I made a target stand that pops a target up and when the target gets hit, it falls down. I want to make a couple of them (I have 2 RCX's), control them with a laptop via the IR tower and keep score.
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just took a "Robot Building Lab" at grad school and we played with Handyboard robots (programmed in Interactive C or RoboJDE(Java), as well as the RCX robots with Lejos.

Check out the course website: http://plan.cs.drexel.edu/courses/robotlab/ it may give you some ideas to code.

Here's a quick summary of each lab:
lab 2:
part A: build a differential drive robot, and demonstrate the motion capabilities of the robot (go forward, left, right, reverse, etc)
part B: use a reflection sensor to determine when you're on top of a piece of paper and when you're not. Write a program that goes forward until it finds a definite change in color (going from paper to carpet and vice versa) and stop.

lab 3:
Add two light sensors to the robot:
If there's more light on the left, it should go left.
If there's more light on the right, it should go right.
If there's more light in the center, it shoudl go straight.
If it can't find a light -- it should wander aimlessly til it finds one.
(My cat was a big fan of this lab -- she loves attacking flashlights)

lab 4:
Add bumpers to the robot
The robot should follow the light but if it bumps into an object it should avoid it, then resume following the light. If it runs over a piece of paper it should avoid it, then resume following the light.

lab 6a:
Add kinematics to the robot (this is built into lejos api)
write a program that constantly spits out the robot's position (x, y, theta) while it wanders around and avoids obstacles.

lab 6b:
Add inverse kinematics to the robot
write a program so that a robot will go to a particular waypoint.
i.e. it starts at 0,0 make it go to (15,30)
If it bumps into an obstacle it should avoid it then recalculate how to get to the goal waypoint.

lab 7:
Add sonar to the robot with a servo motor so it can sweep the sonar from side to side (not sure if this is a standard Mindstorm sensor)
Do the same as 6b, but detect obstacles with the sonar instead of just bumping into them.

undergraduate final:
Use the sonar to develop a map of the world the robot sees. Write a planning algorithm that will navigate around several obstacles and reach a goal poing.

graduate final:
Given a series of doors, mount the sonar on the side of the RCX. And use particle filtering to do localization.
Basically -- say there are a set of 3 doors along the wall.
After the robot sees one door, he should know that he's located after one of those 3 doors, after seeing two doors, he should know he's located after the 2nd or 3rd door. If he doesn't see any doors after that, he should know he's located after the 3rd door.

Anyway -- dunno if those give you any ideas, but it was a neat class and adding onto the labs like that helped to understand the capabilities of the robot as well as how to balance multiple behaviors.

I'm thinking of writing a JavaRanch Journal article about RoboJDE vs LeJOS... what do you think?
 
Dan Maples
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
wow thanks guys thats great! Jess, definantly write that journal, I think it would be great for people like me to read. Thank you both again, you've been more than helpful! -Dan
 
The only thing that kept the leeches off of me was this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic