Open KenYN opened 4 years ago
It would seem to be related to this issue:
Sorry to bring up an old question, but does anybody have a solution for the remapping, or is the "out/" the correct way ? When creating an image transport I also get a bunch of "out/*" topics, for example:
ros2 run image_transport republish raw --ros-args --remap in:=/a/image_raw --remap out:=/a/image_comp
ros2 run image_transport republish raw --ros-args --remap in:=/b/image_raw --remap out:=/b/image_comp
Passes out:
/a/image_raw /a/image_comp /b/image_raw /b/image_comp /out/compressed /out/compressed_depth /out/theora
I am using ROS2 Galactic
If the data above is correct, what would be the best way to differentiate between two different input streams, for example a front and a rear camera.
Thanks!
I think I have an "answer", or at least some sort of working usage. When you only pass the ros2 run image_transport republish raw
, you are saying to "read in raw, republish all plugins" (thus all of compressed/depth/theora). It seems like the republish tool wants a --remap
for every applicable out
, e.g. --remap out/compressed:=target/compressed --remap out/compressedDepth:=target/compressedDepth [etc.]
. If the original intention is to not have to be this verbose, it doesn't seem to work that way anymore.
In my particular use-case, I just want the compressed republish, so I've landed on:
ros2 run image_transport republish raw compressed --ros-args --remap in:=/target --remap out/compressed:=/target/compressed`
And wind up with the topics:
/target
/target/compressed
This issue also breaks image_transport camera_pub/sub with std::string info_topic = getCameraInfoTopic(image_topic);
I was hoping that https://github.com/ros-perception/image_common/pull/188 would fix, but testing with that change does not address the issue
I think I have an "answer", or at least some sort of working usage. When you only pass the
ros2 run image_transport republish raw
, you are saying to "read in raw, republish all plugins" (thus all of compressed/depth/theora). It seems like the republish tool wants a--remap
for every applicableout
, e.g.--remap out/compressed:=target/compressed --remap out/compressedDepth:=target/compressedDepth [etc.]
. If the original intention is to not have to be this verbose, it doesn't seem to work that way anymore.In my particular use-case, I just want the compressed republish, so I've landed on:
ros2 run image_transport republish raw compressed --ros-args --remap in:=/target --remap out/compressed:=/target/compressed`
And wind up with the topics:
/target /target/compressed
Thank you the problem of topic is indeed resolved if you put the exact name_space you want to change depending on compression. If using raw input in:=target and if you are using compressed input : in/compressed:=target/compressed. This is also true for out.
I have the latest version installed, and I do the following:
OK, a couple of left-over topics (how do I flush everything out?) but otherwise OK
Oops, I expect to see:
It looks to me like the remapping has not been applied. I see the same problem with
image_transport::create_subscription()
and usingComposableNode(..., remappings=[])
.remappings
works fine, however, when usingrclcpp::Node::create_subscription()
.