GithubHelp home page GithubHelp logo

ballonballon / autonomous_driving_system Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jhan15/autonomous_driving_system

0.0 0.0 0.0 16.37 MB

Autonomous driving system on a 1:10 vechicle.

Python 100.00%

autonomous_driving_system's Introduction

autonomous_driving_system

This repo is for the autonomous driving system (ADS) developed for BFMC2021. The system is simulated in ROS and tested on a 1:10 scaling vehicle.

System architecture

ADS
  |__ Input layer
  |__ Planning layer
  |__ Localization layer
  |__ Perception layer
  |__ Decision-making layer
  |__ Control layer
  |__ Output layer

Object detection

We used yolov5 architecture to train a model on a self-collected dataset. The model can detect 15 classes of objects, including car, pedestrian, traffic light, and different traffic signs. Best [email protected] = 87.2%.

System setup in ROS

1. Hierarchy overview

~/Documents
    |__ bfmc_workspace
    |__ startup_workspace
    |__ python3_ws

2. Installation

Install basic Python3 packages and virtual environment

# requires python3.8 or later installed in default system
$ sudo apt-get install python-catkin-tools python3-dev python3-numpy
$ sudo pip install virtualenv
$ cd ~/Documents
$ mkdir -p python3_ws/src
$ cd python3_ws
$ virtualenv py3venv --python=python3.8
$ source ~/Documents/python3_ws/py3venv/bin/activate

Install yolov5 and its dependencies

$ cd ~/Documents/python3_ws/src
# copy the yolov5 folder to src
$ cd yolov5
$ pip install -r requirements.txt
$ pip install -e .
$ pip install gym

Install other dependencies

$ cd ~/Documents/python3_ws/src
# copy geometry and vision_opencv folders to src
$ pip install pyaml
$ pip install rospkg
$ pip install empy
$ cd ~/Documents/python3_ws
$ catkin_make -DPYTHON_EXECUTABLE:FILEPATH=/home/<user>/Documents/python3_ws/py3venv/bin/python
$ source devel/setup.bash

Compile startup package with Python3 workspace

$ cd ~/Documents/startup_workspace
$ rm -rf build devel
$ catkin_make -DPYTHON_EXECUTABLE:FILEPATH=/home/<user>/Documents/python3_ws/py3venv/bin/python
$ source devel/setup.bash

3. Launch

# put below line as first line of each .py file
#!/usr/bin/env python

# Terminal 1
$ source ~/Documents/python3_ws/py3venv/bin/activate
$ cd ~/Documents/bfmc_workspace
$ roslaunch sim_pkg map_with_all_objects.launch

# Terminal 2
$ source ~/Documents/python3_ws/py3venv/bin/activate
$ cd ~/Documents/startup_workspace
$ rosrun startup_package main.py

autonomous_driving_system's People

Contributors

jhan15 avatar

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.