Update README.md

This commit is contained in:
Thomas BONNIER 2025-04-28 14:43:58 +02:00
parent 98a669957d
commit 56751858da
1 changed files with 107 additions and 1 deletions

108
README.md
View File

@ -1 +1,107 @@
This is the README for the EU_Robot of Group D.
# Robot SLAM Simulation with Sensor Crosstalk Management
This project simulates a robot equipped with **Ultrasound** and **IR** sensors navigating a 2D environment, performing **SLAM** (Simultaneous Localization and Mapping), managing **dynamic crosstalk**, and building an **occupancy grid map** in real-time, with optional **GUI visualization**.
## 📦 Installation (Linux)
### 1. Set up a Python virtual environment
```bash
python3 -m venv slam_env
source slam_env/bin/activate
```
### 2. Install required Python libraries
```bash
pip install numpy matplotlib PyQt5 scikit-learn pytmx
```
### 3. Install GTSAM manually from GitHub
Follow the official GTSAM installation guide:
https://github.com/borglab/gtsam
Summary of typical steps:
```bash
sudo apt-get install cmake libboost-all-dev libtbb-dev libeigen3-dev
git clone https://github.com/borglab/gtsam.git
cd gtsam
mkdir build && cd build
cmake ..
make -j$(nproc)
sudo make install
```
Then, install Python bindings:
```bash
cd ../python
mkdir build && cd build
cmake ..
make -j$(nproc)
sudo make install
```
If needed, update your PYTHONPATH:
```bash
export PYTHONPATH=/usr/local/lib/python3.x/dist-packages:$PYTHONPATH
```
Replace `python3.x` with your installed version.
## 🚀 Usage
### Run the simulation in GUI mode
```bash
python your_script.py
```
or explicitly:
```bash
python your_script.py --gui
```
### Run the simulation in headless (non-GUI) mode
```bash
python your_script.py --no-gui
```
### Load a custom environment from a Tiled map
```bash
python your_script.py --tiled_map your_map.tmx
```
### Controls (in GUI mode)
| Key | Action |
|-------------|-----------------------|
| `Z` | Move forward |
| `S` | Move backward |
| `Q` | Turn left |
| `D` | Turn right |
| `X` | Stop movement |
| `SPACE` | Pause / Resume |
| `ESC` | Save sensor layout |
When closing the GUI, the following files are automatically saved:
- `map.pkl` → Occupancy grid as a pickle file
- `map.png` → Occupancy grid image
## 🔧 Project Structure
| File/Folder | Description |
|:--------------|:-------------------------------------------|
| Sensor, MotionModel, SLAMEngine, etc. | Core simulation classes |
| SensorLayoutEditor | GUI editor for live sensor placement |
| Visualizer | 2D occupancy grid visualization |
| Environment | Wall and obstacle management (including Tiled map support) |
| OccupancyGrid, CoverageAnalyzer | Mapping and blind spot detection |
| main() | Entry point for launching GUI or headless simulation |