Skip to content

Minimalistic example for a ROS package that runs an image processing node in a docker container.

Notifications You must be signed in to change notification settings

RoboSherlock/noetic_im_proc_container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

noetic_im_proc_container

Minimalistic example for a ROS package that runs an image processing node in a docker container. This enables you to run newer versions of ROS and/or python while isolating your dependencies for your image processing modules from the rest of the system.

Usage:

  • Clone this repo into your catkin workspace
  • Compile your catkin workspace
   roscd noetic_im_proc_container
   sudo docker build -t ros_noetic_example .
   sudo docker run --rm -it --network host ros_noetic_example
     or if you want to mount this ros package in the docker container directly (currently preferred)
   sudo docker run -v "$(pwd)":/home/catkin_ws/src/noetic_im_proc_container --rm -it --network host ros_noetic_example
   catkin_make # in the docker container
   source ~/.bashrc # in the docker container
   rosrun noetic_im_proc_container image_service # in the docker container

Testing the service

Basic test node

This package also features a test client which loads a image from the filesystem into a openCV mat and sends it to the service. You can find it in scripts/image_client_py2 and execute it like so:

rosrun noetic_im_proc_container image_client_py2

This script can be run on the host to verify that you can call the service in the docker container.

Topic-based test node

If you want to directly feed a ROS topic stream into the image service, you can find an example client scripts/image_topic_client_py2. This node reads a synchronized RGB and Depth image tuple and sends it to the service. You can use this node if you want to work directly on the camera streams of a robot or a bag file. It can be run with:

rosrun noetic_im_proc_container image_topic_client_py2

Important: If you work with bag files, please check that the type of your image streams is sensor_msgs/Image and not sensor_msgs/CompressedImage. Usually, we record bag files with CompressedImages. In that case, you simply have to execute the following command to convert them:

roslaunch noetic_im_proc_container uncompress_and_throttle.launch 

About

Minimalistic example for a ROS package that runs an image processing node in a docker container.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published