Skip to content

1. Setup Instructions

Henry Lefebvre edited this page Aug 24, 2024 · 3 revisions

Environment Setup

Set up Git, Clone the AUV repositories.

  1. First, install git. Instructions for each OS can be found here 1.1 Install git lfs (large file storage) by following instructions here.
  2. Verify the installation was successful by running git --version
  3. Register your GitHub username and e-mail: run git config --global user.name "YOUR_USERNAME" and git config --global user.email "MY_NAME@example.com"
  4. Set up the credentials manager to remember your GitHub username/password: run git config --global credential.helper store
  5. Run git clone https://github.com/mcgill-robotics/AUV-2025.git to clone the repository to your local file system.
  6. Navigate to the cloned repo with cd AUV-2025, then run git pull to get the latest version of the repository.
  7. You will be prompted to enter your GitHub credentials. Since regular passwords have been deprecated, you will need to set up a Personal Access Token on your GitHub account. To do this:
    7.1. Log in to your account on GitHub
    7.2. Click on your profile picture in the top-right, then select "Settings".
    7.3. Scroll down and select "Developer Settings", then "Personal Access Tokens", then "Tokens (classic)"
    7.4. Generate a new classic token, and give yourself all permissions. Once completed, copy the token which is displayed (don't lose this, it will never be showed to you again!)
    7.5 Now, when a git command prompts you for your credentials, use your GitHub username and enter the token you copied as the password.

Setup Docker.

  1. Follow instructions on this wiki page for installing docker https://github.com/mcgill-robotics/AUV-2024/wiki/7.-Docker#how-to-install-docker.
  2. Following instructions on this wiki page for creating a container https://github.com/mcgill-robotics/AUV-2024/wiki/7.-Docker#how-to-launch-a-container.
  3. Install the Docker extension and remote development extensions in vscode.
  4. Click the Docker icon on the side bar in vscode to navigate to the Docker page.
  5. Right click on the running container and click "attach visual studio code" to open a vscode window that is in the docker container.
  6. Open a terminal in the new vscode window, enter the catkin_ws folder, and run catkin build to verify the Docker setup.

Common Errors

  1. "CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool."
    Solution:
    Run: cmake --version. Remember the version returned by this command.
    Run: cd /usr/bin/ && ./cmake --version. Remember the version returned by this command.
    If one any these catkin versions is not 3.16.3, then delete that version. Otherwise, the error is being caused by something else. To delete the cmake version returned by cmake --version navigate to the folder returned by which cmake then do rm cmake. To delete the version returned by cd /usr/bin/ && ./cmake --version navigate to /usr/bin and do rm cmake.
    Finally, run catkin clean from the AUV workspace and try to build again.

Flashing Firmware

If you have an Arduino you can wire it up to emulate the thrusters on the AUV. Upload the binary file by connecting the Arduino via USB (currently hardcoded assumption USB shows up as /dev/ttyACM0) and running the generated make target:

catkin build --no-deps  propulsion --make-args propulsion_embedded_thrusters-upload
catkin build --no-deps  depth_sensor --make-args depth_sensor_embedded_depth_sensor-upload
atkin build --no-deps  imu --make-args imu_embedded_imu-upload