This bootcamp introduces the most important libraries we use on CWRUbotix MATE ROV:
- Python
- ROS 2
- PyQt
- OpenCV
Bootcamp includes three challenges. The first challenge helps you create a way to control the ROV, and the second two challenges are optional and can be done if you are interested in computer vision and autonomous flight. Challenges 1 and 2 don't require ROS 2 to be installed, and instead use a Python package (called a "test harness") that roughly simulates how ROS works. You'll be able to install the test harness on any operating system. You'll need to install the real ROS 2 at least by the third challenge if you decide to complete Challenge 3. While you're working on bootcamp, start deciding how you'll install ROS using the instructions in our README. After you finish bootcamp, you can install ROS with your chosen installation method. If you have any questions about installation or the challenges, ask them during the in-person meetings or in the Discord.
For this challenge, you'll use Python and the PyQt package to make a Graphical User Interface. It will include buttons which control the robot's thrusters and a video widget to display the stream from the robot's cameras. Once this challenge is done, we'll test all the solutions using our robot simulation on laptops that have ROS.
For this challenge, you'll use the OpenCV package to identify a red button in the frames of video streamed from the robot's forward camera. You'll display an annotated copy of the video on your PyQt GUI as you receive the frames. We'll test solutions to this challenge using the simulation as well.
If you do this challenge, you should have ROS set up. Work on these installation instructions while you're going through Challenges 1 & 2.
For this challenge, you need to act on the button position information you gathered in Challenge 2 by driving the robot toward the button. This is an unsolved problem. We tried one possible solution a few years ago, and it sort of worked, but it wasn't consistant enough. If your solution works well, it could end up in the official codebase if the competition runs this challenge again. We'll test solutions to this challenge in the pool using the actual robot.
- Make a GitHub account.
- Set up a Git client. That could be GitHub Desktop (simpler to start with) or the Git CLI (a little more complicated to set up, but what you will probably be using after bootcamp).
- Give your GitHub username to the software lead so they can add you to the CWRUbotix organization and MATE ROV team.
- Download and install Visual Studio Code (note that Visual Studio is a different thing).
- Check if you already have Python installed by opening your terminal/command prompt/whatever and running:
python3 --version
- Download and install Python 3.12+ if you don't already have a version of Python 3.12 or higher installed.
- Clone the rov-software-bootcamp repo using your Git client.
- If you are using Github Desktop, go to the repository link, click the big
<> Codebutton, clickOpen with Github Desktop App, select where you want it to put the repo on your machine, and click clone. - If you are using the Git CLI, open your terminal in the folder where you want to clone the repo, and run
git clone git@github.com:CWRUbotix/rov-software-bootcamp.git(the git@github.com:CWRUbotix/rov-software-bootcamp.git is found by going to the repo, clicking the<> Codebutton, selecting SSH, and copying the link).
- If you are using Github Desktop, go to the repository link, click the big
- Open the
rov-software-bootcamprepo in VSCode. Go toView > Terminalto open a terminal. Create a virtual environment. This is just an environment to hold all of your dependencies for this project. You can create a virtual environment calledvenvby running:python3 -m venv venv
- Activate your virtual environment.
- Windows command prompt:
venv\Scripts\activate.bat
- Windows powershell:
venv\Scripts\Activate.ps1
- Linux/MacOS:
source venv/bin/activate
- Windows command prompt:
- Now we can install all of our Python packages to the virtual environment, and it will be easy to get rid of them if necessary by just deleting the
venvfolder that was just created. Run the following to install all the dependencies listed in therequirements.txtfile:
pip install -r requirements.txt- Test your installation by running each of thhe following commands in its own terminal. You can open new terminals by clicking the
+button on the top right of the VSCode terminal. Activate the virtual environment in each terminal before running the following commands.
Note: throughout this bootcamp, you should activate the virtual environment for every new terminal or else it will say you are missing imports when you run a command.
python3 bootcamp_harness/rclpy/broker.pypython3 basic_pub_launch.pypython3 basic_sub_launch.py- You should see messages being sent (published) in the
basic_pub_launchterminal, and received in thebasic_sub_launchterminal. - Now take a look at the Challenge 1 instructions to start the first challenge!