GithubHelp home page GithubHelp logo

armlabcuicar / yolo-ros-2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tinker-twins/yolo-ros-2

0.0 0.0 0.0 13.08 MB

Darknet YOLO with ROS 2

Shell 0.42% C++ 36.09% Python 10.32% C 39.76% C# 0.17% PowerShell 1.09% Cuda 9.03% Makefile 0.16% CMake 2.55% Batchfile 0.36% Dockerfile 0.06%

yolo-ros-2's Introduction

Darknet YOLO with ROS 2

Stop Sign Detection Simulation Stop Sign Detection Robot Stop Sign Detection RViz
Stop Sign Detection - Simulation Stop Sign Detection - TurtleBot3 Stop Sign Detection - Remote PC

Note: The above demonstrations use this repository for controlling TurtleBot3 to obey the stop sign.

Build:

  1. Make a directory ROS2_WS to act as your ROS 2 workspace.
    $ mkdir -p ~/ROS2_WS/src/
  2. Clone this repository:
    $ git clone https://github.com/Tinker-Twins/YOLO-ROS-2.git
  3. Install OpenCV (or build from source).
    $ sudo apt update
    $ sudo apt install libopencv-dev python3-opencv
  4. Build the ROS packages (build in Release mode to maximize performance).
    $ cd ~/ROS2_WS
    $ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
  5. Source the setup.bash file of your ROS2_WS.
    $ echo "source ~/ROS2_WS/install/setup.bash" >> ~/.bashrc
    $ source ~/.bashrc

Execute:

$ ros2 launch darknet_ros darknet_ros.launch.py

Configure:

  • Installation configuration can be managed from CMakeLists.txt.
    • darknet_ros/darknet_ros/darknet/CMakeLists.txt
      # CUDA/cuDNN Settings
      option(ENABLE_CUDA "Enable CUDA support" OFF)
      option(ENABLE_CUDNN "Enable CUDNN" OFF)
      option(ENABLE_CUDNN_HALF "Enable CUDNN Half precision" OFF)
    • darknet_ros/darknet_ros/darknet_ros/CMakeLists.txt
      # CUDA/cuDNN Settings
      set(CUDA_ENABLE OFF)
      set(CUDNN_ENABLE OFF)
      set(FP16_ENABLE OFF)
      
      # YOLO Pre-Trained Model (Weights) Settings
      set(DOWNLOAD_YOLOV2_TINY OFF)
      set(DOWNLOAD_YOLOV3 OFF)
      set(DOWNLOAD_YOLOV4 OFF)
      set(DOWNLOAD_YOLOV4_CSP ON)
      set(DOWNLOAD_YOLOV4_TINY ON)
      set(DOWNLOAD_YOLOV4_MISH OFF)
      set(DOWNLOAD_YOLOV7_TINY ON)
  • Names and other parameters of the publishers, subscribers and actions can be modified from darknet_ros/config/ros.yaml.
  • Parameters related to YOLO object detection algorithm can be modified from darknet_ros/darknet_ros/darknet_ros/config/yolo.yaml.
  • It is recommended to create a copy of the existing configuration file(s) as a template and do necessary modifications.
  • Reference the updated configuration file(s) in darknet_ros/darknet_ros/darknet_ros/launch/darknet_ros.launch.py.

yolo-ros-2's People

Contributors

tinker-twins 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.