UBC-Snowbots / Snowflake

UBC Snowbots Codebase
10 stars 42 forks source link
cpp gazebo ros ubuntu

Snowflake

UBC Snowbots Repository for competitions.

alt tag

Table of Contents

Installation and Setup

You will be downloading an Ubuntu ISO and multiple ROS packages with their respective dependencies. It is highly recommended that you have access to high speed internet while doing this entire setup; if you're on campus use the ubcsecure or resnet networks for best results.

  1. Install Ubuntu 20.04 (Note: Download 20.04, not another version, as other Ubuntu versions will make setting up this repo much more painful) (Backup your important data first) (We recommend you use a minimum of 30GB of space)
  2. If you haven't done so already, setup your UBC email account here
  3. Using your UBC email account, get a JetBrains education account here
    • JetBrains will send an initial email to confirm the UBC email you inputted, once you've confirmed another email will be sent to activate your new education account; you will use this account to set up CLion later on
  4. Boot into Ubuntu for the remaining steps
  5. Install git by running sudo apt-get install git
  6. Fork this repository by heading over to the GitHub page and click the fork button on the top right
  7. Clone your server-side repository from the terminal by running git clone --recursive https://github.com/YOUR_USERNAME/Snowflake.git (YOUR_USERNAME is your github username)
  8. To start the setup run cd ~/Snowflake && ./setup_scripts/install_tools.sh (Do not run this script as root).
    • Just choose yes and enter your password when the terminal prompts you
  9. Run source /opt/ros/noetic/setup.sh.
  10. To build the workspace run catkin_make. If everything compiles correctly and you don't get any errors, then you're good to go!
  11. If catkin_make fails, and mentions missing .cmake files, run ./setup_scripts/install_dependencies.sh.

Important Notes:

Zed Configuration

External Packages

Note: External packages are defined as packages which does not have an installable build from apt.

To manually install external packages using wstool, run wstool set src/external_pkgs/<pkg_name> https://github.com/some_org/<pkg_name>.git --git in the workspace root. The full syntax and options can be found with wstool set -h

To pull in the external package we call wstool update

Note: wstool is addressed and run in install_dependencies.sh, should there be any need to run manual, wstool should be run after all steps from installation and setup has been completed.

Current packages included under wstool:

Nodelets Quick Guide

See here

Tips for New Members

Tutorials and advice for new members.

Terminal

First of all, if you're new to the Ubuntu command line: it is primarily used over the graphical user interface as it allows you to do more.

Github

In case you're new to GitHub, get started with this tutorial

Pretty cool right? Now you're wondering how you can use GitHub from the terminal/command line, it's called Git

Workflow

Now you're wondering how we develop our software, the first place to start is understanding how our workflow works. We use the Forking Workflow, which you can learn more about under Github Conventions in README.md (located in the same directory you opened this readme from) and other important information you should know. If you have questions, you may find your answers over there.

C++

This is the language we use to develop most of our software, so if you are new with C++, understand the fundamentals from this tutorial, but there are much more resources online as well.

ROS

By now you understand the basics of ROS, but to learn more about it, you can complete the intermediate tutorials or brush up on the basics if you need to here

General Advice

Rarely will your Github issues contain all the information that you need to resolve them. Using google to search for that missing piece you need is sometimes useful (think like an optimist when you're understanding/interpreting your project/issue: "If only I knew how to do...", then search "how to do..."), or of course don't hesitate to ask for help, clarification, or just more information from any of the software leads.

Remember it is much better to get help when you're stuck than to waste time trying to figure out what's wrong. This way, you're more or less continuously progressing, and as a whole, we develop efficiently and our software stack progresses.

Conventions

Github Conventions

Pull Requests

Below are some notes we would like to highlight about pull requests:

Coding Conventions

Coordinate Systems

Creating a new node

Creating a new simple node

Launch files

Testing

GTest

Rostest

Simulating with Gazebo

Arduino Development

Intel Realsense

Intel Realsense is a sensor that captures a 3D depth map of the environment in front of the sensor. This 3D depth map is called a point cloud, which is essentially just a list (vector in c++) that contains a bunch of points, where each point contains the x, y, and z coordinates, as well as a color value associated to it.

Debugging Tips