Giter VIP home page Giter VIP logo

autonomous-vehicles-adaptive-cruise-control's Introduction

New version of Adaptive-Cruise Controller using DRL:

https://github.com/kochlisGit/Noise-Adaptive-Driving-Assistance-System

Self Driving Vehicles Using Deep Reinforcement Learning

** Description **

This is the project of my thesis. I've implemented an agent in CARLA Simulator, which is capable of navigating a vehicle safe & fast, using only 2 front cameras. More info about the simulator can be found here: https://carla.org/ . The agent has learnt to navigate in a lane using deep reinforcement learning algorithms. The development of the agent was made in Python.

slide1

slide2

slide3

slide4

slide5

slide6

slide7

slide8

slide9

slide10

slide11

slide12

slide13

slide14

slide15

slide16

slide17

slide18

slide19

slide20

slide21

slide22

slide23

slide24

slide25

slide26

slide27

slide28

slide29

slide30

slide31

slide32

slide33

slide34

slide35

slide36

slide37

slide38

slide39

slide40

Demonstration

This directory contains 8 video files (mp4) that demonstrate how the vehicle is moving in the simulator https://github.com/kochlisGit/autonomous-vehicles-agent/tree/main/videos

The validation of the vehicle was done in a pre-defined route, that was new to the agent. The results are astonishing!

Python Libraries

  1. Carla API
  2. Numpy
  3. Matplotlib
  4. Tensorflow
  5. Keras
  6. TF-Agents
  7. Tensorflow-Addons

Sensors

  1. Collision Detector: https://carla.readthedocs.io/en/latest/ref_sensors/#collision-detector
  2. RGB Camera with Semantic Segmentation: https://carla.readthedocs.io/en/latest/ref_sensors/#semantic-segmentation-camera
  3. Depth Camera: https://carla.readthedocs.io/en/latest/ref_sensors/#depth-camera

Algorithms:

Execution

First, You have to download carla and all the libraries above. Then, download my "code" directory and paste it into "Carla/PythonAPI/". Run "agent/straight_lane_agent_c51_training.py" to start the training.

IMPORTANT The simulator window should be open, in order for the training to occur. Check https://carla.readthedocs.io/en/latest/start_introduction/ for more information of how to setup carla.

Libraries

  1. Python 3.7
  2. Carla <= 0.12
  3. Numpy >= 1.15
  4. Matplotlib
  5. Tensorflow >= 2.0
  6. TF-Agents >= 0.13
  7. Tensorflow-Addons >= 0.13 1 Opencv >= 4.0

autonomous-vehicles-adaptive-cruise-control's People

Contributors

kochlisgit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

autonomous-vehicles-adaptive-cruise-control's Issues

python3 straight_lane_agent_c51_training.py

How to solve this problem?
(Autonomous-vehicle) ma@ma-ROG-Strix:~/Desktop/carla/PythonAPI/Autonomous-Vehicles-Adaptive-Cruise-Control/code/agent$ python3 straight_lane_agent_c51_training.py
2023-12-05 15:28:04.402854: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 AVX_VNNI FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-12-05 15:28:04.466888: I tensorflow/core/util/port.cc:104] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0.
2023-12-05 15:28:04.868101: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.2/lib64:/home/ma/carla-ros-bridge1/catkin_ws/devel/lib:/opt/ros/noetic/lib
2023-12-05 15:28:04.868145: W tensorflow/compiler/xla/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.2/lib64:/home/ma/carla-ros-bridge1/catkin_ws/devel/lib:/opt/ros/noetic/lib
2023-12-05 15:28:04.868149: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
File "straight_lane_agent_c51_training.py", line 34, in
from environment.carla_environment import CarlaEnvironment
ModuleNotFoundError: No module named 'environment.carla_environment'; 'environment' is not a package

Running repo

Hi ,Hope you are well
Hi , I was trying to run this repo but I can’t , can you please tell me how to make testing after training and validation?
What Carla version fits this repo?
I have Carla 0.9.11 ,does it suit your model?
Can I use CPU instead of GPU?
can I run this repo on windows?
Sorry for making it long .
Thanks in advance

python code problem(straight_lane_agent_c51_training.py)

I have changed the path, but the execution still fails.
Please tell me the correct path.
try:
sys.path.append(glob.glob('../../carla/dist/carla-*%d.%d-%s.egg' % (
sys.version_info.major,
sys.version_info.minor,
'win-amd64' if os.name == 'nt' else 'linux-x86_64'))[0])
sys.path.append('/')
sys.path.append('../simulation2')
sys.path.append('../environment2')
sys.path.append('../../carla/')
Thanks.

How to obtain the data from the sensors??

i have found that at ur file simulation at simulation.py u defined a things like sensor_data and sensor_callback . so how do i get the readings of sensors u have implemented in ur code???

TypeError: No to_python (by-value) converter found for C++ type: class std::vector<unsigned char,class std::allocator<unsigned char> >

Hi, thank you for sharing your work! It's been really helpful.
Unfortunately I have this error when I run "python straight_lane_agent_c51_training.py".
lambda sensor_data: self._sensor_callback(SensorType.COLLISION_DETECTOR, sensor_data)
File "D:\Carla9.9\WindowsNoEditor\PythonAPI\code\agent\simulation\simulation.py", line 140, in _sensor_callback
data = sensor_data.other_actor.semantic_tags
TypeError: No to_python (by-value) converter found for C++ type: class std::vector<unsigned char,class std::allocator >

Can you please help me? Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.