The great advantage of doing Computer Vision in ROS is the fact that we do not have to re-invent the wheel. A lot of third-party software is available, and we can also connect our vision stuff to the real robots or do some simulations. Here, we are going to enumerate interesting Computer Vision tools for the most common visual tasks, but we will only explain in detail one of them later, including all the steps to set it up. We will do it for visual odometry, but other packages are also easy to install and it is also easy to start playing with them; simply follow the tutorials or manuals in the links provided here:
visp_tracker
(moving edge tracker) node as well as visp_auto_tracker
(a model-based tracker). It also helps to calibrate the camera and perform hand-to-eye calibration, which is crucial for visual servoing in grasping tasks.ar_pose
(http://www.ros.org/wiki/ar_pose). It allows us to track single or multiple markers where we can render our virtual imagery (for example, a 3D model).object_recognition
stack, which provides tabletop_object_detector
to detect objects on a table, for example; a more general solution provided by Object Recognition Kitchen (ORK) can be found at http://wg-perception.github.io/object_recognition_core. It is also worth mentioning a tool called RoboEarth (http://www.roboearth.org), which allows you to detect and build 3D models of physical objects and store them in a global database accessible for any robot (or human) worldwide. The models stored can be 2D or 3D and can be used to recognize similar objects and their viewpoint, that is, to identify what the camera/robot is watching. The RoboEarth project is integrated into ROS, and many tutorials are provided to have a running system (http://www.ros.org/wiki/roboearth).libviso2
(http://www.cvlibs.net/software/libviso2.html) and libfovis
(http://www.ros.org/wiki/fovis_ros), both of which have wrappers for ROS. The wrappers just expose these libraries to ROS. They are the viso2
and fovis
stacks respectively. In the next section, we will see how we can do visual odometry with our homemade stereo camera using the viso2_ros
node of viso2
. The libviso2
library allows us to do monocular and stereo visual odometry. However, for monocular odometry, we also need the pitch and heading for the ground plane estimation. You can try the monocular case with one camera and an IMU (see Chapter 4, Using Sensors and Actuators with ROS), but you will always have better results with a good stereo pair, correctly calibrated, as seen so far in this chapter. Finally, libfovis
does not allow the monocular case, but it supports RGBD cameras, such as the Kinect sensor (see Chapter 6, Point Clouds). As regards the stereo case, it is possible to try both libraries and see which one works better in your case. Here, we show a step-by-step tutorial to install and run viso2
in ROS and fovis
with Kinect.