diff --git a/doc/logBuch.md b/doc/logBuch.md index 8bf120d687524e04daf07e7868ca893efaed65d3..cb5eceb714553d1baff7c7bfa04f9c5ee05a8c2f 100644 --- a/doc/logBuch.md +++ b/doc/logBuch.md @@ -109,4 +109,14 @@ Mo. 05.02. (Schlingloff) Mo. 12.02. (Schlingloff) ---------------------------------------------------------------- -- \ No newline at end of file +- 14/8 LiPo-Akkus, ODROIDS, Shifter sind geliefert worden +- Besprechung zukünftiger Termine: + - 04.04. (deadline) Kommunikationstest + - 16.04. 10.00 Interaktionstest + - 16.04. 10.00 Planung der Vorführung + - 18.05. 13.00 Generalprobe + - 22.05. Endtermin + +XX. XX.XX. (Schlingloff) +---------------------------------------------------------------- +- \ No newline at end of file diff --git a/modules/CACC/.gitignore b/doc/modules/cruiseControl/.gitignore similarity index 100% rename from modules/CACC/.gitignore rename to doc/modules/cruiseControl/.gitignore diff --git a/modules/CACC/CACC-Module-Test.py b/doc/modules/cruiseControl/CACC-Module-Test.py similarity index 100% rename from modules/CACC/CACC-Module-Test.py rename to doc/modules/cruiseControl/CACC-Module-Test.py diff --git a/modules/CACC/car.py b/doc/modules/cruiseControl/car.py similarity index 100% rename from modules/CACC/car.py rename to doc/modules/cruiseControl/car.py diff --git a/modules/CACC/moduleCACC.tex b/doc/modules/cruiseControl/docCACC-content.tex similarity index 58% rename from modules/CACC/moduleCACC.tex rename to doc/modules/cruiseControl/docCACC-content.tex index 559a5f7fd0840236dfecdf100d35e96ed009d23e..02bf4ac52d39011fa05a97e2a205ecc6cf3dde0b 100644 --- a/modules/CACC/moduleCACC.tex +++ b/doc/modules/cruiseControl/docCACC-content.tex @@ -1,91 +1,10 @@ -\documentclass[fleqn,a4paper,12pt]{article} -\usepackage{geometry} -\geometry{left=30mm, right=40mm, bottom=30mm} -\usepackage[german]{babel} -\usepackage[utf8]{inputenc} %Für Umlaute - -\usepackage{amsmath} % Mathematische Symbole -\usepackage{amssymb} % Nochmehr mathematische Symbole -\usepackage{stmaryrd} % Für die [[ ]] Klammern (\llbracket, \rrbracket) -\usepackage{dsfont} % Schriftsatz fuer Zahlenmengensymbole -%\usepackage{verbatim} % erweiterte Verbatim-Umgebung -\usepackage{alltt} % Quasi-Verbatim-Umgebung -\usepackage{fancyhdr} % Eigene Kopfzeilen -\usepackage{graphics} % Zum Einbinden von Grafiken -\usepackage{tikz} % Zur Erstellung von Graphen -\usepackage{listings} % Pseudo-Code Formatierung -% Einbinden einer eps-Grafik geht so: includegraphics{path} - -% Seitenraender -\addtolength{\voffset}{-2cm} -\addtolength{\textheight}{0cm} -\addtolength{\hoffset}{0cm} -\addtolength{\textwidth}{2cm} -%\addtolength{\headheight}{2cm} % fuer jeden Strichkode einen Zentimeter - -% Skalierung der Grafiken -\setlength{\unitlength}{1cm} - -\pagestyle{fancy} % Eigene Kopfzeilen verwenden -\frenchspacing % Kein Extrafreiraum nach Satzzeichen -\setlength{\parindent}{0pt} % Neue Absaetze nicht einruecken -%\sloppy % Schlampige Absatzformatierung -\fussy % Penible Absatzformatierung -\linespread{1.5} % Zeilenabstand - -%tikz-definition -\tikzstyle{rec} = [minimum width=1cm, minimum height=0.8cm, align = left,text centered, draw=black] - -%andere Definitionen -\newcommand{\R}{{\mathbb R}} -\newcommand{\N}{{\mathbb N}} -\newcommand{\Z}{{\mathbb Z}} -\newcommand{\Q}{{\mathbb Q}} -\newcommand{\C}{{\mathbb C}} -\newcommand{\F}{\mathcal{F}} -\newcommand{\less}{\setminus} -\newcommand{\inv}{{}^{-1}} -\newcommand{\Land}{\bigwedge} -\newcommand{\Lor}{\bigvee} - -% Kopfzeile -%\lhead{} -%\rhead{} -\lstset{ % - %backgroundcolor=\color{}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument - basicstyle=\footnotesize, % the size of the fonts that are used for the code - breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace - breaklines=true, % sets automatic line breaking - captionpos=b, % sets the caption-position to bottom - %commentstyle=\color{mygreen}, % comment style - %deletekeywords={...}, % if you want to delete keywords from the given language - escapeinside={\%*}{*)}, % if you want to add LaTeX within your code - extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 - %frame=single, % adds a frame around the code - keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) - keywordstyle=\color{blue}, % keyword style - language=Python, % the language of the code - %morekeywords={*,...}, % if you want to add more keywords to the set - numbers=left, % where to put the line-numbers; possible values are (none, left, right) - numbersep=5pt, % how far the line-numbers are from the code - numberstyle=\tiny,%\color{mygray}, % the style that is used for the line-numbers - %rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) - showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' - showstringspaces=false, % underline spaces within strings only - showtabs=false, % show tabs within strings adding particular underscores - stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered - stringstyle=\color{mymauve}, % string literal style - tabsize=2, % sets default tabsize to 2 spaces - title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title -} -\begin{document} - \section{CACC-Modul} - \subsection{Problembeschreibung und Einordnung} +\subsection{CACC-Modul} + \subsubsection{Problembeschreibung und Einordnung} Das \textit{CACC}-Modul (Cooperativ adaptive curse controll) hat die Aufgabe dem eigenen Fahrzeug (eFZ) aus seinen aktuellen Daten und den Platoon-Daten eine neue Geschwindigkeit zu ermitteln, die das eFZ anstrebt um die gegebenen IPD und PS herzustellen und um Ziehharmonika-Effekte und Kollisionen zu vermeiden. Dafür stehen dem eFZ alle fahrzeuginternen sowie die Platoon-Daten IPD und PS zur Verfügung.\\ Die ermittelte Geschwindigkeit wird dann an den einen Controller weiter gegeben, der diese stetig auf den Motor umsetzt.\\ \\ \textit{Versuchsaufbau}\\ - \subsection{Ansätze und Herausforderungen} + \subsubsection{Ansätze und Herausforderungen} Dazu gab es direkt 2 Ansätze. Der erste ist eine 2-State-Machine, die abwechselnd zwischen \textit{IPD herstellen} und \textit{PS herstellen} schaltet.\\ \\ \textit{State-Machine}\\ @@ -124,7 +43,7 @@ while (True): \end{align*} Damit lässt sich $v_o^\prime = f(v_o, d_o, v_p, d_{IPD}, v_{PS})$ darstellen. - \subsection{Lösung} + \subsubsection{Lösung} Zunächst betrachtet man folgende 3 Ungleichungen \begin{align*} d_{IPD} - tol(IPD)\le &d_o \le d_{IPD} + tol(IPD)\\ @@ -154,12 +73,6 @@ while (True): \\ Also lässt $v_o^\prime = f(v_o, d_o, v_p, d_{IPD}, v_{PS}) = g(d_o, v_p, d_{IPD}, v_{PS})$ ausdrücken, da die optimale Geschwindigkeit, nicht von der $v_o$ abhängt oder abhängen muss, da der nach geschaltete Controller eigenständig von der aktuellen Geschwindigkeit $v_o$ auf $v_o^\prime$ reguliert. - \subsection{Validierung} + \subsubsection{Validierung} - \subsection{Implementierung} - - -\end{document} - - - + \subsubsection{Implementierung} diff --git a/doc/modules/cruiseControl/docCACC-standalone.tex b/doc/modules/cruiseControl/docCACC-standalone.tex new file mode 100644 index 0000000000000000000000000000000000000000..8467d82b10281bd52c2a9f4215361bfa9dddfe54 --- /dev/null +++ b/doc/modules/cruiseControl/docCACC-standalone.tex @@ -0,0 +1,74 @@ +\documentclass[fleqn,a4paper,12pt]{article} +\usepackage{geometry} +\geometry{left=30mm, right=40mm, bottom=30mm} +\usepackage[german]{babel} +\usepackage[utf8]{inputenc} %Für Umlaute + +\usepackage{amsmath} % Mathematische Symbole +\usepackage{amssymb} % Nochmehr mathematische Symbole +\usepackage{stmaryrd} % Für die [[ ]] Klammern (\llbracket, \rrbracket) +\usepackage{dsfont} % Schriftsatz fuer Zahlenmengensymbole +%\usepackage{verbatim} % erweiterte Verbatim-Umgebung +\usepackage{alltt} % Quasi-Verbatim-Umgebung +\usepackage{fancyhdr} % Eigene Kopfzeilen +\usepackage{graphics} % Zum Einbinden von Grafiken +\usepackage{tikz} % Zur Erstellung von Graphen +\usepackage{listings} % Pseudo-Code Formatierung +% Einbinden einer eps-Grafik geht so: includegraphics{path} + +% Seitenraender +\addtolength{\voffset}{-2cm} +\addtolength{\textheight}{0cm} +\addtolength{\hoffset}{0cm} +\addtolength{\textwidth}{2cm} +%\addtolength{\headheight}{2cm} % fuer jeden Strichkode einen Zentimeter + +% Skalierung der Grafiken +\setlength{\unitlength}{1cm} + +\pagestyle{fancy} % Eigene Kopfzeilen verwenden +\frenchspacing % Kein Extrafreiraum nach Satzzeichen +\setlength{\parindent}{0pt} % Neue Absaetze nicht einruecken +%\sloppy % Schlampige Absatzformatierung +\fussy % Penible Absatzformatierung +\linespread{1.5} % Zeilenabstand + +%tikz-definition +\tikzstyle{rec} = [minimum width=1cm, minimum height=0.8cm, align = left,text centered, draw=black] + +% Kopfzeile +%\lhead{} +%\rhead{} +\lstset{ % + %backgroundcolor=\color{}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument + basicstyle=\footnotesize, % the size of the fonts that are used for the code + breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace + breaklines=true, % sets automatic line breaking + captionpos=b, % sets the caption-position to bottom + %commentstyle=\color{mygreen}, % comment style + %deletekeywords={...}, % if you want to delete keywords from the given language + escapeinside={\%*}{*)}, % if you want to add LaTeX within your code + extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 + %frame=single, % adds a frame around the code + keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) + keywordstyle=\color{blue}, % keyword style + language=Python, % the language of the code + %morekeywords={*,...}, % if you want to add more keywords to the set + numbers=left, % where to put the line-numbers; possible values are (none, left, right) + numbersep=5pt, % how far the line-numbers are from the code + numberstyle=\tiny,%\color{mygray}, % the style that is used for the line-numbers + %rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) + showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' + showstringspaces=false, % underline spaces within strings only + showtabs=false, % show tabs within strings adding particular underscores + stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered + stringstyle=\color{mymauve}, % string literal style + tabsize=2, % sets default tabsize to 2 spaces + title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title +} +\begin{document} + \input{docCACC-content.tex} +\end{document} + + + diff --git a/modules/CACC/kalmanfilter.py b/doc/modules/cruiseControl/kalmanfilter.py similarity index 100% rename from modules/CACC/kalmanfilter.py rename to doc/modules/cruiseControl/kalmanfilter.py diff --git a/modules/CACC/simlifiedSpeedVisualization.py b/doc/modules/cruiseControl/simlifiedSpeedVisualization.py similarity index 100% rename from modules/CACC/simlifiedSpeedVisualization.py rename to doc/modules/cruiseControl/simlifiedSpeedVisualization.py diff --git a/doc/modules/environment/docEnvironment-content.tex b/doc/modules/environment/docEnvironment-content.tex new file mode 100644 index 0000000000000000000000000000000000000000..eb7ef2e37f53592355425158bda4675e989f1c91 --- /dev/null +++ b/doc/modules/environment/docEnvironment-content.tex @@ -0,0 +1,10 @@ +\subsection{Environment-Modul} + \subsubsection{Problembeschreibung und Einordnung} + + \subsubsection{Ansätze und Herausforderungen} + + \subsubsection{Lösung} + + \subsubsection{Validierung} + + \subsubsection{Implementierung} diff --git a/doc/modules/environment/docEnvironment-standalone.tex b/doc/modules/environment/docEnvironment-standalone.tex new file mode 100644 index 0000000000000000000000000000000000000000..33aa438f7408f0a91c4aec09bca1d61b3442a097 --- /dev/null +++ b/doc/modules/environment/docEnvironment-standalone.tex @@ -0,0 +1,74 @@ +\documentclass[fleqn,a4paper,12pt]{article} +\usepackage{geometry} +\geometry{left=30mm, right=40mm, bottom=30mm} +\usepackage[german]{babel} +\usepackage[utf8]{inputenc} %Für Umlaute + +\usepackage{amsmath} % Mathematische Symbole +\usepackage{amssymb} % Nochmehr mathematische Symbole +\usepackage{stmaryrd} % Für die [[ ]] Klammern (\llbracket, \rrbracket) +\usepackage{dsfont} % Schriftsatz fuer Zahlenmengensymbole +%\usepackage{verbatim} % erweiterte Verbatim-Umgebung +\usepackage{alltt} % Quasi-Verbatim-Umgebung +\usepackage{fancyhdr} % Eigene Kopfzeilen +\usepackage{graphics} % Zum Einbinden von Grafiken +\usepackage{tikz} % Zur Erstellung von Graphen +\usepackage{listings} % Pseudo-Code Formatierung +% Einbinden einer eps-Grafik geht so: includegraphics{path} + +% Seitenraender +\addtolength{\voffset}{-2cm} +\addtolength{\textheight}{0cm} +\addtolength{\hoffset}{0cm} +\addtolength{\textwidth}{2cm} +%\addtolength{\headheight}{2cm} % fuer jeden Strichkode einen Zentimeter + +% Skalierung der Grafiken +\setlength{\unitlength}{1cm} + +\pagestyle{fancy} % Eigene Kopfzeilen verwenden +\frenchspacing % Kein Extrafreiraum nach Satzzeichen +\setlength{\parindent}{0pt} % Neue Absaetze nicht einruecken +%\sloppy % Schlampige Absatzformatierung +\fussy % Penible Absatzformatierung +\linespread{1.5} % Zeilenabstand + +%tikz-definition +\tikzstyle{rec} = [minimum width=1cm, minimum height=0.8cm, align = left,text centered, draw=black] + +% Kopfzeile +%\lhead{} +%\rhead{} +\lstset{ % + %backgroundcolor=\color{}, % choose the background color; you must add \usepackage{color} or \usepackage{xcolor}; should come as last argument + basicstyle=\footnotesize, % the size of the fonts that are used for the code + breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace + breaklines=true, % sets automatic line breaking + captionpos=b, % sets the caption-position to bottom + %commentstyle=\color{mygreen}, % comment style + %deletekeywords={...}, % if you want to delete keywords from the given language + escapeinside={\%*}{*)}, % if you want to add LaTeX within your code + extendedchars=true, % lets you use non-ASCII characters; for 8-bits encodings only, does not work with UTF-8 + %frame=single, % adds a frame around the code + keepspaces=true, % keeps spaces in text, useful for keeping indentation of code (possibly needs columns=flexible) + keywordstyle=\color{blue}, % keyword style + language=Python, % the language of the code + %morekeywords={*,...}, % if you want to add more keywords to the set + numbers=left, % where to put the line-numbers; possible values are (none, left, right) + numbersep=5pt, % how far the line-numbers are from the code + numberstyle=\tiny,%\color{mygray}, % the style that is used for the line-numbers + %rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here)) + showspaces=false, % show spaces everywhere adding particular underscores; it overrides 'showstringspaces' + showstringspaces=false, % underline spaces within strings only + showtabs=false, % show tabs within strings adding particular underscores + stepnumber=1, % the step between two line-numbers. If it's 1, each line will be numbered + stringstyle=\color{mymauve}, % string literal style + tabsize=2, % sets default tabsize to 2 spaces + title=\lstname % show the filename of files included with \lstinputlisting; also try caption instead of title +} +\begin{document} + \input{docEnvironment-content.tex} +\end{document} + + + diff --git a/modules/CACC/moduleCACC.pdf b/modules/CACC/moduleCACC.pdf deleted file mode 100644 index 9be862f69c9ca3f2770069c1760408d97823343d..0000000000000000000000000000000000000000 Binary files a/modules/CACC/moduleCACC.pdf and /dev/null differ diff --git a/modules/catkin_ws/src/car/CMakeLists.txt b/modules/catkin_ws/src/car/CMakeLists.txt index 71ddbfac629d8c7385625692e143027d876bddbd..1521b22e02ee5b06e00f9e1e4d9445fb39dbc52d 100644 --- a/modules/catkin_ws/src/car/CMakeLists.txt +++ b/modules/catkin_ws/src/car/CMakeLists.txt @@ -98,6 +98,7 @@ add_message_files( rcEnabledMsg.msg stmDataMsg.msg ussDataMsg.msg + laneDataMsg.msg ) generate_messages( DEPENDENCIES @@ -141,6 +142,10 @@ add_library(camera src/camera/camera.cpp) add_dependencies(camera ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp) target_link_libraries(camera ${catkin_LIBRARIES}) +add_library(lanekeeping src/lanekeeping/lanekeeping.cpp) +add_dependencies(lanekeeping ${catkin_EXPORTED_TARGETS} ${PROJECT_NAME}_generate_messages_cpp) +target_link_libraries(lanekeeping ${catkin_LIBRARIES}) + install( TARGETS main_node diff --git a/modules/catkin_ws/src/car/include/lanekeeping/lanekeeping.h b/modules/catkin_ws/src/car/include/lanekeeping/lanekeeping.h new file mode 100644 index 0000000000000000000000000000000000000000..9446809bd234e8f7692655aaffceea9d54ee7c20 --- /dev/null +++ b/modules/catkin_ws/src/car/include/lanekeeping/lanekeeping.h @@ -0,0 +1,29 @@ +#ifndef LANEKEEPING_H +#define LANEKEEPING_H + +#include <nodelet/nodelet.h> +#include <ros/ros.h> + +#include "car/laneDataMsg.h" +#include "car/camDataMsg.h" + +namespace car +{ + class Lanekeeping : public nodelet::Nodelet + { + public: + virtual void onInit(); + Lanekeeping(ros::NodeHandle &nh, std::string &name); + Lanekeeping(); + ~Lanekeeping(); + private: + ros::NodeHandle nh_; + std::string name_; + + ros::Publisher laneData; + ros::Subscriber camData; + + void camDataCallback(const camDataMsg::ConstPtr& inMsg); + }; +} +#endif diff --git a/modules/catkin_ws/src/car/launch/fullstart.launch b/modules/catkin_ws/src/car/launch/fullstart.launch index a0971bf81285e51db6cbd9a1edede9b64120ef84..5c39d9d8d3041864d4de71eaaa57595cdc979557 100644 --- a/modules/catkin_ws/src/car/launch/fullstart.launch +++ b/modules/catkin_ws/src/car/launch/fullstart.launch @@ -7,6 +7,7 @@ <node pkg="nodelet" type="nodelet" name="nodelet_environment" args="load car/environment Master"/> <node pkg="nodelet" type="nodelet" name="nodelet_ultrasonic" args="load car/ultrasonic Master"/> <node pkg="nodelet" type="nodelet" name="nodelet_camera" args="load car/camera Master"/> + <node pkg="nodelet" type="nodelet" name="nodelet_lanekeeping" args="load car/lanekeeping Master"/> </launch> <!-- diff --git a/modules/catkin_ws/src/car/msg/laneDataMsg.msg b/modules/catkin_ws/src/car/msg/laneDataMsg.msg new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/modules/catkin_ws/src/car/plugins/nodelet_plugins.xml b/modules/catkin_ws/src/car/plugins/nodelet_plugins.xml index 38af8257faf35a8b914d1930f4b3b1eac87cf404..6726b019505016846a9f355cb3aeb9c384e75928 100644 --- a/modules/catkin_ws/src/car/plugins/nodelet_plugins.xml +++ b/modules/catkin_ws/src/car/plugins/nodelet_plugins.xml @@ -43,3 +43,13 @@ </description> </class> </library> + +<library path="lib/liblanekeeping"> + <class name="car/lanekeeping" + type="car::Lanekeeping" + base_class_type="nodelet::Nodelet"> + <description> + Missing + </description> + </class> +</library> diff --git a/modules/catkin_ws/src/car/src/lanekeeping/lanekeeping.cpp b/modules/catkin_ws/src/car/src/lanekeeping/lanekeeping.cpp new file mode 100644 index 0000000000000000000000000000000000000000..363f3d5456c2acc442589988aa52d760cd480c5b --- /dev/null +++ b/modules/catkin_ws/src/car/src/lanekeeping/lanekeeping.cpp @@ -0,0 +1,36 @@ +#include <pluginlib/class_list_macros.h> +#include <ros/ros.h> + +#include "lanekeeping/lanekeeping.h" + +#include "car/camDataMsg.h" +#include "car/environmentDataMsg.h" + +PLUGINLIB_EXPORT_CLASS(car::Lanekeeping, nodelet::Nodelet); + +namespace car +{ + Lanekeeping::Lanekeeping(ros::NodeHandle &nh, std::string &name) : + nh_(nh), + name_(name) + { } + + Lanekeeping::Lanekeeping() {} + + Lanekeeping::~Lanekeeping() {} + + void Lanekeeping::onInit() + { + NODELET_INFO("Lanekeeping::onInit -- START"); + laneData = nh_.advertise<laneDataMsg>("laneData", 1); + camData = nh_.subscribe("camData", 1, &Lanekeeping::camDataCallback, this); + NODELET_INFO("Lanekeeping::onInit -- END"); + } + + void Lanekeeping::camDataCallback(const camDataMsg::ConstPtr& inMsg) + { + std::cout << "Lanekeeping recived new cam data ( ).\n"; + } + + +}