O'Reilly logo

Learning ROS for Robotics Programming by Enrique Fernández, Aaron Martinez

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Visualization of images

In ROS, we have a node that allows us to show images coming from a camera on the fly. You only need a camera to do this. It is also possible to reproduce a video with a simple node in ROS but here we are going to use your laptop's webcam. The example6 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 upcoming chapters, we will cover how to work with cameras and images in ROS so that we can come back to this node and understand ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required