Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Python video streamer or camera simulator in ROS2

License

Notifications You must be signed in to change notification settings

Sky360-Repository/ros2_video_streamer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS2 Video Streamer

A ROS2 python node for streaming video files or stream images in a folder to a topic.

Used as a camera simulator if you have pre-recorded video you want to stream, or if you have a dataset of video frames as images, that you want to replay.

Features:

  • Stream images from folder
  • Stream video from path
  • Supply camera calibration file for camera or images to publish camera_info.

This is a work in progress.

Install

Install extra dependencies

Ubuntu/Debian

apt update -y
apt install -y python3-natsort  # Installing natsort (is not in rosdep)

Install other dependencies and build

rosdep install -i --from-path . -y
colcon build --symlink-install

source ./install/setup.bash

Usage

Make sure to activate the workspace where vision_opencv is first.

Run a video file

ros2 run camera_simulator camera_simulator --type video --path <my-video-path> --loop

Run a KITTI dataset folder

If for some reason you do not have a bag file of CameraInfo (camera calibration information) and images, what this app can do is simulate this

ros2 run camera_simulator camera_simulator --type image --path <image-folder-path> --calibration_file <calibration-path>

In the data folder you'll find some examples of this, calibration configuration sample file (converted to ROS2 calibration file from 2009_09_08_calib.txt for the left camera (camera 1)) and some images. Start up image_proc as you would to rectify your images and you should be good to go.

Testing visualization of codebase

Link to visualization

About

Python video streamer or camera simulator in ROS2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%