Skip to content

Developer Setup

iris-uiuc edited this page Mar 23, 2022 · 16 revisions

Developer Setup for IRIS

Update: Download our dropbox vm with everything pre-installed if you want to skip most of these steps

Installing Linux

  • Option 1(simplest): Use Virtualbox or VMWare
  • Option 2(tricky): Dual boot into Ubuntu

Installing required software

  • ROS2 Galactic for Ubuntu: Install ROS 2 via Debian Packages

  • git, a version control system: Install Git

    • Use a Personal Access Token(PAT) for Authorization
      • git config --global credential.helper cache
      • Go to Github->Settings->Developer Settings->Personal Access Tokens
      • When you git push/clone/pull on private repo, type in your github username then paste your PAT for the paswword
    • OR Create and add SSH Key
  • colcon, the ROS2 build tool: sudo apt install python3-colcon-common-extensions

  • rosdep, the ROS dependency management tool:

    • Install: sudo apt-get install python3-rosdep
    • Initialize with: sudo rosdep init && rosdep update
  • (Optional) VSCode

    • Download .deb file
    • Double click on the downloaded file and select install from the ubuntu software pop up window
    • Typing code . in the terminal will open vscode in your current folder directory

Environment Setup

  • ~/.bashrc Updates so you don't have to source setup files each time
    • Adding setup script for apt-installed ROS packages:
      echo 'source /opt/ros/galactic/setup.bash' >> ~/.bashrc
    • Adding setup script for custom ROS packages in your colcon workspace:
      echo 'source ~/colcon_ws/install/setup.bash' >> ~/.bashrc
      Note: You will still have to source the install/setup.bash script each time you build to ensure the package is updated
    • Making it easier to colcon build and source ./install/setup.bash with a custom bash function
      function build() {
      if [ $# == 0 ]; then
        echo "colcon build"
        colcon build
      else 
         echo "colcon build --packages-select" $@
        colcon build --packages-select $@
      fi
      echo "Sourcing install/setup.bash"
      source ./install/setup.bash
      }
      
      • Usage when inside a colcon workspace
        • buildcolcon build
        • build <pkg_names>colcon build --packages_select <pkg_names>