No image display window in cv_bridge tutorial. (Does compressed image matter?
Hi,
I'm following the cv_bridge tutorial
The code is correct(I just copy the code and change the topic name to mine /camera/image
), also modified the CMakeLists.xml.
The catkin_build is successful without error.
But when I run the node, there is nothing showed up.
The node should run up successfully because new topics show up.
/camera/camera_info
/camera/image
/camera/image/compressed
/image_converter/output_video
/image_converter/output_video/compressed
/image_converter/output_video/compressed/parameter_descriptions
/image_converter/output_video/compressed/parameter_updates
/image_converter/output_video/compressedDepth
/image_converter/output_video/compressedDepth/parameter_descriptions
/image_converter/output_video/compressedDepth/parameter_updates
/image_converter/output_video/theora
/image_converter/output_video/theora/parameter_descriptions
/image_converter/output_video/theora/parameter_updates
/rosout
/rosout_agg
Also I can view the image using image_view
rosrun image_view image_view image:=/camera/image _image_transport:=compressed
I'm afraid maybe the compressed video matters so I change add the command when running:
$ rosparam set /compressed_listener/image_transport compressed
$ rosrun mypackage mynode __name:=compressed_listener
http://wiki.ros.org/image_transport/T...
But still no display window...
Thanks
Are any images published on the /image_converter/output_video topic? You should be able to verify that images are being published with
or@ahendrix nothing... I ran `rostopic echo /image_converter/output_video` but got nothing. I think the subscribe of video topic failed.
I guess maybe the image_transport matters because when I subscribe I just use the code `image_sub_ = it_.subscribe("/camera/image", 1, &ImageConverter::imageCb, this);` while for image_view, I need to set `_image_transport=compressed` to see the video. But I don't know what to change here...
@ahendrix Thanks so much! it works, but could you teach me how to find the parameter need to remap? first I searched the source and wiki of image_transport and cv_bridge with key work`compressed`, but I got nothing... I really want to know how to get the answer when I face that kind of problem
to be honest, I'm not sure what the appropriate parameter to change here is. I suspect it's namespaced to the topic name, but I'd have to read the source for image_transport to really understand it.
@ahendrix Thanks again, I read the document again and now I can understand it much better. Also, could you convert it into the answer so I can mark it as the correct one.