| . |
Robotran Authors: Debra Burhans, Mark Meyer, David Puehn burhansd@canisius.edu meyer@canisius.edu puehnd@canisius.edu |
. | ||
| . |
Overview The Robotran Project aims at creating a platform with which students can easily develop and test programs for LEGO Mindstorms robots. The Robotran application consists of an IDE for development and an RCX simulator for program testing. Once finished the Robotran will be a core part of CSC110 and CSC111. The Robotran IDE supports two languages, Lejos (Java) and Robolang. Robolang is a language developed by Dr Meyer that makes RCX programming easy. Once a Robolang program is written, you can compile it into Lejos for simulating or execution on a real RCX. Robolang was developed to reduce the learning curve that other languages possess. It allows even non-CS majors to develop robotics programs in very little time. A problem that many CS departments face is that there are not enough robots for every student to use. Robotran's simulator solves this problem allowing students to test their programs on the simulator. This way they can make sure their program works before using a real RCX. The simulator allows the user to create virtual worlds with grids, lines, and obstacles. Worlds can be imported/exported as an xml file so that they can be shared between users. Other features include a robot builder where you can specify what components to include on the RCX before running your simulation.
Documented Help (updated 3-27-06)*Bits of Alpha 3 - 3/27/06 Screenshot of Alpha 3 - 3/27/06 Bits of Alpha 2c - 3/22/06 Bits of Alpha 2b - 3/2/06 Screenshot of Alpha 2b - 2/28/06 Screenshot of Alpha 2 - 2/22/06 Bits after tab restructuring and many fixes 2/22/06 Bits with printer support and new editor - 2/14/06 Screenshot with new line numbered editor - 2/14/06 Bits of the first UI - 2/13/06 Screenshot of my first stab at the UI - 2/12/06 Development Log 7/25/06 - I thought I'd make it clear on what is to come. I hate to put a timeline on things because we all know it doesn't work out that way, but I can give you some sort of idea. In the big picture by August 22nd all the features required for the fall semester will have been implemented. From the 22nd until September 1st there will be no development, just testing and a sprint on catching up on documentation. I hope people will e-mail me volunteering in the testing process. All of the feedback and bug reports will be addressed and that build we will call Robotran Beta 1. Essentially the students of CSC110 and CSC111 will then be dogfooding the application the whole semester. I am hoping by the end of September, after Robotran has been used on a larger scale, we will have version 1. As far as source goes, any of the bits on the website are not very up to date. In fact so much has changed since AAAI that it's not even worth looking at those. I will get some new bits up soon. 7/20/06 - I added some more detail to the robot. You are also able to pick up the robot with the mouse and move it around. My focus will change now to better organize the simulator's code. The IDE's architecture is fine. Since the simulator keeps growing rapidly, I feel it is important to spend some time on rearchitecting and refactoring code. 7/20/06 - I tried a couple different approaches to storing a large set of points when painting paths on the ground of the environment. Most data structures hurt performance. Using a linkedlist as well as adding some compiler optimization hints into the code, I was able to store thousands of paths without compromising the 18% cpu usage. After some minimal calibrating I was able to sync up the simulator with the pen drawing RCX for the demo. They ran in unison and produced the same result. :) 7/19/06 - Now that the Environment has been rearchitected I decided to make it look better. I added antialiasing, but that chewed up cpu cycles and caused a lot of flicker. I was able to eliminate flicker by painting to a BufferedImage. After moving some code around I was able to reduce cpu usage from 56% to 18%. :) 7/18/06 - I did a ton of refactoring of the Environment class and components so that I can easily implement world creation as well as collision detection. I have been getting good feedback as well as much interest from other universities. 7/17/06 - The robot is now more than just a yellow rectangle. I added the motors and wheels to the robot. 7/16/06 - Dr Meyer figured out the threading problem. The wrong object was calling notifyAll(); I just needed to change this.notifyAll() to monitor.notifyAll(). 7/15/06 - I arrived at AAAI. There are a ton of cool robots here. Expect many updates to the simulator. This week. The IDE now integrates with lejos.exe and lejosc.exe. This enables you to easily compile your programs and upload them to the RCX from the IDE instead of living in the command prompt. 7/10/06 - I found a threading error in the Lejos apis. It's some sort of timing issue where if I restart the simulation too fast it doesn't behave correctly. 7/4/06 - The backend is stable enough that I am totally focusing on visual features. I find the low-level/backend stuff more interesting, but I need to get some bells and whistles done for AAAI. I ran into the problem that if I use the AffineTransform class in Java2D I cannot keep track of the robot's coordinates because the class just returns a generic Shape object. Basically I'm in trouble if you try to turn your robot. So I threw out some more code and am going to get my hands dirty and use sines and cosines to rotate my shapes. :( 7/1/06 - A ton of stuff has happened, of course, I just forgot to post :P. AAAI is coming up soon so I am working very hard in getting a lot done so that I can demo it there. Some milestones that occured include a couple rewrites of the Lejos apis. For the sake of compatibility I reverted back to changing nothing in the apis except the native code. This way almost any Lejos program will run in my simulator. Also this allows me to easily plug in newer versions of the apis in to my simulator. Today I finished implementing event handling between the simulator and the Lejos apis. The biggest problem was architecting it so that I can control all of the event handling threads created by the Lejos apis. I have only one bug that I am aware of that has to do with resetting static variables in the dynamically loaded Lejos program. As of right now I cannot reset the static variables of the simulation program once the program finishes executing. This is especially hard because I will never be able to know what they are and how many there are. The only logical solution would be to reload the whole class. I need to make sure the dynamically loaded code as well as the class loader gets garbage collected. 5/15/06 - So exam week was very hectic. Now I am back to working on the project. On Wednesday there will be a robotics meeting so there should be a bunch done before then. I changed the way button events were handled in the Simulator window. Now there is functionality for waitForPressAndRelease in rcx's api's. I also have done a bunch of thread stuff today. Hopefully I will have the thing up and running tomorrow with minimum motor behavior and button functionality. 5/5/06 - I finished the lejos class loader. So I am getting closer to being able to test the simulator. Exams are coming up. Next week could go either way; I could have a lot of free time or none at all. :/ 5/1/06 - This week and the next are very busy for me; the end of the semester is near. There are couple more things that were found that need to be emulated. Most having to do with event handling. Once I get that taken care of, I will have the buttons working so I can test out what I have so far. 4/23/06 - The framework has been laid down; the lejos apis now point to the RCX emulation instead of the calls to native functions. I am slowly adding functionality to the virtual RCX. I haven't tested anything yet because I cannot link the libraries together when I compile. Hopefully this will be resolved tomorrow at the weekly meeting. 4/18/06 - A quick note: I will not be posting simulator code until it is runnable. There is no sense posting bits and pieces that have no worth until they are all tied together. 4/18/06 - Now that I have verified that the new simulation approach will work I will talk about it. The idea is to create a virtual robot that understands the ROM calls that a real RCX robot uses. This way we can point the josx api's directly at our virtual robot and allow direct simulation of an Lejos program you can think of. Instead of creating an interpreter and compiler we now are able to let java run the code for us and use a java compiler with little modification to compile the lejos code for use with the new simulator. As of right now I have been spending most of my time rummaging through api's and C code trying to architect a viable solution. I have a meeting tomorrow where all the planning will be finished and I can put the rest of the simulator in to code. I know this means I will be throwing out the interpreter that I worked so hard at making, but this makes the simulator more robust and useful. :) 4/13/06 - I have come up with a different way to architect the simulator which would allow us to simulate any Lejos program. Not only would this make the simulator more compatible and robust, it would also elminate one of the two compilers that needs to be written. More to come... 4/8/06 - In the UI: I changed some toolbar icons to more relevant ones. A focus problem when a tab was created is fixed. You can now double-click on a sample or tutorial program when trying to open them. In the simulator: I did some more testing on the interpreter as well as added language features allowing you to manually free variables in memory as well as call exit when you want to the program to terminate. The simulator window was designed a bunch of times until I got it the way I wanted it. :/ I added LCD functionality to the virtual robot that looks very realistic. :) I finished debugging the environment and reduced flickering when repainting. After integrating all of the simulator components I was able to condense state variables whose values were the same during simulation. I was also able to remove two classes by moving their functionality to the virtual robot. I ran in to a ton of problems when trying to re-architect some of the simulator to improve understandability of the structure. I forsee a ton of restructuring as more features are added and testing continues. All-in-all I have to say the simulator is coming along well. :) 4/5/06 - I got a lot done with the painting of the Environment. It was decided that there would be environment templates that would load predifined obstacles and settings. There is a lot of coding to be done. At least I got the robot to render correctly and move/turn just by specifying the angle. :) 4/1/06 - There have been a couple fixes but nothing really important. I have added IL interpretation for the robot's movement commands. I am working on testing the mostly finished IL interpreter and have moved on to coding some of the simulator's painting. The IL specs have changed a little; I have improved some language features and changed some things to minimize the amount of IL variables that the compiler will need to include when forming the IL program. 3/27/06 - Alpha 3 has been posted. There have been so many changes and fixes to the UI that I am just going to list them... 1. fixed but where files did not save when executing the jar version 2. eliminated NullPointerException when canceling a file save 3. fixed bug where programs couldn't save if their programming type could not be discovered 4. fixed help window resize bug 5. added toolbar to main window 6. reorganized some of the menu 7. fixed line numbering bug where component didn't resize when the font what changed 8. changed the program's laf 9. minimized memory consumption by 8mb 10. put the compiler output in a tab for later addition of other output tabs 11. added functionality to decide window size based on the user's desktop resolution As far as the simulator goes...I was able to solve the threading problem for the Interpreter. The virtual robot now has button functionality. Right now I am at a stand still with robot movement until I get some testing done. 3/23/06 - I ran the new WebStart version and I found a bunch of bugs. When I get home I will work on them. There seems to be a problem getting full permissions when in WebStart mode; I think I have found a fix. I have some new ideas I want to implement into the UI so that it will better resemble standard IDEs. The whole layout of the main window will look different. It will be versioned as Alpha 3. 3/22/06 - I needed a break from the simulator so I did some UI stuff. The way fonts are handled has been changed. I also added a feature to allow you to apply a font to all tabs at once; this includes tabs that have not been created yet. The close tab button has been changed. The find feature is a little smarter and loops through the text when it hits the end. Finally the open samples and open tutorial structure has been changed so that they work inside the jar file. 3/20/06 - After today's meeting there are a couple different features that need to be added to the RoboIL language. We also did some behavior testing of the robot to determine how the execution threads need to be structured. Nikto has been acting up but when the bandwidth issues are resolved I will post some new bits. 3/19/06 - I have not been posting much during this break because I have been very busy. I did get some things done. I have redesigned the IL about three times. I am pretty satisfied with the current versions. The simulator is not even close to completion, but I am happy with the way it is structured and I believe taking extra time on architecture will pay off. There will be no bits to post until I get a prototype up and working. I have changed some UI stuff, but there really is no point in posting it until I get the rest of the bugs fixed. 3/10/06 - I have gotten a fair chunk of the Interpreter class done. The Interpreter class is the class that executes the IL that the compiler spits out. Specifically I have finished the handling of variables. The variables are parsed and stored in a hash map. I am able to successfully retrieve and modify their values. 3/3/06 - The latest version of the IDE have been posted. As I said before IDE development is slowing down. I have begun to work on the simulator. It will be a while before I get something working enough so that I can post it. I have finished the design of the IL that the simulator will execute. I have also finished about 30% of the IL interpreter. For testing, I will be writing programs in IL not Robolang. I will worry about the Robolang to IL compiler after the simulator works. :) 2/27/06 - In the next couple of days there will be bug fixes and a then a halt to UI development at this time. I will begin to focus on creating a simulator and a virtual robot. I will probably need to take some breaks from the simulator. This will be when the rest of the UI development will take place. I will post the locked down UI and src soon. Then I will be only posting the simulator from hereon out until the two are put together. 2/26/06 - A Java Web Start version of the program can be run by clicking the link above. 2/25/06 - I have decided to write a custom text component for Robotran. I think it will be worth the time so that I do not need to sacrifice any usability or functionality. 2/25/06 - After working out all the bugs in the font chooser dialog, I found that changing the font on a JEditorPane is pretty painful. So I have decided to sacrifice the line numbers for the ability to change the font and disable word wrap. I am not sure what I am going to do about the line numbers stuff yet. Perhaps I will look at some IDEs written in Java and see how they did it. 2/24/06 - I added a find function to the IDE as well as a font window to select the font you want to use. They will be included in the newest bits whenever I post them. 2/21/06 - An updated version has been posted. There have been many major changes so I will call this Alpha 2. 2/20/06 - Tabs work fine now. The logic behind how the tabs behave took about 300 loc. The real problem was how to keep track of all the objects associated with tabs. Each tab can have things such as: a file associated, a partner tab (somewhere to put translated text), a JEditorPane, an index, a tab type, and a title. The UI is also resizeable now. The help window will also be made resizeable by the time I post the new bits. 2/19/06 - The JTabbedPane api is terrible. So I have written an abstraction of it that is much easier to use and is more feature rich. I have implemented it in Robotran but have yet to complete testing it. Once it has been tested I will post the bits. The help from the original Robotran program has been ported over to an html document. It can be found in the links above and has been integrated in to the program. 2/18/06 - After some feedback I will try to make Robotran more like an IDE. I need to do some massive work on the way tabs are controlled and kept track of. The simulator is going to be the heavyweight of this project. I have decided to make that it's own window separate from the IDE part of the program. I think this will better organize the program's features. 2/14/06 - I added line numbers to the text editor. I changed the JTextArea's to JEditorPane's and then applied a custom StyledEditorKit to display line numbers to the left of the text. The numbers are not editable and do not show up when saving files. I also completed text printing as well. The printing works bug free but it is not where I want it to be yet (as far as style goes). 2/12/06 - The first version of the UI for Robotran is looking good. I designed it with productivity in mind. There are many keyboard shortcuts and navigation tricks that help to user be more productive. I have about four bugs on my plate to which none are serious. I have gotten a little feedback; I am sure there will be many revisions after tomorrow's meeting. As of right now the UI has been tackled as well as all FileIO. There is some ironing out I have to do with the Translator class (the class that translates Robotran to java) to get it to plug in better with the UI. 2/12/06 - The site is up. My progress on Robotran will be logged here. :) * Note that the WebStart version may not include all features of the stand-alone version. Features are slowly being changed to make them more WebStart friendly. |
. | ||
| . |
[ Index | Fozzy | Hermes | Robotran ] |
. |