Initial setup
-
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 usepyrealsense2
is only available on python 3.11 or older. The guide below applies for Ubuntu 22 and python 3.10. -
Install
distutils
for python :sudo apt-get install python3-distutils
-
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
-
-
Install git.
sudo apt install git
-
Use Git to clone the provided example repository to a directory of your choice:
https://github.com/ut-robotics/picr22-boot-camp-programming -
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 /*
-
Install the required dependencies using pip:
pip install opencv-python pyrealsense2 numpy
-
Familiarise yourself with the provided README file.
-
Compile the segmentation library as by the instructions. Remember that you need python dev tools to compile code (python3-dev and build-essential).
-
Connect a camera and try running the
config_colors.py
andmain.py
files. Both programs can be quit out of by pressingq
when a camera window is active. -
If they work, you can continue to the next step. In case of issues, consult with instructors.