Initial setup

  1. Install Linux to a provided computer. Use the provided USB stick. You should choose the simple install and overwrite any existing OS-es. Use robot for both the username and password. You can use another version of Linux but consider, that a library we use pyrealsense2 is only available on python 3.11 or older. The guide below applies for Ubuntu 22 and python 3.10.

  2. Install distutils for python :

    sudo apt-get install python3-distutils
  3. Install a IDE of your choice. Visual Studio Code or PyCharm are good options. Visual Studio Code can be simply installed from the Ubuntu Software app. Later you might want to install python specific plugins for the IDE as well.

    Some useful plugins:

    • Pylint - for linting your code

    • MyPy - for strict typing in python

    • SonarLint - static code analysis tool to improve code quality

  4. Install git.

    sudo apt install git
  5. Use Git to clone the provided example repository to a directory of your choice:
    https://github.com/ut-robotics/picr22-boot-camp-programming

  6. Set up venv for python. Also familiarize yourself with the commands:

    cd picr22-boot-camp-programming
    sudo apt-get install -y python3-venv
    python -m venv robot_env
    
    # To activate a venv
    source robot_env/bin/activate
    
    # To deactivate the venv
    deactivate
    
    # Do not run this command. It will delete your OS.
    # It is important to read comments
    sudo rm -fr /*
  7. Install the required dependencies using pip:

    pip install opencv-python pyrealsense2 numpy
  8. Familiarise yourself with the provided README file.

  9. Compile the segmentation library as by the instructions. Remember that you need python dev tools to compile code (python3-dev and build-essential).

  10. Connect a camera and try running the config_colors.py and main.py files. Both programs can be quit out of by pressing q when a camera window is active.

  11. If they work, you can continue to the next step. In case of issues, consult with instructors.