Skip to Content
Hands-On ROS for Robotics Programming
book

Hands-On ROS for Robotics Programming

by Bernardo Ronquillo Japón
February 2020
Intermediate to advanced
432 pages
10h 50m
English
Packt Publishing
Content preview from Hands-On ROS for Robotics Programming

Setting up the workspace

To start using contributed ROS packages or to create your own, you will need to have a workspace in which to put the code. The step-by-step procedure to accomplish such a task is as follows:

  1. From a bash terminal, create a folder and initialize the workspace:
$ mkdir -p ~/catkin_ws/src$ cd ~/catkin_ws/src$ catkin_init_workspace

The initialization is as simple as creating a symlink to a file definition located in the ROS installation folder. If you list files in the src folder, then you will see the new CMakeLists.txt file pointing to /opt/ros/melodic/share/catkin/cmake/toplevel.cmake:

$ ls -la... CMakeLists.txt -> /opt/ros/melodic/share/catkin/cmake/toplevel.cmake
  1. Next, build the workspace:
$ cd ~/catkin_ws$ catkin_make ...
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

Mastering ROS for Robotics Programming

Mastering ROS for Robotics Programming

Lentin Joseph
ROS Robotics By Example - Second Edition

ROS Robotics By Example - Second Edition

Lentin Joseph, Carol Fairchild, Dr. Thomas L. Harman

Publisher Resources

ISBN: 9781838551308Supplemental Content