Awesome-automotive/autonomous

EDSS
https://www.jstage.jst.go.jp/article/jsaeronbun/51/2/51_20204098/_pdf/-char/en

世界初!路肩に自動で退避させるドライバー異常時対応システムのガイドラインを策定しました【国土交通省】

http://guide.jsae.or.jp/topics/222113/
ドライバー異常時対応システム(路肩退避型)基本設計書

ドライバー異常自動検知システム基本設計書

First Step : CARLAR 環境設立 (linux build link )

*Develop :money_mouth_face:
make GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
cmake version 3.24.0

conda 4.10.1
|_ (python3.6)
|_ (default requirements required by Carla environment)
Simulation
CARLA: 0.9.13
UnrealEngine : 4.26
*OS Linux ’ 5.4.0-124-generic #140~18.04.1-Ubuntu SMP Fri Aug 5 11:43:34 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
*GPU NVIDIA GeForce RTX 3070 Ti (Driver Version: 515.65.01 CUDA Version: 11.7 )

iptables -I INPUT -p tcp --dport 2000 -j ACCEPT
  iptables -I INPUT -p tcp --dport 2001 -j ACCEPT
 iptables-save
sudo apt-get update &&
sudo apt-get install wget software-properties-common &&
sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - &&
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" &&
sudo apt-get update
  1. Ubuntu 18.04.
sudo apt-get install build-essential clang-8 lld-8 g++-7 cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git
pip install --user setuptools &&
pip3 install --user -Iv setuptools==47.3.1 &&
pip install --user distro &&
pip3 install --user distro &&
pip install --user wheel &&
pip3 install --user wheel auditwheel
  1. Unreal Engine 4.26
git clone --depth 1 -b carla https://github.com/CarlaUnreal/UnrealEngine.git ~/UnrealEngine_4.26
 cd ~/UnrealEngine_4.26
./Setup.sh && ./GenerateProjectFiles.sh && make
sudo apt-get install aria2
git clone https://github.com/carla-simulator/carla
        ./Update.sh
    gedit ~/.bashrc
    export UE4_ROOT=~/UnrealEngine_4.26 
    make PythonAPI
   CD ~/carla$ 
    make launch

then unreal engine will start , hit the Play button and it will start the server service.
toDo: every time we should do this ?seek a better .sh alternative.

In the condia virtual environment, start pygame view like,

conda activate my_env
(my_env) ***:~/carla/PythonAPI/examples$ python manual_control.py

package in conda environment

Package Version


addict 2.4.0
anyio 3.6.1
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
async-generator 1.10
attrs 22.1.0
auditwheel 5.1.2
Babel 2.10.3
backcall 0.2.0
bleach 4.1.0
certifi 2021.5.30
cffi 1.15.1
charset-normalizer 2.0.12
contextvars 2.4
cycler 0.11.0
dataclasses 0.8
decorator 5.1.1
defusedxml 0.7.1
deprecation 2.1.0
distro 1.7.0
entrypoints 0.4
future 0.18.2
idna 3.3
immutables 0.18
importlib-metadata 4.8.3
importlib-resources 5.4.0
ipykernel 5.5.6
ipython 7.16.3
ipython-genutils 0.2.0
ipywidgets 7.7.1
jedi 0.17.2
Jinja2 3.0.3
joblib 1.1.0
json5 0.9.9
jsonschema 3.2.0
jupyter-client 7.1.2
jupyter-core 4.9.2
jupyter-packaging 0.10.6
jupyter-server 1.13.1
jupyterlab 3.2.9
jupyterlab-pygments 0.1.2
jupyterlab-server 2.10.3
jupyterlab-widgets 1.1.1
kiwisolver 1.3.1
MarkupSafe 2.0.1
matplotlib 3.3.4
mistune 0.8.4
nbclassic 0.3.5
nbclient 0.5.9
nbconvert 6.0.7
nbformat 5.1.3
nest-asyncio 1.5.5
notebook 6.4.10
numpy 1.18.4
open3d 0.15.2
packaging 21.3
pandas 1.1.5
pandocfilters 1.5.0
parso 0.7.1
pexpect 4.8.0
pickleshare 0.7.5
Pillow 8.4.0
pip 21.3.1
prometheus-client 0.14.1
prompt-toolkit 3.0.30
ptyprocess 0.7.0
pycparser 2.21
pyelftools 0.29
pygame 2.1.2
Pygments 2.13.0
pyparsing 3.0.9
pyquaternion 0.9.9
pyrsistent 0.18.0
python-dateutil 2.8.2
pytz 2022.2.1
PyYAML 6.0
pyzmq 23.2.1
requests 2.27.1
scikit-learn 0.24.2
scipy 1.5.4
Send2Trash 1.8.0
setuptools 47.3.1
six 1.16.0
sniffio 1.2.0
terminado 0.12.1
testpath 0.6.0
threadpoolctl 3.1.0
tomlkit 0.11.4
tornado 6.1
tqdm 4.64.0
traitlets 4.3.3
typing_extensions 4.1.1
urllib3 1.26.11
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.3.1
wheel 0.37.1
widgetsnbextension 3.6.1
zipp 3.6.0


