republish image from rospy node to roscpp node
Hi,
I just want to know the right format to republish image data from a python node to a cpp node, because I keep getting an error. My python node is publishing a CompressedImage (from sensormsgs.msg import CompressedImage) where the image data came initially as an array before adding it to a CompressedImage object, then I do republish so that my cpp node can pick it up. The image below shows my "/output/imageraw/compressed1" topic publishing the CompressedImage. The only way my republisher can subscribe is if I use "raw" as my "in_transport," (which I assume is not correct?) otherwise republish does not subscribe.
This is how I call republish from my terminal:
rosrun image_transport republish raw in:=/output/image_raw/compressed1 compressed out:=camera/image_decompressed1
I don't need to publish CompressImage from python specifically. It can be any other way/format (except "theora"), as long as it works.
Thank you for your help! I appreciate it.
Asked by Pototo on 2014-01-20 22:23:22 UTC
Answers
Not sure if I understand your scenario correctly, but you want to 1) subscribe a topic 2) process the topic content 3) republish the modified topic.
Depending on what process you want to add to the topic, you may find topic_tools suitable for your need particularly transform command.
Since image_transport republish provides a way to subscribe to a topic that's being published and republish it, without adding custom processing, that might not help your case.
Asked by 130s on 2018-09-17 20:34:53 UTC
Comments
I do not understand why exactly you would want to republish rather than subscribing directly to the image with your rosccp node? Does your terminal command work and you wish to replace it, or does it not work at all?
Asked by Wolf on 2014-02-11 21:23:04 UTC