Skip to content
Snippets Groups Projects
architektur.tex 9.25 KiB
Newer Older
\documentclass[../mainDocument.tex]{subfiles}
\begin{document}
unknown's avatar
unknown committed
	\section{Architektur und Integrationstests}
	
	\subsection{Systemarchitektur}
	Abbildung \ref{fig:hardware-sys} zeigt welche Systemkomponenten in welcher Umgebung laufen und welche Kommunikationswege es zwischen den einzelnen Komponenten gibt. Zur Verf\"ugung steht uns ein Fahrzeug, welches ausger\"ustet ist mit einer Kamera, einem Ultraschallsensor, ein Motor, vier R\"ader, ein STM-Board und ein Odroid-Board.\\
	Auf dem STM-Board laufen die Treiber f\"ur die direkte Steuerung des Motors und der R\"ader. Die gesamte Software des STM-Boards von Assystem geliefert und unser Team muss sich lediglich darum k\"ummern die entsprechenden Befehle vom Odroid-Board an das STM-Board zu schicken.\\
	Auf dem Odroid-Board laufen die Module zum berechnen des Fahrverhaltens, sowie der Kommunikation mit anderen Fahrzeugen. Die Kamera und der Ultraschallsensor sind mit dem Odroid verbunden. Das Lanekeeping-Modul berechnet die Radstellung. Der Platoon-Controller k\"ummert sich um die Car2Car-Kommunikation. Das Cruise-Control-Modul berechnet die Geschwindigkeit. Die Environment bearbeitet die Kamera- und Sensordaten. Das Egomotion-Modell speichert alle berechneten Daten. Das Logging-Modul speichert alle aktuellen Daten. Weiterhin gibt es zwei Netzwerkschnittstellen, eins zur Kommunikation mit dem STM-Board und ein weiteres zur WLAN-Kommunikation.
	 
unknown's avatar
unknown committed
	\begin{landscape}
		\begin{figure}[h]
unknown's avatar
unknown committed
			\begin{center}
				\includegraphics[scale=0.5]{SystemArchitektur}
unknown's avatar
unknown committed
			\end{center}
			\caption{Systemarchitektur}
			\label{fig:hardware-sys}
unknown's avatar
unknown committed
		\end{figure}
	\end{landscape}
	
	\subsection{ODROID}
	\begin{landscape}
unknown's avatar
unknown committed
		\begin{figure}[h]
			\begin{center}
				\includegraphics[scale=0.45]{Odroid}
unknown's avatar
unknown committed
			\end{center}
			\caption{ODROID-System}
unknown's avatar
unknown committed
		\end{figure}
unknown's avatar
unknown committed
	\end{landscape}
	
	\subsection{Object Oriented Analysis}
