Kickoff Onboarding - Udai A

SFU Robot Soccer Onboarding Task

Welcome to the team! This task will guide you through the initial setup and ensure you can run our software. Each step includes explanations to help you understand its importance.

Task Overview

  1. Set up your development environment.
  2. Install necessary software and dependencies.
  3. Run our software with GrSim.
  4. Create a test pull request (PR).

Video Guide: https://www.youtube.com/watch?v=Pvy4gtnyo7c&list=PLd4oAWnXkwdg3JfzJkQAQhUJwpDu3Fnlb

Because you are part of the Kickoff Program, I highly recommend going through the onboarding with another member beside you, or with a Lead/Head. Please ask any questions about the ticket that you have.

Steps to Complete

0. Preliminary Tasks

  • Learn how to rebase on git. Watch this video, I have found it to be helpful to understand the purpose of rebasing. If you are not comfortable with git, I highly suggest learning how to use it before proceeding.
  • If you are on MacOS - ensure you have the latest version installed.
  • Have basic knowledge of what CMAKE is - we will be showing you how to rebuild the project in this onboarding ticket.

1. Assign and Update the Ticket

  • Assign this ticket to yourself.
    • This helps track who is working on what, ensuring clear responsibility.
  • Move the ticket to "In-progress" on the issue board.
    • Updating the status keeps the team informed of your progress.
  • When your code is ready for review, move the ticket to "Ready for Review" and notify @jonathan.keith.ung (deviazn) and @sus194 (_sukhraj) on Discord.
    • This ensures your work is reviewed promptly and any issues can be addressed quickly.

2. Set Up Ubuntu Environment (If you are on MacOS - SKIP THiS STEP!)

  • Use Ubuntu 22.04 (either installed on your machine or through a VM).
    • Ubuntu 22.04 is our standard environment, ensuring compatibility and minimizing setup issues.
    • VMWare or VirtualBox for Windows works as a VM. Most users pivot towards using WSL.
  • Optionally, you can try another Linux distro, but Ubuntu 22.04/MacOS is recommended.
    • Other environments may work, but Ubuntu 22.04/MacOS has been tested and is known to work with our software.

3. Install GrSim and Build Our Software

  • What is GrSim?
    • GrSim is an open-source simulator for the RoboCup Small Size League (SSL), providing a virtual soccer field to test and develop robot algorithms and strategies. It simulates robot physics, ball interactions, and includes a vision system similar to real matches, enabling teams to refine their control and AI strategies in a controlled environment before using actual hardware.
  • If you have installed Ubuntu 22.04 correctly or have MacOS with Homebrew, you should be able to install everything using the scripts found in the root README.md. Please refer there for install instructions.
  • Instructions to run your specific install of the software can be found in the README.md. I am not putting them here so I can ensure that you have taken a look through the README to ensure that you are able to run the software independently.
  • Follow the installation instructions in the README.md file if something still is not working.
    • The README contains all necessary steps to set up our software correctly.
  • Specifically, install GrSim using the GrSim Install Instructions.
    • GrSim is the simulator our software connects to for testing robotic movements.

More information to run the software can be found in the README. Treat it like the overarching source of knowledge.


4. Verify Installation

  • Run both GrSim and skynet (our software). You should be able to press connect, and then use the WASD-QE+LShift+K + [123456] keys to move the Robots around. The robots should move in both GrSim and skynet.
    • This step confirms that your setup is correct and the software can interact with the simulator as expected.

5. Create changes and rebuild

  • Pull the latest develop branch.

    • Ensures your branch is up-to-date with the latest changes and avoids conflicts.
  • Create a new branch named [ticket_number]-onboarding-[firstname-lastinitial].

    • This naming convention helps identify which ticket and developer the branch belongs to, making tracking and reviews easier.
    • Example: 218-onboarding-JimmyZ
  • Make changes to the src/worldstate/worldstate.cpp file:

    • Find the PARAMETERIZED CONSTRUCTOR for the WorldState Object.
    • Add or uncomment the following line in the code: this->printState();. This can go to the bottom of the constructor, as the last line called.
    • Save your changes.
  • Rebuild the project in the build folder using cmake:

cd ~/SFU_Robot_Soccer/sfurs/software/build
make
  • Rebuilding the project is what will allow you to see the changes in the running app on your end.
  • Ensure the changes you've made are present in the code. Ideally, the WorldState should be flooding the terminal now.

6. Push your initial changes to GitLab

  • Push your changes to GitLab. If you are not sure how to add files, commit, and push changes, LEARN THIS FIRST before proceeding.
  • You may need to configure git-credential-manager or an ssh-key to be able to push without the password prompt each time. Additionally, you are free to fill out the username and password prompt each time. You will find it appear at the top of your IDE if using VSCode, and in your terminal if pushing through the terminal.
  • After pushing your changes to GitLab, you should now be able to access your branch on GitLab and see your changes pushed up. Check GitLab to make sure it went through.

7. Rebasing

  • Ensure your branch is up to date. Since you have just created a feature branch, rebase your branch onto develop.
  • Rebase your feature on top of the develop head. Most likely, you will not see any changes.
  • There is a scenario (and this will happen more likely than not later on) where the develop branch receives feature updates before your branch. It is important to rebase your branch on top of develop so the Software Team Leads do not have to merge your branch each time.
  • Failing to rebase your branch on top of develop will ALMOST ALWAYS result in a denied PR.

8. Doing Pull Requests

  • Create a PR.
    • Creating a PR allows for code review and integration into the main codebase.
    • Your branch should be the source branch, and the develop branch should be the target branch.
  • Assign @jonathan.keith.ung and @sus194 as reviewers.
    • Ensures your PR is reviewed by the team leads who can provide feedback or approval.

9. Review and Feedback

  • Your PR will be reviewed. It will either be accepted or returned with comments for improvement.
    • Code reviews ensure code quality and consistency, and provide opportunities for learning and improvement.

Acceptance Criteria

  • Ubuntu 22.04 or MacOS environment is set up.
  • GrSim and our software are installed and running correctly.
  • A test PR is created and assigned correctly. Branch is rebased, and the correct branch is selected.

If you have any questions, feel free to reach out on Discord in the #development_chat channel!