|
|
---
|
|
---
|
|
|
title: Crash Detection
|
|
title: Crash Detection
|
|
|
---
|
|
---
|
|
|
|
This project focuses on the **preventive detection of crashes**. Using data extracted from ROS, *time-to-collision* (TTC), *distance-to-collision* (DTC), and a driving corridor are calculated to prevent crashes. Depth data is obtained from the ZED2 camera to calculate the distance to the nearest obstacle. The speed is measured using the rate of change in distance over time ($\Delta \text{Distance} / \Delta \text{Time}$). This method was chosen because no other means of detecting driving speed was available.
|
|
|
|
|
|
|
|
Dieses Projekt befasst sich mit der präventiven Erkennung von Crashes. Mit den aus ROS entnommenen Daten werden ttc dtc und ein Fahrschlauch berechnet, um ein Crash zu verhindern. Hierfür werden aus der ZED2 Kamera Tiefendaten entnommen und die Distanz zum nächsten Hindernis berechnet. Mit der zeitlichen Änderung wird die Geschwindigkeit gemessen (Δ Distanz / Δ Zeit). Dies wurde genommen, da keine andere Möglichkeit für die Erkennung der Fahrgeschwindigkeit bestand.
|
|
The driving corridor has not yet been integrated. The logic here is to consider only specific areas in the image with depth data, depending on the vehicle's steering. Later, adjustments will be made so that, at greater distances, the y-values of the ROI (*region of interest*) change (minimum increases, and maximum decreases).
|
|
|
Der Fahrschlauch konnte noch nicht eingebunden werden. Hier ist die Logik aber, je nach Lenkung des Fahrzeugs, nur bestimmte Bereiche im Bild mit Tiefendaten zu beachten. Später kommt dann noch hinzu, dass bei größerer Entfernung sich die y-Werte des ROI (region of interest) verändern (minima wird größer und maxima wird kleiner).
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
#### **Important Data for Working on the Project:**
|
|
|
|
- Maximum steering angle: 53°
|
|
|
|
- Maximum steering value (ROS): 90 per direction (0–180 total)
|
|
|
|
- Straight ahead: 0° → ~87
|
|
|
|
- Right: 53° → 180
|
|
|
|
- Left: 53° → 0
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
#### Wichtige Daten für das Arbeiten im Projekt:
|
|
#### **ROS Commands (Console/Terminal):**
|
|
|
- maximaler Einschlagwinkel: 53°
|
|
- Publish command: `rostopic pub <rostopic> <Topic-type> <Value>`
|
|
|
- maximaler Lenkwert (ROS): 90 pro Richtung (0-180 gesamt)
|
|
- Example: `rostopic pub /ctrlcmd_steering std_msgs/Int16 87`
|
|
|
- Geradeaus: 0° —> ~87
|
|
- Subscribe command: `rostopic echo <rostopic>`
|
|
|
- Rechts: 53° —> 180
|
|
- Example: `rostopic echo /ctrlcmd_steering`
|
|
|
- Links: 53° —> 0
|
|
|
|
|
|
|
|
|
|
#### ROS-Befehle (Konsole/Terminal):
|
|
Git Repository: [https://git.th-wildau.de/yuso4249/CrashDetection](https://git.th-wildau.de/yuso4249/CrashDetection)
|
|
|
- Pub Befehl: `rostopic pub <rostopic> <Topic-type> <Value>` <br>
|
|
|
|
|
- Beispiel: `rostopic pub /ctrlcmd_steering std_msgs/Int16 87` <br>
|
|
|
|
|
- Sub Befehl: `rostopic echo <rostopic>` <br>
|
|
|
|
|
- Beispiel: `rostopic echo /ctrlcmd_steering`
|
|
|
|
|
|
|
|
|
|
Git-Repository: [https://git.th-wildau.de/yuso4249/CrashDetection](https://git.th-wildau.de/yuso4249/CrashDetection)
|
|
---
|
|
|
|
|
|
|
|
#### **Information:**
|
|
|
|
- The imported libraries do not need to be installed on the local device since the file is only executed on the Nvidia Jetson, which already contains all necessary packages.
|
|
|
|
- The easiest way to deploy the code onto a vehicle is by pulling it via Git directly onto the vehicle.
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
Infos:
|
|
#### **Challenges:**
|
|
|
- Die importierten Bibliotheken müssen nicht auf dem lokalen Gerät installiert sein, da die Datei nur auf dem Nvidiajetson ausgeführt wird und dieser alle Pakete schon vorhanden hat.
|
|
|
|
|
- Der einfachste Weg den Code auf ein Fahrzeug zu deployen ist, diesen über git aufs das Fahrzeug zu pullen.
|
|
|
|
|
#### Herausforderungen:
|
|
|
|
|
|
|
|
|
|
1. Die Tiefendaten der ZED2 Kamera sind nicht immer exakt, wodurch die Distanz und auch die Geschwindigkeit nicht immer exakt berechnet werden können. Das topic /ctrlcmd_motor gibt leider auch keinen Auscchluss über die Geschwindigkeit.
|
|
1. The depth data from the ZED2 camera is not always accurate, which means that both distance and speed cannot always be calculated precisely. Unfortunately, the topic `/ctrlcmd_motor` does not provide any indication of speed either.
|
|
|
2. Die ROS-topics publishen eine Änderung nur einmal. Das Programm wird gestartet nachdem ROS gestartet wurde. Dadurch kann das Programm nicht wissen, ob der /ctrlcmd_motorFAS auf 0 oder auf 1 ist. Deshalb muss für die Anwendung entschieden werden, ob das Fahrzeug selbst mit der Fernbedienung gefahren werden soll, oder durch ein Programm.
|
|
2. ROS topics only publish a change once. The program starts after ROS has been launched. As a result, the program cannot determine whether `/ctrlcmd_motorFAS` is set to 0 or 1. Therefore, it must be decided whether the vehicle will be driven manually via remote control or autonomously by a program.
|
|
|
3. Die Anwendung sollte bei einer Gefahrenstufe 2 (Geschwindigkeit \*1,5 \>= Distanz und Geschw. \> 0 ) das Fahrzeug runterbremsen. Das Motor-topic bekommt aber keine Werte gepublished, wenn das Fahrzeug manuell durch eine Fernbedienung gefahren wird. --\> Bremsung nicht wirklich machbar, da Ausgangswert für den Motor benötigt wird.
|
|
3. The application should decelerate the vehicle at **ttc level 2** (when $\text{Speed} \times 1.5 \geq \text{Distance}$ and $\text{Speed} > 0$). However, when manually controlled via remote control, no values are published to the motor topic, making deceleration impractical as an output value for the motor is required.
|
|
|
4. Das Fahrzeug fährt nicht wirklich schnell, und in Verbindung mit den nicht exakten Distanz- und Geschwindigkeitswerten ist es schwierig in einen kritischen Bereich für die Gefahrenmeldung zu gelangen. |
|
4. The vehicle does not drive very fast, and combined with imprecise distance and speed values, it is difficult to reach a critical range for crash detection. |
|
\ No newline at end of file |
|
|