Skip to Content
ROS Programming: Building Powerful Robots
book

ROS Programming: Building Powerful Robots

by Anil Mahtani, Luis Sanchez, Enrique Fernandez, Aaron Martinez, Lentin Joseph
March 2018
Intermediate to advanced content levelIntermediate to advanced
1396 pages
42h 14m
English
Packt Publishing
Content preview from ROS Programming: Building Powerful Robots

Understanding CMakeLists.txt

The default CMakeLists.txt file made during the creation of the package has to be edited in order to compile the previous source code. Here is the CMakeLists.txt file used to build the face_tracker_node.cpp class.

The first two lines state the minimum version of cmake required to build this package, and next line is the package name:

    cmake_minimum_required(VERSION 2.8.3) 
    project(face_tracker_pkg) 

The following line searches for the dependent packages of face_tracker_pkg and raises an error if it is not found:

    find_package(catkin REQUIRED COMPONENTS 
      cv_bridge 
      image_transport 
      roscpp 
      rospy 
      sensor_msgs 
      std_msgs 
      message_generation 
 
    ) 

This line of code contains the system-level dependencies for building the package: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Robots with ROS

Programming Robots with ROS

Morgan Quigley, Brian Gerkey, William D. Smart
Machine Learning Design Patterns

Machine Learning Design Patterns

Valliappa Lakshmanan, Sara Robinson, Michael Munn

Publisher Resources

ISBN: 9781788627436Supplemental Content