unknown's avatar
unknown committed
	\begin{tikzpicture}
		\begin{umlpackage}{Car}
			\begin{umlpackage}{ODROID}
				%classes
				\umlclass[scale = 0.5]
					{MAV-Link}
					{
						- $v_{new}$ : Integer\\
						- $\alpha_{new}$ : Integer\\
						- $v_O$ : Interger\\
						- $\alpha_O$ : Integer\\
						- RC-State : Integer
					}
					{
						+ set($v_{new}$, $\alpha_{new}$)\\
						+ RequestNewState(RC-State)\\
						+ updateOwn() : (Integer, Integer)
					}
				\umlclass[scale = 0.5, xshift = -8cm]
					{Lane-Keeping}
					{
						- Image/Path : ?\\
						- $\alpha_{new}$ : Integer
					}
					{
						+ Lanekeeping() : ?
					}
				\umlclass[scale = 0.5, xshift = 8cm, yshift = -4cm]
					{Cruise-Control}
					{
						- $d_O$ : Integer\\
						- $v_P$ : Integer\\
						- $IPD$ : Integer\\
						- $PS$ : Integer\\
						- PlatoonState : Integer\\
						- $v_s$ : Integer\\
						- $d_s$ : Integer\\
						+ $v_{new}$ Integer
					}
					{
						- CACC($d_O, v_P, IPD, PS$) : Integer\\
						- ACC($d_O, v_P, v_s, d_s$) : Integer\\
						- calcNewOptimalDistance($v_s$) : Integer\\
						+ setNewSpeed($v_{new}$)
					} (CruiseControl)
				\umlclass[scale = 0.5, xshift = -5.5cm, yshift = -9cm]
					{Egomotion}
					{
						- $d_O$ : Integer\\
						- $v_O$ : Integer\\
						- $v_R$ : Integer\\
						- $v_P$ : Integer\\
						- $\alpha_O$ : Integer\\
						- Path : ?\\
						+ $\alpha_{new}$ : Integer\\
						+ $v_{new}$ : Integer\\
					}
					{
						- calc\_$v_P$($v_R$) : Integer\\
						%- getEnvironment() : (Integer, Integer)\\
						%- getMavLink() : (Integer, Integer)\\
						%- getCurseControl : Integer
					} (EgoMotion)
				\umlclass[scale = 0.5, xshift = 6.7cm, yshift = -14cm]
					{PlatoonController}
					{
						- $IPD$ : Integer\\
						- $PS$ : Integer\\
						- PlatoonState : ENUM\\
						- $v_s$ : Integer\\
						- $CarID$ : Integer\\
						- PlatoonMemberList : ?\\
						- PlatoonPos : Integer\\
						- PlatoonPrevID : ?\\
						+ WantsPlatoon : Boolean
					}
					{
						- evaluate\_PlatoonState(PlatoonState : Integer) : ?\\
						- determine\_LV\_IPD-PS() : (Integer, Integer)\\
						- handle\_PBM() : ?\\
						- handle\_PCM() : ?\\
						- handle\_PHM() : ?\\
						- send\_PBM() : ?\\
						- send\_PCM() : ?\\
						- send\_PHM() : ?
					}
				\umlclass[scale = 0.5, xshift = -9cm, yshift = -20cm]
					{Environment}
					{
						- USS-Data : Integer\\
						+ $d_O$ : Integer\\
						+ $v_R$ : Integer\\
						+ PlatoonPrevID : ?
					}
					{
						- calc\_$v_R$
					}
				\umlclass[scale = 0.5, xshift = -4cm, yshift = -23cm]
					{Logging}
					{
						+ $d_O$ : Integer\\
						+ $v_O$ : Integer\\
						+ $\alpha_O$ : Integer\\
						+ $v_R$ : Integer\\
						+ $v_P$ : Integer\\
						+ Path : ?\\
						+ $\alpha_{new}$ : Integer\\
						+ $v_{new}$ : Integer\\
						+ WantsPlatoon : Boolean\\
						+ UpdateReady : Boolean\\
						+ $IPD$ : Integer\\
						+ $PS$ : Integer\\
						+ PlatoonState : ENUM\\
						+ $v_s$ : Integer\\
						+ $CarID$ : Integer\\
						+ PlatoonMemberList : ?\\
						+ PlatoonPos : Integer\\
						+ PlatoonPrevID : Integer
					}
					{
						- cacheDate() : ?\\
						+ sendToPC(ALL)
					}
				\umlclass[scale = 0.5, xshift = -11.5cm, yshift = -25cm]
					{Camera}
					{}
					{}
				\umlclass[scale = 0.5, xshift = -11.2cm, yshift = -28cm]
					{Ultrasonic}
					{}
					{}
				\umlclass[scale = 0.5, xshift = 9.5cm, yshift = -25cm]
					{Network}
					{
						+ $IPD$ : Integer\\
						+ $PS$ : Integer
					}
					{
						+ send\_PBM()\\
						+ send\_PCM()\\
						+ send\_PHM()\\
						+ send\_PLM()\\
						+ handle\_PBM()\\
						+ handle\_PCM()\\
						+ handle\_PHM()\\
						+ handle\_PLM()\\
						+ Car2PC-MSGs.
					}
				
				%arrows
				\umlinherit	[geometry=-|,  anchors =   0 and 250]	{Camera}{Environment}
				\umlinherit	[geometry=|-,  anchors =  90 and 180]	{Camera}{Lane-Keeping}
				\umlinherit	[geometry=|-,  anchors =  90 and  25]	{Cruise-Control}{MAV-Link}
				\umlinherit	[geometry=|-,  anchors = 217 and  50]	{Cruise-Control}{Egomotion}
				\umlinherit	[geometry=|-,  anchors =  50 and 217]	{Egomotion}{Cruise-Control}
				\umlinherit	[geometry=|-,  anchors = -35 and 152]	{Egomotion}{PlatoonController}
				\umlinherit	[geometry=-|,  anchors = 115 and 300]	{Egomotion}{Lane-Keeping}
				\umlinherit	[geometry=-|]							{Egomotion}{Logging}
				\umlinherit	[geometry=|-|, anchors = 90 and 245]	{Environment}{Egomotion}
				\umlinherit	[geometry=--]							{Lane-Keeping}{MAV-Link}
				\umlinherit	[geometry=-|,  anchors = 300 and 115]	{Lane-Keeping}{Egomotion}
				\umlinherit	[geometry=|- , anchors = -55 and 222]	{Logging}{Network}
				\umlinherit	[geometry=|-|, anchors = 235 and  70]	{MAV-Link}{Egomotion}
				\umlinherit	[geometry=-|,  anchors = 180 and 270]	{Network}{MAV-Link}
				\umlinherit	[geometry=-|]							{PlatoonController}{Cruise-Control}
				\umlinherit	[geometry=|-,  anchors = 240 and  25]	{PlatoonController}{Logging}
				\umlinherit	[geometry=-|,  anchors = 300 and  85]	{PlatoonController}{Network}
				\umlinherit	[geometry=-|,  anchors =  85 and 300]	{Network}{PlatoonController}
				\umlinherit	[geometry=-|,  anchors =   0 and 290]	{Ultrasonic}{Environment}
			\end{umlpackage}
		\end{umlpackage}
