Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Typical workflows

gcielniak edited this page Nov 22, 2022 · 12 revisions

Create a fresh workspace

  1. decide where you want your workspace, e.g. in ~/CMP9767M_ws
  2. create the workspace and the src/ directory within in one go: mkdir -p ~/CMP9767M_ws/src
  3. go to the source directory: cd ~/CMP9767M_ws/src
  4. update system sudo apt-get update && sudo apt-get upgrade
  5. install all dependencies: rosdep install --from-paths . -i -y
  6. clone any repository you want to use: git clone https://github.com/YOURNAME/CMP9767M.git
  7. go to your local cloned repository (cd ~/CMP9767M_ws/src/CMP9767M) and configure git:
    1. git config credential.helper cache (avoids retyping password again and again)
    2. git config user.name "YOUR NAME"
    3. git config user.email "12345678@students.lincoln.ac.uk" (replace with your ID)
  8. go to the top-level dir of the workspace: cd ~/CMP9767M_ws and invoke catkin_make
  9. source the workspace: source devel/setup.bash

Update from upstream

  1. go to the checked out source dir: cd ~/CMP9767M_ws/src/CMP9767M
  2. add the upstream remote git remote add upstream https://github.com/LCAS/CMP9767M.git
  3. update from upstream: git pull upstream master

Create a branch from master

  1. make sure you are on master: git checkout master
  2. create a new feature branch: git checkout -b NEW_FEATURE (replace NEW_FEATURE with a meaningful name)
  3. do some work and make commits...
  4. push the new branch to your GitHub repository: git push -u origin NEW_FEATURE

Troubleshooting

  • Make sure the outdated gazebo is removed: sudo apt-get purge ros-noetic-gazebo-*

Clone this wiki locally