Chapter 19. Adding a Software Library

A common step in building a robotics application is adding an existing software library that provides an important capability. Depending on your application, you might want to give your robot the ability to recognize certain objects, or detect people, or (as we’ll do in this chapter) speak. There are many good libraries (many of them open source!) out in the world implementing such algorithms that you could use on your robot. Whenever possible, we recommend that you try the existing libraries, especially the ones with strong reputations for reliability and support. While it’s always tempting to build your own, and while in some cases you may eventually end up doing so, you’ll get going more quickly—and learn more about what exactly you need—by starting with an existing system that does most of what you want.

Many libraries that are relevant to robotics have already been integrated with ROS, such as OpenCV, PCL, and MoveIt. These libraries, and the code that makes them easy to use in a ROS-based robot, form a vital part of the overall ROS ecosystem. Much of the value in using ROS is having ready access to the right tools for the job, especially libraries of useful algorithms. Still, you’ll probably find some library that you need but that hasn’t yet been integrated.

In this chapter, we’ll discuss how to integrate an existing software library (whether it’s one that you wrote or a third-party package) with ROS. Between the content of this chapter ...

Get Programming Robots with ROS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.