Simulation History

Note all video is screen captured at 15 frames a second so its a bit choppy but it is as full resolution so you could see the details.  The video was captured at the full runtime resolution used high quality jpegs and it was then converted to a DivX file afterwards at a high quality setting

The first simulation I did was for my undergrad thesis.  The simulation started with the map editor which did a pretty good job.

Here is some video of the map editor in action Note the innovative add depth function which was used for the 3d rendering

It contains most major functions and also was used to make the robot model and can be used to make the shape of the sonar beam


Here is the program for download



Here is some video of a nice intro to the simulator  This video shows off the robot model, the sonar beam and the fact that the simulation was originally in GDI and could swap to DirectX instantly


Here is the old simulator for download As long as you keep all the files in the directory structure it should work.  Note the speed control does not work anymore because of some sort of windows issue.  It comes with a help file "f1" to activate it.  It has a description of all of the hot keys


Here is the graph viewer  It could view and print saved graphs that the robot makes in the simulator.  Its screen is a lot larger then the simulator so it looks better



Here is some video of the robot mapping  The robot maps a quadrant of the given area.  Notice at the end it closes the loop correctly.



Here is some video of the robot navigating  The map used was a full version of the previous map which was generated by the robot.


The first simulator was 2D rendered in 3D.  I decided that having height was a good thing so I started work on an improved simulation.  About the same time some of my friends wanted a 3D map editor thing so I sort of did both projects at once, and behold a terrain editor was my first real project in 3D.  I used some of the code from the previous project which was a mistake... as I eventually started writing more of my own DirectX stuff which improved the code quality.



Executable of this project


Code of the project


Video of this project in action


The terrain project was mostly scrapped but some of the code somewhat lived on.



There was one more use of the original simulator for a robotics class (well robocup).  I used the simulator to test a line following algorithm... the final hurrah for this simulator I suppose.



Code and executable Make sure the path is correct as stated in the readme file


Line follower video



The next version finally used slightly better directx code and architecture.  It was far more class based (the first mapeditor dumped too much code into single classes)

There are two videos on of a physics example and one of the light map example.  Both come from the same program which contains an octtree.  The physics example tries to do real dynamic collision detection from bounding sphere all the way down to polygons.  It never worked 100% since dynamic collision detection is still a difficult issue.  The lightmap pretty much worked but was somewhat slow to calculate.  After this project didn't use dynamic collision detection again (well no need I suppose) but the octtree and lightmap moved on to the next simulator.  Also I wrote a 3DMax exporter that gave me really good control of the models so that was a good improvement.


pretty light maps


In the physics simulation the red globe is bounding sphere, the yellow one is where the collision happened


Physics video


Lightmap video


The code 


Executables to both physics and lightmap


Originally I thought my masters would be on robotics.  So I spent a lot of time making a BSP based 3D simulation and map editor  This is officially the second version where the undergrad thesis was my first and everything in between was just a learning project.  The coding was much better and the code architecture was pretty good.  I learned a lot from 3D Studios Max and their plug in architecture so I made it very module although not quite a plug in architecture (didn't think it was worth the time).  I also took a BSP online course where I learned BSP and CGS and used some of that courses BSP code in the map editor and simulator.  At the end it was pretty close to a game engine before pixel shading, since I was using similar technology with the BSP and lightmaps.  The map editor is actually pretty good quality compared to other map editors of the area and is quite usable, although there are a few flaws.


The video contains


1)  Simple demonstration of the CGS.  The CGS could use any exported 3D max object (e.g sphere cones etc)


2) Then the room is textured


3) Then a BSP is constructed with a light map.


4) Then a premade map is loaded showing a more complex area


5) That map is run through a BSP and light map to show what it looks like


6) A new map that is used for the robot simulation.  Showing the starting point and path following objects



This all leads to the latest simulator which does edge detection.  It also has the capability of some tread physics.  The simulation was originally set up to test the treads going up inclines but it makes a good video




Video of the map editor in action


Simulation 2 Video


Map editor 2 and Simulation 2 exe files


About the time my second simulation was done I switched to another thesis topic so I was unable to put any time into it for a while.  Afterwards when I got back to it for my PhD thesis I realized that a photo realistic simulation did not make too much sense.  The best 3D engines are still not photo realistic and it would make more sense to use them rather then make my own.  I realized that it made more sense to do a simulation of what happens after the first image processing step, that is either line detection or point (feature) detection.  I rebuilt simulation 2 into simulation 3... checking every class I added for bugs and only adding what was necessary.  After adding new functionality I got a lighter weight program that works pretty well.