- Basic ROS setup for using https://github.com/ultralytics/ultralytics YOLO models in ROS.
- Create a ROS workspace to install Ultralytics
mkdir yolo_ws cd yolo_ws ros2 pkg create --build-type ament_python yolo_pkg source install/setup.bash PYTHONUSERBASE=$(ros pkg prefix venv_pkg) pip3 install --user --break-system-packages ultralytics
- Create a workspace and clone this repository. Before you build it, source the
yolo_ws
- See https://nu-msr.github.io/ros_notes/ros2/computer_vision.html for more details.
The me495_yolo
package contains one node called yolo
.
- It subscribes to the
image
topic - It outputs the model results on the
new_image
topic - The
model
parameter lets you choose whichever Yolo Model you would like, defaulting toyolo11n.pt