Thanks for taking a look at this repository!!
This repository is the environment of YOLO V4 ported to darknet_ros.
If you need the Japanese README file, please go here.
This repository assumes that the Robot Operating System (ROS) has already been installed on your environment. See ros.org to know how to install ROS. My environment is here.
First, create the ROS workspace. The <workspace>
can be named arbitrarily.
## Create workspace for ROS, Change directory
$ mkdir -p workspace/src && cd workspace/src
## init workspace
$ catkin_init_workspace
## Make
$ cd ../
$ catkin_make
To clone darknet
and darknet_ros
as a submodule, you must clone them with --recursive
. This allows you to clone the two submodules together.
$ cd src
$ git clone --recursive https://github.com/kyuhyong/yolov4-for-darknet_ros.git
The weights file is very large and needs to be downloaded separately.
Download the weights file to darknet_ros/darknet_ros/yolo_network_config/weights
to install it.
$ wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights
# Change workspace directory
$ cd workspace
## Make
$ catkin_make
# Write source command in ~/.bashrc
$ echo "source ~/workspace/devel/setup.bash" >> ~/.bashrc
Topics | Spec |
---|---|
Model | Dell ALIENWARE m15 |
CPU | Intel® Core™ i7-8750H CPU @ 2.20GHz × 12 |
GPU | GeForce RTX 2070 with Max-Q Design/PCIe/SSE2 |
RAM | 15.4 GB |
OS | Ubuntu 18.04.3 LTS bionic |
Midlleware | ROS Melodic |
NVIDIA-SMI | 440.100 |
Driver Version | 440.100 |
CUDA Version | 10.2 |
Cuda compilation tools | release 10.1, V10.1.243 |
I will describe how to demonstrate it in an implemented environment. Before you can do the demo, you need to prepare for it.
-
Web Camera
You don't need to have it if it's already installed.At the Terminal
$ ls /dev/video*
If you enter and display, you are ready to go. If you do not see anything, prepare your environment.
-
ROS package of
uvc_camera
If it has already been installed, there is no need to do it again. To install, execute the following command$ sudo apt install ros-melodic-uvc-camera
-
Fixing the launch file
If you use theuvc_camera
package, you need to change the Topic of the camera image to input to darknet_ros. Open the filedarknet_ros/darknet_ros/config/ros.yaml
and change the file as follows## Before topic: /camera/rgb/image_raw ## After topic: /image_raw
Execute the three commands in another Terminal.
$ roscore
$ rosrun uvc_camera uvc_camera_node
$ roslaunch darknet_ros yolo_v4.launch
Here is the documentation to set up this environment.
This repository consists of two large repositories, AlexeyAB's darknet and legged robotics's darknet_ros. For building this environment, I have a reference to the information published by many developers. I would like to thank the developers who made these repositories available to me, and many of them have contributed their information to make this environment possible.
This software is released under the MIT License, see LICENSE.
I will improve it at my whim.
- Rewrite the readme file in English. 🌎
- Getting your environment ready to run in the Docker Container. 🐳
- I've roughly summarized everything from environment building to manual creation(11. Aug. 2020)
- Create an English version of the README(20. Aug. 2020)
- Moved
/root/darknet
to/root/darknet/darknet/darknet_ros
due to redundant file structure.(31. Aug. 2020)
Tossy Japan, Osaka Please Follow me!!