This project introduces a web-based fossbot simulator developed using the open-source game engine Godot 3.5.2. It encompasses all methods in the fossbot interface, for which you can find more details here and introduces new features, like controlling multiple fossbots and dynamically creating levels from the client, providing an immersive platform. Communication relies on a Flask-SocketIO server I developed, using rooms. Additionally, Python and JavaScript libraries have been created for running the simulator.
For more details on the fossbot web simulator, please refer to this repository or the comprehensive wiki, in which I go in detail about the new Fossbot Web Simulator implementation and the JavaScript Library. Similarly, for additional insights into the fossbot Python library, you'll find a wealth of information in this wiki.
View the project on Google Summer of Code website.
You can see the detailed timeline here.
You can visit this gist that summarizes in a few words, the work which was done during the Google Summer of Code working period.
This project offers the capability to run and thoroughly test all functions of the fossbot (which can be found in the corresponding section of thiw wiki). Furthermore, it facilitates dynamic level creation using JSON messages available in the Python library. The process to test the simulator locally involves the following steps:
- Familiarize yourself with the web simulator documentation.
- Install the godot fossbot library and refer to its documentation.
- Launch the server by executing the command below (from the
exports
directory of current repository):
python3 server.py
- Open http://localhost:8000/godot or http://localhost:8000/godotcode in your web browser.
- Copy the session ID.
- Run the simulator using the fossbot godot library in Python (if connected to /godot) or directly from the browser (if connected to /godotcode).
One of the central challenges encountered during the project was the creation of the fossbot model from scratch. Although Godot does not inherently restrict vehicles to only four wheels, implementing a three-wheeled vehicle proved an intricate challenge. To ensure precise and realistic fossbot movements, I devised custom methods to adapt the model's center of gravity and exhaustively tested various options for optimal results.
Additionally, crafting accurate representations of each robotic component (like the ultrasonic sensor, line sensor and light sensor) for the fossbot from scratch posed another significant challenge. I meticulously matched these virtual parts to their real-world counterparts, aiming for authenticity and flawless functionality within the simulation.
Addressing the complexities of the socketio server presented another hurdle. To ensure seamless message routing without message conflicts in multiple fossbot scenarios, I conceived a message distributor within the simulation, effectively utilizing socketio's capabilities.
Furthermore, devising a dynamic level generation process encompassing obstacles, terrain, and image integration onto the floor also demanded innovative problem-solving techniques.
- Fossbot Model Implementation
- Robotic Component Integration in Godot
- Multiple Fossbot Message Routing Mechanism
- Advanced Level Generation System
- Flask-Socketio Server Development
- Web Simulator Frontend Design
- Expansion of fossbot's source library
- Development of JavaScript Library for Fossbot
- Comprehensive Usage Documentation
There are still opportunities for further enhancement of the Fossbot Web Simulator. I am confident that, with the combined efforts of the Open Source community, this goal can be achieved. Feel free, to contribute and participate on this project, any suggestions and improvements are welcome.
Some thoughts for future work:
- Enhance Fossbot Model in Godot
- Refine Terrain Generation
- Diversify Preset Client Levels
- Extend JavaScript Library
- Extend Python Godot Library for AI Training