170 likes | 370 Views
Robot Design. Research, Development, and Testing. Deciding on the Build. Robot must be able to turn without deviating from its current location. Decided to use a tank design. Initial navigation would use the TiminingNavigator class developed in Lejos.
E N D
Robot Design Research, Development, and Testing
Deciding on the Build • Robot must be able to turn without deviating from its current location. • Decided to use a tank design. • Initial navigation would use the TiminingNavigator class developed in Lejos. • Communication would be achieved using the RCXPort provided by Lejos.
Robot Design Phase The final design was a modification made by the team in Sweden. This design placed the IR sensor towards the ceiling and adding a well designed bumper sensor to the front. Our initial robot design was a very basic tank design that was found using Google. The design was modified slightly to place the IR sensor in the back of the robot.
The TimingNavigator Class • The TimingNavigtor class was written by the developers of Lejos. • It provides (somewhat) accurate movement based on how long it takes for two functions to be completed • How long does it take to travel 1 meter. • How long does it take to rotate 360 degrees.
TimingNavigator, cont. • The measurements obtained depend on the surface used and the voltage of the batteries. So, the measurements would actually change over time. • It was determined a better solution was needed. • Tobias saves the day when he discovers the “poor-mans” rotation sensor.
Rotation Sensor • The encoder wheel is attached to a large gear. • The light sensor is used to read white and black values on the wheel. • A count is kept during movement.
Rotation Sensor, cont. • Provides accurate movement regardless of battery voltage or motor speed. • Still requires measurements to be taken, but they should hold true for that situation. • Measurements required: • Count to travel 1 centimeter • Count to rotate 1 degree
Rotation Sensor, cont. • The rotation sensor did introduce some new headaches. • Find the largest number of sector’s on the wheel and still be accurate. • Find the average value the light sensor “sees” for black and white areas. • Use trial and error to calculate 1 centimeter and 1 degree. • What is the accuracy obtained • Smallest movement allowed • Smallest turn allowed
The LightNavigator class • Class developed to accurately move using the new rotation sensor. • Once the class is instantiated, all you need to do is tell it to travel ‘x’ centimeters or rotate ‘x’ degrees. • Drawback: Does not maintain current x and y position of the robot.
Communication with RCXPort • Decided to use the RCXPort already developed for Lejos. • Slow speeds, but provides reliable connection and ensures all data is transferred. • Easy to work with because it uses Java’s Data IO methods. • Develop RCXProtocol class to bridge the server <----> RCX communication.
RCXProtocol Class • Simple class that creates the RCXPort and retrieves the input and output streams. • Provides methods for communicating with the robot: • Travel ‘x’ centimeters • Rotate ‘x’ degrees • Sends the commands and blocks until a response from the RCX is received.
Continuous Testing • During the design phase there was continuous testing of the robot’s “brain”. • Movement always seemed to be hit or miss when it came to accuracy. • What was the cause of the inconsistency? • X and Y coordinates, along with robot’s rotation were inaccurate. • Once removed/not used we were able to provide more accurate movement.
Inconsistent Communication with RCX • There are still inconsistencies with the way the RCX communicates with the server. • Commands received, executed, no acknowledgement • Commands never received. • One solution was to add some minor delays after commands are sent and executed.
Final Words • Bumper Sensor • Stops all movement and plays a series of tones. • No recovery at this point • Possibilities? • Lost Communication • Java IO Blocks, so it was hard to “timeout” the IO streams on the RCX. • RCXPort provides reliable data transfer, so no packets will be lost. • Possibilities?
References “Poor Mans” Rotation Sensor: http://www.restena.lu/convict/Jeunes/Divers/Poor_rot.htm Lejos Download and API: http://lejos.sourceforge.net/ Initial Tankbot Design: http://www-education.rec.ri.cmu.edu/robo_preview/content/mult/slide/tankbot.htm