Image visualization
In ROS, we have a node that allows the display of images coming from a camera on-the-fly. This is an example of a topic with complex data, which is better visualized or analyzed with special tools. You only need a camera to do this, such as your laptop webcam. The example8
node implements a basic camera capture program using OpenCV
and ROS bindings to convert cv::Mat
images into ROS Image
messages that can be published in a topic. This node publishes the camera frames in the /camera
topic.
We are only going to run the node with a launch
file created to do so. The code inside the node is still new for the reader, but in the next chapters, we will cover how to work with cameras and images in ROS, so we will be able to come back to this node and understand it:
$ roslaunch chapter3_tutorials example8.launch
Once the node is running, we can list the topics (rostopic list
) and see that the /camera
topic is there. A straightforward way to verify that we are actually capturing...