is there a way for rviz to subscribe to topic of message typ sensor_msgs::ImagePtr?
For image, I know that the Image Topic must be of type sensor_msgs::Image, but is there any feature in Rviz that would subscribe to any topic whose message type is sensor_msgs::ImagePtr?
Edit: @gvdhoorn I have ELP Camera usb-connected to Jetson TX1, and there is the package that publishes the video feed. And I want my laptop, which is connected to the Jetson via Ethernet crossover cable, to subscribe the video feed data (whether it is sensor_msgs::Image
or sensor_msgs::ImagePtr
) through Rviz. My old code published the data of type sensor_msgs::Image
but for some reason, Rviz stopped when I added the topic for video feed, and I had to restart it. Any techniques as to how I should handle this?
Afaik
ImagePtr
is not a message type insensor_msgs
. It is only a type in the C++ code that gets generated bygencpp
and then used in nodes that subscribe tosensor_msgs/Image
. What are you trying to do exactly?Publishing video/frames of a video could probably be done using
sensor_msgs/Image
directly but should preferably be done using image_transport. In all cases you wouldn't be publishing aImagePtr
, but anImage
msg.I see. Thanks for your help. So my next question is whether there has ever been a project that remotely transmits video feed from a device A to a device B using ROS.
Sure. All the time. It's not going to be the most efficient way to do it with
sensor_msgs/Image
, but it can be done.Why do you ask?
I tried to find any example projects like that, and I couldn't. I tried to do this myself using all available sources, and I'm still stuck.
Wouldn't just about every camera driver do that?
What about the image_transport/Tutorials?
I thought so. But I guess, unlike mine, most camera-related projects I have examined are based on a single machine, so no one has ever experimented it in an environment with multiple connected machines. I should try with
sensor_msgs::Compressed
, which no one has ever tried with.I'm rather confused: ROS is supposed to make multi-machine networks transparent and using a compressed transport with
image_transport
is also transparent to the node (ie configured outside the node).Can you describe what makes your 'multi machine' setup different / difficult?