Sleipnirs-Hermod

所属分类:自动驾驶
开发工具:C++
文件大小:0KB
下载次数:0
上传日期:2022-12-06 05:37:57
上 传 者sh-1993
说明:  使用FastDDS的车辆DDS系统,
(Vehicle DDS system using FastDDS,)

文件列表:
Examples/ (0, 2022-12-05)
Examples/Behave_Testing/ (0, 2022-12-05)
Examples/Behave_Testing/behave.txt (261, 2022-12-05)
Examples/Behave_Testing/steps/ (0, 2022-12-05)
Examples/Behave_Testing/steps/tutorial.py (269, 2022-12-05)
Examples/Behave_Testing/tutorial.feature (164, 2022-12-05)
Examples/FastDDS_C++/ (0, 2022-12-05)
Examples/FastDDS_C++/N16743/ (0, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/ (0, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/CMakeLists.txt (1254, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/ (0, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/DDSHelloWorldPubSub (278280, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/DDSHelloWorldPublisher (241352, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/DDSHelloWorldSubscriber (243648, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/HelloWorld.cxx (4772, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/HelloWorld.h (6595, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/HelloWorld.idl (68, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/HelloWorldPubSub.cpp (8575, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/HelloWorldPubSubTypes.cxx (5265, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/HelloWorldPubSubTypes.h (3101, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/HelloWorldPublisher.cpp (5071, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/HelloWorldSubscriber.cpp (5052, 2022-12-05)
Examples/FastDDS_C++/N16743/HelloWorld_Example/src/Makefile (12639, 2022-12-05)
Examples/Gym_Simulation/ (0, 2022-12-05)
Examples/Gym_Simulation/gymTradeStudy.py (547, 2022-12-05)
Examples/Python/ (0, 2022-12-05)
Examples/Python/HelloWorld/ (0, 2022-12-05)
Examples/Python/HelloWorld/CMakeLists.txt (3271, 2022-12-05)
Examples/Python/HelloWorld/HelloWorld.cxx (4772, 2022-12-05)
Examples/Python/HelloWorld/HelloWorld.h (6595, 2022-12-05)
Examples/Python/HelloWorld/HelloWorld.i (3181, 2022-12-05)
Examples/Python/HelloWorld/HelloWorld.idl (68, 2022-12-05)
Examples/Python/HelloWorld/HelloWorld.py (8689, 2022-12-05)
Examples/Python/HelloWorld/HelloWorldPubSubTypes.cxx (5265, 2022-12-05)
Examples/Python/HelloWorld/HelloWorldPubSubTypes.h (3101, 2022-12-05)
Examples/Python/HelloWorld/HelloWorldPubSubTypes.i (972, 2022-12-05)
Examples/Python/HelloWorld/HelloWorldPublisher.py (4185, 2022-12-05)
Examples/Python/HelloWorld/HelloWorldSubscriber.py (3404, 2022-12-05)
... ...

# Sleipnir's Hermod Project ## Section Links [Hermod - Purpose](https://github.com/NickBishop97/Sleipnirs-Hermod/blob/master/#Purpose) [Hermod - Info](https://github.com/NickBishop97/Sleipnirs-Hermod/blob/master/#Important-Info) [Hermod - Generated Files](https://github.com/NickBishop97/Sleipnirs-Hermod/blob/master/#Generated-Files) [Hermod - Future Steps](https://github.com/NickBishop97/Sleipnirs-Hermod/blob/master/#Future-Steps) [Hermod - Setup](https://github.com/NickBishop97/Sleipnirs-Hermod/blob/master/#FastDDS-Setup) [Hermod - Known Problems](https://github.com/NickBishop97/Sleipnirs-Hermod/blob/master/#Known-Problems) ## Purpose **Summer 2022 Internship Project** Project Hermod is a DDS (Distributed Data Service) that models a DDS that would be used for a car system. It utilizes fastDDS framework to create publishers and subscribers to transmit data via topics in real time. Some of the specific component domain being written for the car system are the following: - Fuel Domain (Fuel spent, Fuel remaining, Low fuel alert, Miles per gallon, etc..) - Miles Domain (Miles traveled, Miles remaining, Miles per gallon, etc..) - Trip Domain (Current trip, Trip time, Avg speed, Avg miles per gallon, etc..) The main purpose of Hermod is to determine if a DDS system can be integrated tested using behave or other similar ATDD system. Future steps to this project would include containerization of each sensor so they could be run on real time linux embedded system boards to test the DDS system functionality in the real world. ## Important Info **Runnable Scripts** - build.sh (Builds both C++ and Python version of the Code) - lint.sh (Will lint both C++ and Python code for any syntax errors) **Requires that cppcheck and flake8 are installed** - doc.sh (Will create an HTML Doc of the code for both C++ and Python) **Requires that Doxygen is installed** - formatcode.sh (Will auto format the Python Code to Pep8 standards) **Requires that autopep8 and clang-format is installed** - unit-test.sh (Will unit test both C++ and Python code and print the coverage) **Requires that pytest and lcov is installed (Might throw an Internal Error check known problems section if it happens)** - InstallQemuPackages.sh (Will install QEMU packages from git repo) - RunQemuEmulation.sh (Takes two args(.iso path, Image name)) ## Required Tools and Packages 1. Python v3.8 - Python Packages - signal - thread - pytest - coverage - queue - sys - time - random - autopep8 - flake8 - Json - venv (Optional) - hamcrest (Optional) 2. gcc v11.2.1 3. FastDDS C++/Python - Required by FastDDS to install - cmake3 - Asio - pcre2 - vcstool - softhsm - colcon - gradle - tinyxml2 - swig - Java JDK 8 with development kit - automake - bison, bison-devel, byacc 4. Doxygen 5. cppcheck 6. clang-format 7. lcov v1.15-1 ## Generated Files The Files below are generated exclusively by the above scripts - Here are where you can find the files after the scripts are run - C++ Documentation html: `./Vehicle-C++/Vehicle/Build/html/index.html` - C++ Coverage html: `./Vehicle-C++/Vehicle/Build/Coverage/index.html` - Python Documentation html: `./Vehicle-Python/Build/html/index.html` - Python Coverage html: `./Vehicle-Python/Build/Coverage/index.html` **(Error could be caused trying to gen this, read known problems section)** ## Future Steps 1. If we had more time we would like to finish containerizing the system so we could separate the publishers and subscribers to different containers to run tests and find bugs. 2. We would like to create an install script for the fastDDS setup so anyone who comes to us this won't have to install fastDDS every time onto a new system 3. Run the System with real time data from a simulation of a car instead of randomly generated data that its currently using. 4. Test the system on real embedded hardware for bugs and for real time integration with real hardware and see how it acts and responds. 5. See if using Behave as an ATDD tester would work in-order to use Grekin syntax as per customers request. ## FastDDS Setup The following steps are required to run Hermod. 1. Getting dependencies **(the commands below are assuming your using CentOS 7)** - **Cmake3 make default system wide (Assuming you have cmake3 installed)** - Use these following commands - `sudo alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 \ --slave /usr/local/bin/ctest ctest /usr/bin/ctest \ --slave /usr/local/bin/cpack cpack /usr/bin/cpack \ --slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake \ --family cmake` - `sudo alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \--family cmake` - **TinyXml2 v9.0.0** - Go to a directory that you want to place all of these download files preferably in the "/home///" location - Run these commands in order. - `wget https://github.com/leethomason/tinyxml2/archive/refs/tags/9.0.0.tar.gz` - `tar -xvf 9.0.0.tar.gz` - `cd tinyxml2-9.0.0` - `mkdir build` - `cd build/` - `sudo cmake3 .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_C_FLAGS=-fPIC` - `sudo cmake3 --build . --target install` - **pcre2 v10.23-2 (dependency for swig)** - Run these commands - `sudo su -l #enter into root user` - `yum install http://mirror.centos.org/centos/7/os/x86_64/Packages/pcre2-utf32-10.23-2.el7.x86_64.rpm` - `yum install http://mirror.centos.org/centos/7/os/x86_64/Packages/pcre2-devel-10.23-2.el7.x86_64.rpm` - `exit` #leave root user - **Swig v4.0.2** - Go to a directory that you want to place all of these download files preferably in the "/home///" location - Run these commands in order - `yum remove swig` _#Only use if you have older version of swig installed_ - `vim ~/.bashrc` _ #Add the next two line bellow the user specific aliases and functions then exit vim using :wq_ - `export LD_LIBRARY_PATH=/usr/local/lib/` - `export LD_LIBRARY_PATH=/opt/rh/httpd24/root/usr/lib64` - `git clone https://github.com/swig/swig.git` - `cd swig` - `./autogen.sh` _#requires automake, and yacc (`sudo yum install automake`, `sudo yum install bison bison-devel byacc`)_ - `./configure --prefix=/usr/local` - `make` - `sudo make install` - `swig -version` _#check to see if its installed correctly (might have to restart terminal to run command)_ - **OpenSSL & PKCS11 & Softhsm v2.1.0-3 & colcon & vcstool** - Directory doesn't matter when installing these dependencies - Install these dependencies in order - `sudo su -l ` _#enter root user_ - `yum install openssl-pkcs11.x86_64` - `yum install openssl-devel.x86_64` - `yum install http://mirror.centos.org/centos/7/os/x86_64/Packages/softhsm-devel-2.1.0-3.el7.x86_64.rpm` - `exit` _#leave root user_ - `pip3 install -U colcon-common-extensions vcstool --user` - **Gradle v6.9** - Directory doesn't matter when installing these dependencies - Install these dependencies in order - `wget https://services.gradle.org/distributions/gradle-6.9-all.zip` - `sudo unzip -d /opt/gradle gradle-6.9-all.zip` - `vim ~/.bashrc` _#Add the next line under the user specific aliases and functions area then exit vim using :wq_ - `export PATH=$PATH:/opt/gradle/gradle-6.9/bin` - `source ~/.bashrc` - `gradle -version` _#To check to see if gradle is working and it version 6.9_ - `cd /home//.gradle` - `vim gradle.properties` _#Enter the next four lines into the properties file this allows gradle to use the northrop proxy_ - systemProp.https.proxyHost=contractorproxyeast.northgrum.com - systemProp.https.proxyPort=80 - systemProp.http.proxyHost=contractorproxyeast.northgrum.com - systemProp.http.proxyPort=80 - **Asio v1.10** - Use this command to install - `sudo yum install https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/a/asio-devel-1.10.8-1.el7.x86_64.rpm` - **Python3.8 Development Kit** - Use this command to install - `sudo yum install rh-python38-python-devel.x86_64` 2. Installing FastDDS C++ - **FastDDS C++** - Please go to a directory where you want to keep all of your library files for FastDDS C++ ex. /home//dev/ or /home//projects/ - Use these following commands in order - `mkdir FastDDS` - `cd FastDDS` - `wget https://raw.githubusercontent.com/eProsima/Fast-DDS/master/fastrtps.repos` - `mkdir src` - `vcs import src < fastrtps.repos` _#if this command doesn't exist make sure your not in root and you - have vcstool installed through pip3_ - `colcon build` _#If this fails make sure your gcc is version 10.2.1, also make sure Asio is installed_ - `vim ~/.bashrc` #Add the next line into your bashrc file - `source /home//FastDDS/install/setup.bash` _#make sure to change location to - the location of the fast dds folder_ - `source ~/.bashrc` - **FastDDS-Gen** _#Note: If you already installed fastdds-gen then you can skip this step_ - Please put this in the same dir as the FastDDS so they are next to each other - Use these following commands in order - `git clone --recursive https://github.com/eProsima/Fast-DDS-Gen.git` - `cd Fast-DDS-Gen` - Note: for the next step to work, you must sudo yum install the following packages: - java-1.8.0-openjdk.x86_64 - java-1.8.0-openjdk-devel.x86_64 - java-1.8.0-openjdk-headless.x86_64 - `gradle assemble` - `vim ~/.bashrc` #Add the next line into your bashrc file - `export PATH=$PATH:/home//Fast-DDS-Gen/scripts` _#make sure to put in your fast dds gen folder location_ You should be able to run the C++ version of Hermod, if you would like to create your own file from scratch you can checkout this link: [FastDDS C++ Example](https://github.com/NickBishop97/Sleipnirs-Hermod/blob/master/https://fast-dds.docs.eprosima.com/en/latest/fastdds/getting_started/simple_app/simple_app.html) 3. Install FastDDS Python - **FastDDS Python** - Please go to a directory where you want to keep all of your library files for FastDDS Python ex. / home//dev/ or /home//projects/ - Use these following commands in order - `mkdir FastDDS-Python` - `cd FastDDS-Python` - `wget https://raw.githubusercontent.com/eProsima/Fast-DDS-python/main/fastdds_python.repos` - `mkdir src` - `vcs import src < fastdds_python.repos` _#if this command doesn't exist make sure your not in root and you have vcstool installed through pip3_ - `colcon build` _#If this fails make sure your gcc is version 10.2.1, also make sure Asio is installed, and make sure python38-devel is installed_ - `vim ~/.bashrc` _#Add the next line into your bashrc file_ - s`ource /home//FastDDS-Python/install/setup.bash` _#make sure to change location to the location of the fast dds folder_ - `source ~/.bashrc` - **Fixes** - **Fix for FastDDS.py not found** - Copy all the files from `/home//install/fastdds_python/lib64/python3.8/site-packages` and move them to `/home//.local/lib/python3.8/site-packages/` - `cp -r /home//install/fastdds_python/lib64/python3.8/site-packages/* /home//.local/lib/python3.8/site-packages/` ## Known Problems INTERNALERROR Unsupported hash type(Python) - If you try to run the unit-test.sh script and it throws and error about INTERNALERROR unsupported hash type then this is a problem with openssl binding with python. To fix this you can uninstall python and openssl and bind them together(Research is needed for this). The method we used was to change two lines of code in the site-packages from the files `/home//.local/lib/python3.8/site-packages/coverage/misc.py line 226` and `/home//.local/lib/python3.8/site-packages/coverage/files.py line 95` and change the strings that say sha3_256 to sha256. If you don't want to fix this you can just comment out line 14 in unit-testing.sh and uncomment line 15 which will just show what lines weren't hit during the test.

近期下载者

相关文件


收藏者