-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Republishing multiple cameras has unexpected results #256
Comments
Reading through the issue, I think I need some bag files so I can debug what's going wrong.
If you can get some bags for me that contain the topics published by the cameras, I think I can dig into how |
I think you might be providing the parameters to the
Despite the warning that this is old remapping syntax, it's how the node wants its parameters. Try these three commands:
|
@gbiggs That looks correct to me. FYI that gscam2 does not use image_transport::CameraPublisher, which might be causing some confusion. https://github.com/ros-drivers/gscam does use image_transport::CameraPublisher. |
So, that was the syntax we used before. Here is the output from the node
So it warns to not use this syntax. Also, with the compressor installed, doing nothing at all, I still get this topic when i launch a camera
terminal 2:
The compressor started automatically. /out is not present. there is no data on the compressed channel because that camera driver doesn't understand that it should start emiting data to the compressor by default. Now, if I run the compressor.
i list topics:
out now exists, as does /out/compressed. /out has no data. /out/compressed does. So does /ueye_cam/driver_facing/compressed Manually running the node started publishing out and outCompressed. Now with gscam.. i had to muddle the config because its a pan to use. Terminal 1
Terminal 2 (no compressor running)
The compressed topic in this case HAS data. If I run the compressor. Terminal 2
Terminal 3 now sees
Notice that out appears again... and out/compressed has data So, if I ran both compressors they would both publish to /out/compressed replicating my issue. |
TLDR: I can replicate the issue using the recommended syntax across two different camera drivers. |
You may want to check out GSCam. It is officially supported and uses image_transport, so it supports compression without using a republish node. The only feature GSCam2 provides that GSCam does not is intra-process communication. It looks like ueye_cam for Foxy also uses image_transport, so it should also support compression without a republish node. |
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 withros2 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
which causes
Problem 3: The
/out
topic exists after remapping and contains ALL camera feedsOnce I run the command above... i get
/out
with the feed of all cameras transmitting simultaneously. This affectsros bag -a
because it will subscribe to an extremely large and non-nonsensical camera topic.The text was updated successfully, but these errors were encountered: