Object Recognition with YOLO [Melodic]
Download package
In ~/catkin_ws/src/, run the below line in the terminal shell to download the package to run YOLO on the R1mini.
sudo git clone --recursive https://github.com/PinkWink/darknet_ros
Next return to ~/catkin_ws and build the workspace.
Next, update the ~/.bashrc file by running the below line in the terminal shell.
source ~/.bashrc
Setup
Next, move to the yolo_network_config/weights folder by entering the below line in the terminal shell.
cd ~/catkin_ws/src/darknet_ros/darkent_ros/yolo_network_config/weights
Then, download the weights for YOLOv3 Tiny by entering the below line in the terminal shell.
sudo wget http://pjereddie.com/media/files/yolov3-tiny.weights
Adjust Camera Settings
Afterwards, run the below line to turn on the camera. The camera needs to be on for us to capture its output rostopic to subscribe to with YOLO.
roslaunch jetson_camera jetson_camera.launch
Next, run the below line to find a list of rostopsics. The topic we are looking for should be called /main_camera/image_raw.

Next, return home and run the below line to enter the launch directory of darknet_ros.
cd catkin_ws/src/darknet_ros/darknet_ros/launch
Run the below line to open darknet_ros.launch in nano.
nano darknet_ros.launch
Next, we edit darknet_ros.launch so that the default for <arg name="image"> continues to run normally. In darknet_ros.launch, change the command at the arrows to reflect the images below.

Run YOLO
To run YOLO, enter the below command into the terminal shell.
roslaunch darknet_ros darknet_ros.launch
To see the visual output from YOLO, run the below command in the terminal shell to open rqt_image_view.
rqt_image_view

Last updated
Was this helpful?