ros-perception / ros-perception/image_common

Republishing multiple cameras has unexpected results

Open
#256 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
153
Forks
253
Avg merge
5m
Merged PRs (30d)
1

Description

This issue is probably a few separate issues and can be cleaned up, but I need to get the facts down and we can create smaller issues from this one.

Setup:
Foxy on ubuntu, latest apt packages
3 cameras:

My desire is to run a single compressor if possible which remaps the /cameraX/image_raw to its compressed version automatically without complex topic remapping.

I have 3 problems which manifest in strange ways depending on my configuration.

Problem 1: image_republish doesn't detect that gscam cameras are the kinds of things it can compress automatically
If i run with ros2 run image_transport republish raw, Camera1 and Camera2 get the correct new topics (they don;t work but they get the correct remapping, see below). However, Camera3 does not. It is as if image_transport does not recognize that it can compress the gscamera feed? So, I run 2 compressors, one with no args and one with ros2 run image_transport republish raw --ros-args -r in:=/camera3/image_raw -r out/compressed:=/camera3/image_raw/compressed

Which leads to

Problem 2: either image_transport doesn't forward its "subscription" or the camera driver ueye_cam reads its subscribers wrong. Basically, if only the raw compressor is running, the driver never turns on the camera. I think this may be related to these issues:

So, with default node... i get the right topic but no data in them since the camera doesn't know it has a subscriber.

Basically, I cannot use the default. So I run 3 compressors

ros2 run image_transport republish raw  --ros-args -r in:=/camera1/image_raw -r out/compressed:=/camera1/image_raw/compressed
ros2 run image_transport republish raw  --ros-args -r in:=/camera2/image_raw -r out/compressed:=/camera2/image_raw/compressed
ros2 run image_transport republish raw  --ros-args -r in:=/camera3/image_raw -r out/compressed:=/camera3/image_raw/compressed

which causes

Problem 3: The /out topic exists after remapping and contains ALL camera feeds

Once I run the command above... i get /out with the feed of all cameras transmitting simultaneously. This affects ros bag -a because it will subscribe to an extremely large and non-nonsensical camera topic.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the three cases with the listed image_transport republish commands under Foxy on Ubuntu, using the ueye_cam and gscam2 camera setups. Compare the discovered input and output topics with subscriber behavior, then split the findings into focused issues; done means each behavior has a confirmed scope and an independently testable expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, ubuntu
Domain
robotics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.