add traffic fact via

python3 generate_traffic.py

*(base) remove this in the terminal otherwise “no carlar module error arise”? :money_mouth_face:
trick’ conda config --set auto_activate_base false
source ~/.profile
then base environment of conda will be off set .

To resolve following warning when conduct above script. ? :woozy_face:
WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API
WARNING: Client API version = 0.9.13-1-g8854804f4
WARNING: Simulator API version = 0.9.13-1-g8854804f4-dirty

Welcome to CARLA manual control.

Use ARROWS or WASD keys for control.

    W            : throttle
    S            : brake
    A/D          : steer left/right
    Q            : toggle reverse
    Space        : hand-brake
    P            : toggle autopilot
    M            : toggle manual transmission
    ,/.          : gear up/down
    CTRL + W     : toggle constant velocity mode at 60 km/h

    L            : toggle next light type
    SHIFT + L    : toggle high beam
    Z/X          : toggle right/left blinker
    I            : toggle interior light

    TAB          : change sensor position
    ` or N       : next sensor
    [1-9]        : change to sensor [1-9]
    G            : toggle radar visualization
    C            : change weather (Shift+C reverse)
    Backspace    : change vehicle

    O            : open/close all doors of vehicle
    T            : toggle vehicle's telemetry

    V            : Select next map layer (Shift+V reverse)
    B            : Load current selected map layer (Shift+B to unload)

    R            : toggle recording images to disk

    CTRL + R     : toggle recording of simulation (replacing any previous)
    CTRL + P     : start replaying last recorded simulation
    CTRL + +     : increments the start time of the replay by 1 second (+SHIFT = 10 seconds)
    CTRL + -     : decrements the start time of the replay by 1 second (+SHIFT = 10 seconds)

    F1           : toggle HUD
    H/?          : toggle help
    ESC          : quit

AirSim: High-Fidelity Visual and Physical Simulation for Autonomous Vehicle[here]

###Autoware on Board: Enabling Autonomous Vehicles with Embedded Systems [here]

First Step : AirSim 環境設立 (linux build [link] )

# go to the folder where you clone GitHub projects
git clone https://github.com/Microsoft/AirSim.git
cd AirSim
./setup.sh

this package is not installed link ,remove it from setup.sh


AirSim setup completed successfully!


./build.sh
Summary

[100%] Built target AirLibUnitTests

  • popd
  • mkdir -p AirLib/lib/x64/Debug
  • mkdir -p AirLib/deps/rpclib/lib
  • mkdir -p AirLib/deps/MavLinkCom/lib
  • cp build_debug/output/lib/libAirLib.a AirLib/lib
  • cp build_debug/output/lib/libMavLinkCom.a AirLib/deps/MavLinkCom/lib
  • cp build_debug/output/lib/librpc.a AirLib/deps/rpclib/lib/librpc.a
  • rsync -a --delete build_debug/output/lib/ AirLib/lib/x64/Debug
  • rsync -a --delete external/rpclib/rpclib-2.3.0/include AirLib/deps/rpclib
  • rsync -a --delete MavLinkCom/include AirLib/deps/MavLinkCom
  • rsync -a --delete AirLib Unreal/Plugins/AirSim/Source
  • rm -rf Unreal/Plugins/AirSim/Source/AirLib/src
  • for d in Unreal/Environments/*
  • ‘[’ -L Unreal/Environments/Blocks ‘]’
  • Unreal/Environments/Blocks/clean.sh
  • rm -rf Binaries
  • rm -rf Intermediate
  • rm -rf Saved
  • rm -rf Plugins/AirSim/Binaries
  • rm -rf Plugins/AirSim/Intermediate
  • rm -rf Plugins/AirSim/Saved
  • rm -f CMakeLists.txt
  • rm -f Makefile
  • popd
  • mkdir -p Unreal/Environments/Blocks/Plugins
  • rsync -a --delete Unreal/Plugins/AirSim Unreal/Environments/Blocks/Plugins
  • set +x

  1. build UE4
git clone -b 4.27 git@github.com:EpicGames/UnrealEngine.git
cd UnrealEngine
./Setup.sh
./GenerateProjectFiles.sh
 make or make -j 4 UE4Editor. ( Otherwise the editor does not compiled and build properly )
if 'shadercompileworker' does not work ,build it via following command
./Engine/Build/BatchFiles/Linux/Build.sh ShaderCompileWorker Linux Development

:disguised_face:Finally , when UE4 could not be opened with block project , repair it via this ticket

Summary
  • Cloned UnrealEngine to ~/UnrealEngine. Cloned AirSim to ~/AirSim
  • Cleaned the UBlocks project cd ~/AirSim/Unreal/Environments/Blocks && ./clean.sh
  • Installed mono-complete for Ubuntu 18.04, which lets you run .exe files on Linux
  • Made some symlinks: sudo ln -s /usr/bin/mono /bin/mono && sudo ln -s /usr/lib/mono /lib/mono
  • Ran the following command to rebuild the Blocks project: ~/UnrealEngine/Engine/Binaries/ThirdParty/Mono/Linux/bin/mono ~/UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Linux -Project=/home/andrew/AirSim/Unreal/Environments/Blocks/Blocks.uproject -TargetType=Editor -Progress
  • Started UE4Editor from command line: ~/UnrealEngine/Engine/Binaries/Linux/UE4Editor
  • Clicked More > Browse > /home/andrew/AirSim/Unreal/Environments/Blocks/Blocks.uproject
  • Error shows up “This project was made with a different version of the Unreal Engine.”. Click “More Options” > “Skip conversion”

when it opened , it shows like


a fly simulation

First Step : Openpilot 環境設立 (linux build link)
Environment’ Linux 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

[./setup.sh](https://github.com/commaai/openpilot/blob/master/tools/CTF.md)

play , execute following command via virtual environment established.
./replay ‘0c7f0c7f0c7f0c7f|2021-10-13–13-00-00’ --dcam --ecam

run this command in 2nd terminal ) /openpilot$ selfdrive/ui/ui ( :grinning:

bridge with Carla :hot_face:
without using docker , all program run in virtual environment .

Docker images
sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4883ee088d07 carlasim/carla:0.9.12 “/bin/bash ./CarlaUE…” 3 minutes ago Up 3 minutes recursing_swartz
fc2a910c7798 Package openpilot-sim · GitHub “/bin/bash -c './tmu…” 3 minutes ago Up 3 minutes openpilot_client

./start carla.h
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
sh: 1: xdg-user-dir: not found

./bridge.py --town TOWN
WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API
WARNING: Client API version = 0.9.13
WARNING: Simulator API version = 0.9.12

./launch_openpilot.sh
selfdrive/loggerd/bootlog.cc: bootlog to /home/**/.comma/media/0/realdata/boot/2022-08-20--19-16-16