-
Notifications
You must be signed in to change notification settings - Fork 2
Environment Setup
This page contains instructions for setting up your environment to run our software. First things first, you must install Ubuntu 22.04. There are a few options depending on your host system's operating system and personal preference. If you already have Ubuntu installed in some capacity, skip to Setting up the Codebase.
This is the best long-term solution for running software based on ROS. It requires a bit of bravery, but the pay-off is tremendous. Below are step-by-step instructions for safely installing Ubuntu 22.04 alongside your Windows installation.
- Ensure your computer has space.
- On Windows, use Windows OS Search (Windows + S shortcut) to search up ("Create and format hard disk partitions"). Open this application.
- Make sure that there is at least 100GB of "Unallocated" storage (or more if you wish).
- If not, then right click on your Windows partition (typically named "OS(C:)") and click "Shrink Volume...". This will allow you to free up some space (preferably 102400 MB). Once this is done, you should have enough free space to dual boot.
- Disable encryption features. Some computers have security features that prevent your from installing Ubuntu. One such feature is BitLocker. Follow this article to disable it: https://www.asus.com/support/faq/1047461/. Please let us know if this link stops working.
- Access your computer's BIOS. First, your need to figure out your computer's BIOS key. The best way to do this is to search "Computer Model BIOS key" in Google. Make sure to replace Computer Model with you're computer's model. Once you know the BIOS key, simply restart your computer and repeatedly press the BIOS key during startup.
- Disable Secure boot Most computers have a setting in BIOS that will allow you to disable this feature, you just have to find it. For example, in ASUS computers, the setting is typically found in Advanced Settings -> Boot -> Secure Boot. You will probably have to look around a bit in BIOS to find the setting; just make sure to disable it and save your changes.
For this step, you will need a USB stick with at least 8 GB storage. Note that the contents of the USB will be erased in the process.
- Download the Ubuntu 22.04 LTS ISO file. The required ISO file can be downloaded by clicking 64-bit PC (AMD64) desktop image. If this link does not work, the official Ubuntu download site can be found here.
- Flash the USB stick. Follow this link to flash the USB with the downloaded ISO file. These instructions should work for both WIndows and MacOS.
Great! You now have a Ubuntu boot stick that is ready to use.
Congratulations! You have now dual booted Ubuntu 22.04 and Windows. Let's get Ubuntu connected to eduroam
. First, click the top-right corner of Ubuntu. You should see "Wifi" in the dropdown.
Follow these steps to setup ROS and our codebase correctly on your new system.
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo apt update && sudo apt install curl gnupg lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
sudo apt update
sudo apt upgrade
sudo apt install ros-humble-desktop-full
sudo apt install python3-colcon-common-extensions
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
echo "source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash" >> ~/.bashrc
echo "source /usr/share/gazebo/setup.sh" >> ~/.bashrc
source ~/.bashrc
cd <path to where you want to keep the project>
mkdir urc && cd urc
Both the rover and the drone projects will live in the /urc
directory. The install process for both projects is very similar and detailed below.
mkdir -p rover-colcon/src
cd rover-colcon
git clone https://github.com/RoboJackets/urc-software.git src --recursive
Make sure to call the rosdep install
command from the colcon workspace directory (/rover-colcon
)!
sudo apt install python3-rosdep
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -r -y
Any time you call colcon build
, make sure you are in the colcon directory (/rover-colcon
)!
colcon build --symlink-install
. install/setup.bash
You should now have a file structure that looks like
urc
└── rover-colcon
├── build
├── install
├── log
└── src
└── urc-software
- Install terminator (
sudo apt install terminator
).- Right click the terminator terminal -> Preferences -> Keybindings for some cool new keybindings! Make sure to take advantage of split_horizontal and split_vertical for having multiple terminals in one screen easily.
- Install NeoVim (https://github.com/neovim/neovim/blob/master/INSTALL.md) and afterwards, install AstroNVim (https://docs.astronvim.com/). Watch some tutorials on NeoVim to learn how to view and edit your code very quickly!
- Edit your
~/.bashrc
file (vim ~/.bashrc
or open it in another editor). This script is automatically run whenever you open a new terminal. You can add aliases for commands, source repositories automatically, or anything else you want!
Have questions? Post them in the #robonav-software-help channel.