Presentation Transcript
Slide1 : Introduction Future Approach SIPHER Students:
Daniel Limbrick,
Emily Sherrill
Graduate Student Advisor:
Daniel Balasubramanian
Exploring with LEGO Robots Embedded systems, robotics, and wireless communication are subjects of rising importance in today’s world. The basis of our summer project was learning how to combine these three topics. Our challenge was to build a robot from the Lego Mindstorms robotics kit and program it to explore the layout of a maze. While the robot explores the maze, it sends information about the maze back to the computer using a custom designed Bluetooth communication interface. The computer then processes that information and draws the maze onto the screen. Once the maze has been mapped, the user can direct the robot by clicking on any point in the maze. The computer generates directions and, using the Bluetooth interface, sends these control actions to the robot. The robot executes the commands and travels to the selected point. Thus, the project is similar to having an unmanned vehicle explore an uncharted region and send back information about the geography to a base station, which can then plot the layout graphically. Programming Environment All code downloaded onto the RCX 2.0 brick was written and compiled for leJOS (Lego Java Operating System), a replacement firmware for the Lego Mindstorms RCX brick. leJOS is a Java Virtual Machine that fits within the 32kb on the RCX. Programs written for leJOS are written in a condensed version of Java that contains additional leJOS classes.
The control application on the computer was written using the latest version of Java.
We required the ability to read/write information to/from the serial port of the PC. To do this we used the Java Native Interface (JNI) to import this functionality. The native routines for reading/writing to/from the serial port written in C. Explore Algorithm Checks for walls in every direction
Returns info about the walls to PC based on value in touch sensor Hardware Description Two Motors
Two Rotation Sensors
One Touch Sensor
RCX Lego Brick – Hitachi H8 Microcontroller
Bluetooth Brainbox Device Our Robot Typical Robot Parts “Go to Point” Algorithm Robot Side (downloaded to robot; compile for leJOS) = PC Side 0 = open space (unexplored)
1 = wall
2 = open space (explored) Real Test PC/Robot Communication Sending commands to robot during runtime
Receiving info from robot about sensor values Results Simulation Traveling through maze
Keeping track of coordinates & maze values
Going to point accurately Simulation of Maze Algorithms Sending commands to robot (other PC) during runtime
Receiving info from robot (other PC) about sensor values Simulation of PC/Robot Communication use of motors produces noise on the communication circuit
the bytes received from the robot are correct but the noise appends additional bytes to the message that the robot sends. Robot Movement Exploring a block
Making accurate turns accuracy of turns could not be guaranteed due to friction causing the wheels to slip Although we completed a lot of the project successfully, there is room for improvement. Future considerations for this project include the following:
Using wheels with less friction (robot movement accuracy)
Using the new RCX brick with built-in Bluetooth capability (reliable communication) Receives destination point from user input
Calculates path from current position (depth-first search)
Returns stack of commands for robot Allows PC to keep track of Robot’s location and direction
Provides logic to steer robot through and map maze Position Tracking Algorithm Bluetooth Communication Interface PC’s Bluetooth device on serial port
Implemented serial port communication through JNI with DLL written in C
PC/Robot send messages during robot runtime via Bluetooth
Robot relays sensor info to PC
PC gives robot next command Bluetooth Connection Serial Connection Serial Connection (Custom Bluetooth Circuit) Start Explore zero in front? Send Fwd Cmd Grid Values Add Coordinate Start Push front onto stack Push right onto stack Push left onto stack
Pop stack
front = complete End End End Start Update Coordinate Var End ? Front == 2 “Can’t reach” Move Forward Draw Space Draw Wall
Catch the
buzz on authorSTREAM
Copyright © 2002-2008 authorSTREAM. All rights reserved.