Home

Awesome

YouTube-publisher-ROS2

Publish sensor_msgs/Image by "YouTube" :hugs: :hugs: :hugs: !

You don't have to use webcamera or your video to check demos.

youtube-pub

Purpose

Requirements

Installation

mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
git clone https://github.com/Ar-Ray-code/YouTube-publisher-ROS2.git
pip3 install -r YouTube-publisher-ROS2/requirements.txt
cd ~/ros2_ws
colcon build --symlink-install

Demo with YOLOX-ROS

Build

# YOLOX installation
cd ~/Documents/
git clone --recursive https://github.com/Megvii-BaseDetection/YOLOX
cd ~/Documents/YOLOX
pip3 install -U pip && pip3 install -r requirements.txt
pip3 install -v -e .  # or  python3 setup.py develop
pip3 install cython; pip3 install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'

# ROS2 Installation
cd ~/ros2_ws/src

git clone https://github.com/Ar-Ray-code/YouTube-publisher-ROS2.git
git clone https://github.com/Ar-Ray-code/YOLOX-ROS.git --recursive
pip3 install -r YouTube-publisher-ROS2/requirements.txt

cd ~/ros2_ws
colcon build --symlink-install

Run

ros2 launch youtube_publisher youtube_publisher_yolox.launch.py

youtube-yolox

Parameter

Look the launch.py file !

	youtube = launch_ros.actions.Node(
        package='youtube_publisher', executable='youtube_pub',
        parameters=[
            {'topic_name': '/image_raw'},
            {'cache_path': youtube_publisher_share_dir + '/cache'},
            {'video_url' : 'https://youtu.be/CFLOiR2EbKM'},
            {'using_youtube_dl' : True},
            {'clear_cache_force' : False},
            {'width' : 854},
            {'height' : 480},
            {'speed' : 1.0},
            {'imshow_is_show' : True}
        ],
    )

About author