unknown's avatar
unknown committed
	\end{tikzpicture}
	\caption{Object Oriented Analysis}
	\label{fig:ooa}
	\end{figure}
unknown's avatar
unknown committed
	
	\subsection{Softwarearchitektur}
	\begin{landscape}
	\begin{figure}[h]
			\begin{center}
				%\includegraphics[width=\textwidth]{SoftwareArchitektur} %photo
				\includegraphics[scale=0.45]{sw_architektur} % some elements missing/ not recognizable
			\end{center}
			\caption{Softwarearchitektur}
			\label{fig:sw-arch}
		\end{figure}
	
unknown's avatar
unknown committed
	%uml-tikz stub TODO
	\begin{comment}
	\begin{tikzpicture}
		\begin{umlpackage}{Softwarearchitektur}
				%classes
				\umlclass[scale = 0.5, xshift = 8cm]
					{MAV-Link}
					{}
					{}
				\umlclass[scale = 0.5, xshift = 8cm, yshift = -4cm]
					{Lane-Keeping}
					{}
					{}
				\umlclass[scale = 0.5, xshift = 8cm, yshift = -8cm]
					{Kamera}
					{}
					{}
				\umlclass[scale = 0.5, xshift = 8cm, yshift = -12cm]
					{USS}
					{USS-Daten}
					{}
				%network
				\umlclass[scale = 0.5, xshift = -8cm]
					{C2C}
					{
						IPD, PS
					}
					{
						nach PC\\
						nP, NULL\\
						nP(FV)\\
						nP(LV)\\
						FV\\
						LV
					}
				\umlclass[scale = 0.5, xshift = -4cm]
					{PC2}
					{
					
					}
					{
						handle IPD aus
					}
				\umlclass[scale = 0.5]
					{Logging}
					{
					
					}
					{
					
					}
				\umlclass[scale = 0.5, yshift = -4cm]
					{Egomotion}
					{
						$v_p = v_0 + v_p$\\
						$d_0$
					}
					{
					
					} (EgoMotion)
				\umlclass[scale = 0.5, xshift = -6cm, yshift = -8cm]
					{PlatoonController}
					{
						IPD, PS, $d_0$, PlatSt, $v_s$
					}
					{
						noPlatoon:\\
						-wantsPlatoon\\
						- FV/LV\\
						- C2C initialisieren\\
						- IPD, PS bestimmen\\
						- $v_s$ weiterreichen\\
						- ACC fahren\\
						FV:\\
						- CACC fahren\\
						- leaveMsg\\
						LV:\\
						- ACC fahren\\
						- leaveMsg\\
						- IPD/PS update ($v_{new}$ vs. $v_{PC}$)
					}
				%Stuff: Pub $v_{new}$, Notify, für CC: PlatoonStat, IPD, PS, $v_s$
unknown's avatar
unknown committed
				\umlclass[scale = 0.5, yshift = -8cm]
					{CruiseControl}
					{
					
					}
					{
					
					}
				\umlclass[scale = 0.5, xshift = 4cm, yshift = -12cm]
					{Environment}
					{
						$d_0, v_r$
					}
					{
					
					}
				
				%arrows
				%\umlinherit	[geometry=-| ,anchors=   0 and 250]	{src}{dest}
			\end{umlpackage}
		\end{tikzpicture}
	\end{comment}
\end{document}