19.2.8. Install ROS Packages

If you want to install a new package, for example apriltag_ros you can generate a new .rosinstall file and merge it with your current workspace with wstool.

Todo

Updating a catkin workspace were packages have been added this way will not work by following Update Catkin Workspace. We need to find a good solution of keeping track of packages that have been installed by merging a seperate .rosinstall file with wstool.

  1. Change directory

    cd ~/ros_catkin_ws
    
  2. New .rosinstall file

    rosinstall_generator apriltag apriltag_ros > apriltag_ros.rosinstall
    
  3. Merge

    wstool merge -t src apriltag_ros.rosinstall
    
  4. Update

    wstool update -t src
    
  5. Install dependencies

    rosdep install -y --from-paths src --ignore-src -r
    
  6. Build

    sudo catkin build --cmake-args -DCMAKE_BUILD_TYPE=Release