ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I figured it out and I think this should be better explained, one parameter was missing in the subscriber in the server, image_sub_ = it_.subscribe("/camera/image", 1,
&ImageConverter::imageCb, this, image_transport::TransportHints("compressed"));
which this part: image_transport::TransportHints("compressed")
is important to make they both (publisher and subscriber) interact with compressed image. I was trying to figure out the problem and messed up the code which I managed to go back to what is in the tutorial, more or less. There is a problem in the tutorial of publishing image with RosLibJs because that method of get the camera is deprecated, as I could se, as well as the method of closing and releasing it.