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

Dockerized instances unable to communicate outside of container · Issue #9 · cardboardcode/virtual_camera · GitHub

Dockerized instances unable to communicate outside of container #9

Description

Description 💬

While dockerizing virtual_camera allows the code to be future-proofed, running it the ROS 2 node in a docker currently disallows it from communicating it with ROS systems outside of its container.

This defeats the purpose of dockerizing since virtual_camera would not be able to communicate with any ROS 2 systems when dockerized. Need to address to justify its use in future systems.

Steps To Reproduce 🔨

  1. Download the repository.
cd $HOME
git clone https://github.com/cardboardcode/virtual_camera.git --depth 1
  1. Build the docker image and container
# Build docker image
docker build --tag vcam_image .

# Build docker container
docker run -ti \
--name vcam_test_container \
-v $(pwd):/home/user/virtual_camera \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-u 0  \
 vcam_image:latest /bin/bash

You should now be in the bash shell within the docker container.

  1. Build the package within docker container:
cd virtual_camera
bash scripts/build.bash
  1. Run virtual_camera ROS 2 node within docker container:
cd virtual_camera
bash scripts/run.bash
  1. In host, run showimage ROS 2 node of image_tools package:
source /opt/ros/humble/setup.bash
ros2 run image_tools showimage --ros-args --remap /image:=/virtual_camera/image_raw

Author's Notes: image_tools is a package that exists in ros2/demos

Expected Behaviour 🟢

An image should be displayed in the OpenCV window created by showimage ROS 2 node in host.

Actual Behaviour 🔴

No image was displayed by showimage ROS 2 node in host. When running ros2 topic list in host, unable to properly detect /virtual_camera/image_raw topic in host from container.

Remarks

This is in relation to a past issue the author have investigated before. Should be a quick fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL