Cooperative Robotic Simulator Environment Simulator Masters Report Scott
Cooperative Robotic Simulator Environment Simulator Masters’ Report Scott J. Harmon May 12, 2004 Cooperative Robotics Simulator Group Computing & Information Sciences Kansas State University
Outline l Introduction Overall system Demo l Environment Module Main Loop Map Component Robot and Sensor Components l Module Communications/Major Protocols Robot <--> Environment Viewer<--> Environment l Future Work Network improvements Map improvements Reflection Computing & Information Sciences Kansas State University
Overall System Architecture l Multiple Modules written in Java: Environment Robot Viewer Control Panel Communications Computing & Information Sciences Kansas State University
Overall System Architecture-2 [1] Computing & Information Sciences Kansas State University
Example Deployment Computing & Information Sciences Kansas State University
Demonstration Computing & Information Sciences Kansas State University
System Components Computing & Information Sciences Kansas State University
Environment Components Computing & Information Sciences Kansas State University
Environment Module l Coordinates and drives the simulation Main Loop using time-step based approach l Models the virtual environment Keeps track of positional and state information of all objects in the virtual environment Computing & Information Sciences Kansas State University
Environment - Main Loop l Iterated for each time-step Time-steps size is set at runtime l Drives the simulation Computing & Information Sciences Kansas State University
Environment - Main Loop-2 1 wait. For. Robots(); 2 set. State(STATE_ROBOTS); 3 send. Objects. To. VRMLClients(); 4 current. Time = 0; 5 running = true; 6 set. State(STATE_RUNNING); 7 while(running) { 8 //get the event for this timestep from each Robot 9 //lock the robotqueue 10 synchronized(robots) { 11 //This double-stepped get allows the stuff to travel here before I block trying to get it. 12 for (int i = 0; i < robots. size(); i++) { 13 Environment. Object. Robot robot = (Environment. Object. Robot) robots. get(i); 14 robot. prep. Get. Events(current. Time); 15 } 16 for (int i = 0; i < robots. size(); i++) { 17 Environment. Object. Robot robot = (Environment. Object. Robot) robots. get(i); 18 robot. queue. Events(); 19 } 20 } 21 //process queue from front (top). 22 process. Action. Event. Queue(); 23 //send out sensor readings to robots. 24 process. Sensor. Event. Queue(); 25 //add timestep to VRMLUpdates. 26 for (int i = 0; i < viewer. Update. Queue. size(); i++) { 27 ((Viewer. Update. Location)viewer. Update. Queue. get(i)). timestep = current. Time; 28 } 29 //send out VRMLUpdates to the VRML viewer 30 send. Viewer. Events(viewer. Update. Queue); 31 current. Time++; 32 try { 33 Thread. sleep(steppausetime); 34 } catch (Interrupted. Exception e) {} 35 } Computing & Information Sciences Kansas State University
Communications between Modules l Java Socket used Each component connects on a pre-determined port to the Environment. Serializable objects are sent over the Socket connection. Computing & Information Sciences Kansas State University
Robot <--> Environment Protocol Computing & Information Sciences Kansas State University
Viewer <--> Environment Protocol Computing & Information Sciences Kansas State University
Conclusions l Simulator is distributable because of the modularity l Modules communicate using protocols over a socket connection l Environment module is responsible for orchestrating the simulation and for modeling the virtual environment. Computing & Information Sciences Kansas State University
Future Work l There are three areas in the Environment module to improve: Network Map Reflection Computing & Information Sciences Kansas State University
Future Work – Network l Network is utilized for communications between modules l Enhancements: Optimize by reducing amount of communications Improve latency ð Fetch Robot commands in separate threads while previous commands are being evaluated Computing & Information Sciences Kansas State University
Future Work – Network-2 l Example Protocol: Computing & Information Sciences Kansas State University
Future Work – Map Component l Map Component in charge of modeling the virtual environment l Enhancements: Domain specific Map components ð What physics needs to be modeled? Collision Detection improvements ð Java 3 D ð Grid World (Change time into space) Distribute ð Can we distribute the maintenance of the virtual environment across multiple system? Compound objects (grouping) ð A robot might be made up of more than one geometric shape. Computing & Information Sciences Kansas State University
Future Work – Reflection l Java Reflection allows the dynamic loading of classes by name l Enhancements: Make all sensors and effectors loaded dynamically by name ð Allows us to add sensors and effectors without the need to modify the original code Different Maps (virtual environment maintainer) loadable by name ð Allows “pluggable” components Computing & Information Sciences Kansas State University
References l [1] The Official Project website, http: //www. cis. ksu. edu/~sdeloach/ai/projects/crsim. htm Computing & Information Sciences Kansas State University
Acknowledgements l Committee: Dr. De. Loach Dr. Gustafson Dr. Hsu l Teammates: Venkata Prashant Rapaka, Arun Prakash Ganesan, Esteban Guillen, and Aaron Chavez Computing & Information Sciences Kansas State University
Questions Computing & Information Sciences Kansas State University
- Slides: 23