FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

cardboardcode/virtual_camera at windows_develop · GitHub

 
 

Repository files navigation

What Is This?

A ROS2 package that simulates a camera, providing ROS messages from playing a static video or image.

Dependencies

  1. OpenCV
  2. ROS2 Rolling Ridley
  3. vision_opencv

Tested on

Setup

This section provides instructions on how to build vision_opencv since the default ROS2 Foxy binary distribution does not automatically provide it.

  1. Build vision_opencv ROS2 package.
mkdir -p c:\vcam_ws\src
cd c:\vcam_ws\src
git clone https://github.com/flynneva/vision_opencv.git --single-branch --branch ros2 --depth 1
git clone https://github.com/cardboardcode/virtual_camera.git --single-branch --branch windows_develop --depth 1
cd c:\vcam_ws\
call c:\opt\ros\rolling\local_setup.bat
colcon build --merge-install
call install\setup.bat
  1. Run the command below.
ros2 launch virtual_camera showimageraw.launch.py
# For running without image-viewer
./scripts/run.sh
# For running with image-viewer
./scripts/show_image.bash

Create A Static Video/Image

# Jump into a folder called data
cd data
# Move your intended video/image into this folder
# Create a symbolic link to video.
mklink <video_file_name> input_data
# Or create a symbolic link to image.
mklink <image_file_name> input_data

If you encounter the error You do not have sufficient privilege to perform this operation., run the above commands in Administrator: Command Prompt.

Control FPS

Run the following command to control the speed of the video

ros2 param set /virtual_camera FPS <an integer>
# Eg. ros2 pararm set /virtual_camera FPS 24

About

A ROS2 package that simulates a camera, providing ROS messages from playing a static video.

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL