Skip to content

Commit 8afe311

Browse files
committed
Updated readme for ROS2
Signed-off-by: Francisco Martin Rico <[email protected]>
1 parent a7dd131 commit 8afe311

File tree

1 file changed

+13
-28
lines changed

1 file changed

+13
-28
lines changed

README.md

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
This is a ROS package developed for object detection in camera images. You only look once (YOLO) is a state-of-the-art, real-time object detection system. In the following ROS package you are able to use YOLO (V3) on GPU and CPU. The pre-trained model of the convolutional neural network is able to detect pre-trained classes including the data set from VOC and COCO, or you can also create a network with your own detection objects. For more information about YOLO, Darknet, available training data and training YOLO see the following link: [YOLO: Real-Time Object Detection](http://pjreddie.com/darknet/yolo/).
66

7-
The YOLO packages have been tested under ROS Melodic and Ubuntu 18.04. This is research code, expect that it changes often and any fitness for a particular purpose is disclaimed.
7+
The YOLO packages have been tested under ROS Foxy, Ubuntu 20.04 and OpenCV 4.2.0. This is research code, expect that it changes often and any fitness for a particular purpose is disclaimed.
88

99
**Author: [Marko Bjelonic](https://www.markobjelonic.com), [email protected]**
1010

@@ -52,7 +52,7 @@ URL: https://github.com/leggedrobotics/darknet_ros, 2018.
5252

5353
### Dependencies
5454

55-
This software is built on the Robotic Operating System ([ROS]), which needs to be [installed](http://wiki.ros.org) first. Additionally, YOLO for ROS depends on following software:
55+
This software is built on the Robotic Operating System version([ROS]), which needs to be [installed](http://wiki.ros.org) first. Additionally, YOLO for ROS depends on following software:
5656

5757
- [OpenCV](http://opencv.org/) (computer vision library),
5858
- [boost](http://www.boost.org/) (c++ library),
@@ -63,17 +63,14 @@ This software is built on the Robotic Operating System ([ROS]), which needs to b
6363

6464
In order to install darknet_ros, clone the latest version using SSH (see [how to set up an SSH key](https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html)) from this repository into your catkin workspace and compile the package using ROS.
6565

66-
cd catkin_workspace/src
66+
cd colcon_workspace/src
6767
git clone --recursive [email protected]:leggedrobotics/darknet_ros.git
6868
cd ../
6969

7070
To maximize performance, make sure to build in *Release* mode. You can specify the build type by setting
7171

72-
catkin_make -DCMAKE_BUILD_TYPE=Release
72+
colcon build -DCMAKE_BUILD_TYPE=Release
7373

74-
or using the [Catkin Command Line Tools](http://catkin-tools.readthedocs.io/en/latest/index.html#)
75-
76-
catkin build darknet_ros -DCMAKE_BUILD_TYPE=Release
7774

7875
Darknet on the CPU is fast (approximately 1.5 seconds on an Intel Core i7-6700HQ CPU @ 2.60GHz × 8) but it's like 500 times faster on GPU! You'll have to have an Nvidia GPU and you'll have to install CUDA. The CMakeLists.txt file automatically detects if you have CUDA installed or not. CUDA is a parallel computing platform and application programming interface (API) model created by Nvidia. If you do not have CUDA on your System the build process will switch to the CPU version of YOLO. If you are compiling with CUDA, you might receive the following build error:
7976

@@ -87,7 +84,7 @@ This means that you need to check the compute capability (version) of your GPU.
8784

8885
The yolo-voc.weights and tiny-yolo-voc.weights are downloaded automatically in the CMakeLists.txt file. If you need to download them again, go into the weights folder and download the two pre-trained weights from the COCO data set:
8986

90-
cd catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/weights/
87+
cd colcon_workspace/src/darknet_ros/darknet_ros/yolo_network_config/weights/
9188
wget http://pjreddie.com/media/files/yolov2.weights
9289
wget http://pjreddie.com/media/files/yolov2-tiny.weights
9390

@@ -107,24 +104,12 @@ There are more pre-trained weights from different data sets reported [here](http
107104

108105
In order to use your own detection objects you need to provide your weights and your cfg file inside the directories:
109106

110-
catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/weights/
111-
catkin_workspace/src/darknet_ros/darknet_ros/yolo_network_config/cfg/
112-
113-
In addition, you need to create your config file for ROS where you define the names of the detection objects. You need to include it inside:
114-
115-
catkin_workspace/src/darknet_ros/darknet_ros/config/
116-
117-
Then in the launch file you have to point to your new config file in the line:
118-
119-
<rosparam command="load" ns="darknet_ros" file="$(find darknet_ros)/config/your_config_file.yaml"/>
107+
colcon_workspace/src/darknet_ros/darknet_ros/yolo_network_config/weights/
108+
colcon_workspace/src/darknet_ros/darknet_ros/yolo_network_config/cfg/
120109

121110
### Unit Tests
122111

123-
Run the unit tests using the [Catkin Command Line Tools](http://catkin-tools.readthedocs.io/en/latest/index.html#)
124-
125-
catkin build darknet_ros --no-deps --verbose --catkin-make-args run_tests
126-
127-
You will see the image above popping up.
112+
** Currently disabled in ROS2 **
128113

129114
## Basic Usage
130115

@@ -142,27 +127,27 @@ You can change the names and other parameters of the publishers, subscribers and
142127

143128
#### Subscribed Topics
144129

145-
* **`/camera_reading`** ([sensor_msgs/Image])
130+
* **`/camera_reading`** ([sensor_msgs/msg/Image])
146131

147132
The camera measurements.
148133

149134
#### Published Topics
150135

151-
* **`object_detector`** ([std_msgs::Int8])
136+
* **`object_detector`** ([std_msgs/msg/Int8])
152137

153138
Publishes the number of detected objects.
154139

155-
* **`bounding_boxes`** ([darknet_ros_msgs::BoundingBoxes])
140+
* **`bounding_boxes`** ([darknet_ros_msgs/msg/BoundingBoxes])
156141

157142
Publishes an array of bounding boxes that gives information of the position and size of the bounding box in pixel coordinates.
158143

159-
* **`detection_image`** ([sensor_msgs::Image])
144+
* **`detection_image`** ([sensor_msgs/msg/Image])
160145

161146
Publishes an image of the detection image including the bounding boxes.
162147

163148
#### Actions
164149

165-
* **`camera_reading`** ([sensor_msgs::Image])
150+
* **`camera_reading`** ([sensor_msgs/msg/Image])
166151

167152
Sends an action with an image and the result is an array of bounding boxes.
168153

0 commit comments

Comments
 (0)