UP | HOME

Custom Workspace

Introduction

  • When you encounter a package released for another ROS distribution but not the one you are on, chances are you can still use it.
  • The ROS API has not changed in a long time
  • The way to use these packages is to build them from source and then source the workspace

General Steps

These steps provide a generic example for how to install a package that is not released for noetic

  1. These steps are for a package called foo
  2. Make a new workspace and clone the repository for foo into ws/src/. The upstream repository is listed on the wiki page
  3. Make sure that you have installed and initialized rosdep

    sudo apt install python3-rosdep
    sudo rosdep init
    rosdep update
    
  4. rosdep is ROS's dependency management tool. It allows ROS packages to depend on libraries and other system dependencies, that is packages that are a part of the operating system and entirely seperate from ROS
  5. From ws/ run rosdep install --from-paths src --ignore-src -y
    • This will attempt to install all the packages dependencies
    • If some dependencies could not be found, you should clone those dependencies into your src/ space and re-run rosdep
  6. catkin_make
  7. Source ws/devel/setup.bash from your .bashrc

Sharing

  1. During this process you may have cloned many repositories
  2. You can use vscstool (sudo apt install python3-vcstool) to easily share these repositories with others
  3. Navigate to ws/src
  4. Run vcs export > myrepos.repo. This creates a file that vcs import can use to clone the same repositories that you have in your workspace. The --exact flag when exporting will even have vcs import cloning the exact commits in your source space

For ME495 in Fall 2020

To MSR students who participated in the hackathon

MoveIT has been released for noetic

sudo apt update
sudo apt upgrade

Remove the source /home/$USER/nuws/devel/setup.bash line that you added for the hackathon.

To Everyone

  1. Install some package sudo apt install ros-noetic-dynamixel-sdk ros-noetic-rviz-visual-tools ros-noetic-openslam-gmapping ros-noetic-turtlebot3-msgs ros-noetic-moveit-ros-planning ros-noetic-ros-control ros-noetic-ros-controllers ros-noetic-moveit ros-noetic-joy
  2. Create a new workspace: mkdir -p nuws/src
  3. cd ~/nuws/src
  4. vcs import --input https://nu-msr.github.io/me495_site/nuws.repo
  5. cd ~/nuws
  6. rosdep install --from-paths src --ignore-src -y
  7. pip3 install modern_robotics
  8. catkin_make
  9. echo "source ~/nuws/devel/setup.bash" >> ~/.bashrc
  10. sudo cp ~/nuws/src/interbotix_ros_arms/interbotix_sdk/10-interbotix-udev.rules /etc/udev/rules.d/
    • Udev rules control actions that occur when devices are plugged into the computer
  11. sudo udevadm control --reload && udevadm trigger
  12. Now all the packages you've compiled will be available.
    • If something goes wrong with compilation, please let me know!

Author: Matthew Elwin.