Alles verbessert
This commit is contained in:
+146
-26
@@ -1,34 +1,154 @@
|
||||
# ExoMy - Software Repository
|
||||
This repository contains the software to run Exomy. The [wiki](https://github.com/esa-prl/ExoMy/wiki) explains you how to use it.
|
||||
# ExoMy CUNO — Software
|
||||
|
||||

|
||||
ExoMy Mars-Rover auf Basis eines Raspberry Pi mit ROS1 Melodic, betrieben vollständig in einem Docker-Container.
|
||||
|
||||
# ExoMy Project Structure
|
||||
---
|
||||
|
||||
### [Website](https://esa-prl.github.io/ExoMy/)
|
||||
There is a website about ExoMy. It does not help you build it, but is still nice to look at.
|
||||
## Zugang zum Raspberry Pi
|
||||
|
||||
### [Wiki](https://github.com/esa-prl/ExoMy/wiki)
|
||||
The [wiki](https://github.com/esa-prl/ExoMy/wiki) contains step by step instructions on how the 3D-printed rover ExoMy can be built, controlled and customized.
|
||||
| | |
|
||||
|---|---|
|
||||
| **Hostname** | `cuno` |
|
||||
| **Benutzer** | `pi` |
|
||||
| **LAN-IP** | `192.168.1.83` |
|
||||
| **WLAN-IP** | `192.168.1.9` (bevorzugt) |
|
||||
| **Fallback-AP** | SSID `CUNO`, IP `192.168.50.1`, Passwort `astr0cun042` |
|
||||
|
||||
### [Documentation Repository](https://github.com/esa-prl/ExoMy)
|
||||
This repository contains all the files of the documentation of ExoMy. Just click on [*Releases*](https://github.com/esa-prl/ExoMy/releases) and download the files of the latest release. They are explained further in the [wiki](https://github.com/esa-prl/ExoMy/wiki).
|
||||
```bash
|
||||
ssh pi@192.168.1.9
|
||||
```
|
||||
|
||||
### Social Media
|
||||
<!-- Add icon library -->
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.1/css/all.css">
|
||||
---
|
||||
|
||||
<!-- Add font awesome icons -->
|
||||
<p>
|
||||
<img src="https://github.com/esa-prl/ExoMy/wiki/images/social_media_icons/discord-brands.svg" width="20px">
|
||||
<a href="https://discord.gg/gZk62gg"> Join the Community!</a>
|
||||
</p>
|
||||
<p>
|
||||
<img src="https://github.com/esa-prl/ExoMy/wiki/images/social_media_icons/twitter-square-brands.svg" width="20px">
|
||||
<a href="https://twitter.com/exomy_rover"> @ExoMy_Rover</a>
|
||||
</p>
|
||||
<p>
|
||||
<img src="https://github.com/esa-prl/ExoMy/wiki/images/social_media_icons/instagram-square-brands.svg" width="20px">
|
||||
<a href="https://www.instagram.com/exomy_rover/"> @ExoMy_Rover</a>
|
||||
</p>
|
||||
## Architektur
|
||||
|
||||
```
|
||||
Web-GUI (Port 8000)
|
||||
│ WebSocket (Port 9090)
|
||||
▼
|
||||
rosbridge_websocket ──► /joy ──► joystick_parser_node ──► /rover_command
|
||||
│
|
||||
f710_joy_node ──────────────────────────────────────────────────┘
|
||||
(Logitech F710, /dev/input/js0)
|
||||
|
||||
/rover_command ──► robot_node ──► /motor_commands ──► motor_node ──► PCA9685 PWM ──► Motoren
|
||||
```
|
||||
|
||||
**Software auf dem Pi:** `/home/pi/ExoMy_Software/`
|
||||
**ROS-Workspace im Container:** `/root/exomy_ws/src/exomy/`
|
||||
|
||||
---
|
||||
|
||||
## Systemd-Services auf dem Pi
|
||||
|
||||
| Service | Beschreibung |
|
||||
|---|---|
|
||||
| `exomy-admin-api.service` | Admin-API (`exomy_admin_api.py`) |
|
||||
| `exomy-camera-stream.service` | MJPEG Kamera-Stream |
|
||||
| `exomy-wifi-fallback.service` | WLAN-Fallback auf eigenen Access Point |
|
||||
|
||||
```bash
|
||||
# Status prüfen
|
||||
systemctl status exomy-admin-api.service
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Docker-Container
|
||||
|
||||
Der Container `exomy_autostart` (Image: `exomy`) startet automatisch beim Booten.
|
||||
|
||||
```bash
|
||||
# Status
|
||||
docker ps
|
||||
|
||||
# Logs
|
||||
docker logs exomy_autostart --tail=50
|
||||
|
||||
# Shell im Container
|
||||
docker exec -it exomy_autostart bash
|
||||
```
|
||||
|
||||
### ROS-Nodes im Container
|
||||
|
||||
| Node | Beschreibung |
|
||||
|---|---|
|
||||
| `f710_joy_node.py` | Liest Logitech F710 von `/dev/input/js0`, publiziert auf `/joy` mit 20 Hz — **auch wenn der Joystick in Ruhe liegt** |
|
||||
| `joystick_parser_node.py` | Konvertiert `/joy` → `/rover_command`; priorisiert Web-GUI über physischen Controller |
|
||||
| `robot_node.py` | Berechnet Lenkwinkel und Geschwindigkeiten aus `/rover_command` |
|
||||
| `motor_node.py` | Setzt PWM-Werte über PCA9685; Watchdog stoppt Motoren nach 5 s ohne Befehl |
|
||||
| `rosbridge_websocket` | WebSocket-Bridge für die Web-GUI (Port 9090) |
|
||||
| `rosapi_node` | ROS-API für die Web-GUI |
|
||||
|
||||
### Ports
|
||||
|
||||
| Port | Verwendung |
|
||||
|---|---|
|
||||
| `8000` | Web-GUI |
|
||||
| `9090` | ROSBridge WebSocket |
|
||||
| `8082` | Admin-API |
|
||||
|
||||
---
|
||||
|
||||
## Deploy-Workflow
|
||||
|
||||
Dateien lokal bearbeiten, dann auf den Pi und in den laufenden Container übertragen:
|
||||
|
||||
```bash
|
||||
# Datei auf den Pi kopieren
|
||||
scp ExoMy_Software-master/src/meine_datei.py pi@192.168.1.9:/home/pi/ExoMy_Software/src/
|
||||
|
||||
# In den Container kopieren
|
||||
ssh pi@192.168.1.9 "docker cp /home/pi/ExoMy_Software/src/meine_datei.py exomy_autostart:/root/exomy_ws/src/exomy/src/"
|
||||
|
||||
# Container neu starten
|
||||
ssh pi@192.168.1.9 "docker restart exomy_autostart"
|
||||
```
|
||||
|
||||
GUI-Dateien:
|
||||
|
||||
```bash
|
||||
scp ExoMy_Software-master/gui/index.html pi@192.168.1.9:/home/pi/ExoMy_Software/gui/
|
||||
ssh pi@192.168.1.9 "docker cp /home/pi/ExoMy_Software/gui/index.html exomy_autostart:/root/exomy_ws/src/exomy/gui/"
|
||||
# Kein Neustart nötig — Browser-Reload genügt
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Bekannte Probleme & Fixes
|
||||
|
||||
### Web-GUI: Ruckartige Bewegung bei angeschlossenem Controller
|
||||
|
||||
**Problem:** Der `f710_joy_node` sendet permanent mit 20 Hz auf `/joy`, auch wenn der Logitech F710 in Ruhe liegt (Nullwerte). Wenn die Web-GUI gleichzeitig steuert, wechseln sich Fahr- und Stopp-Befehle im 50-ms-Takt ab — der Rover bewegt sich ruckartig.
|
||||
|
||||
**Fix:** `joystick_parser_node.py` ignoriert Nachrichten des physischen Controllers für 2 Sekunden, sobald eine Web-GUI-Nachricht eintrifft (erkennbar an `frame_id == "webgui"`). Danach übernimmt der physische Controller automatisch wieder.
|
||||
|
||||
### SyntaxError in rover.py (Point-Turn-Modus)
|
||||
|
||||
**Problem:** Überzählige schließende Klammer in `rover.py` Zeile 157 ließ `robot_node.py` beim Start abstürzen — der Rover war nicht steuerbar.
|
||||
|
||||
```python
|
||||
# Falsch:
|
||||
math.atan((self.wheel_rx + self.wheel_fx) / self.wheel_ry)))
|
||||
# Richtig:
|
||||
math.atan((self.wheel_rx + self.wheel_fx) / self.wheel_ry))
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Fahrmodi
|
||||
|
||||
| Modus | Taste (Controller) | Taste (Web-GUI) |
|
||||
|---|---|---|
|
||||
| Ackermann | A | Schaltfläche „Ackermann" |
|
||||
| Point Turn (Drehen auf der Stelle) | X | Schaltfläche „Turn on Point" |
|
||||
| Crab (Seitwärtsfahrt) | Y | Schaltfläche „Crab" |
|
||||
| Motoren ein/aus | START | Schaltfläche „Motoren" |
|
||||
|
||||
---
|
||||
|
||||
## Originales ESA-Projekt
|
||||
|
||||
- [Wiki](https://github.com/esa-prl/ExoMy/wiki) — Bauanleitung und Dokumentation
|
||||
- [Website](https://esa-prl.github.io/ExoMy/)
|
||||
- [Dokumentations-Repository](https://github.com/esa-prl/ExoMy)
|
||||
|
||||
Reference in New Issue
Block a user