-
Notifications
You must be signed in to change notification settings - Fork 2
2. Setting up your environment
Where to find the image bla bla bla TODO!!! Note to self, to install gazebo-classic,
sudo apt remove gz-garden
sudo apt install aptitude
sudo apt autoremove
sudo aptitude install gazebo libgazebo11 libgazebo-dev
We need Gazebo version 11.10.2 running natively, Gazebo is the simulator we use. We will do so by using the Conda package manager.
- Install MiniConda by selecting the right installer for your OS, make sure to check the add to PATH box during the installation to not have to do it manually later
- Open the command prompt
- Search for cmd.exe on Windows
- Search for Terminal on MacOS
- Run
conda install mamba -c conda-forge
conda install git in the prompt
- Mamba is a faster Conda, utilizing multithreading
- Once that's done, run
mamba create -n ros_env python=3.11
mamba activate ros_env- This creates a Conda environment which is self contained, similar to a python venv, named "ros_env"
- Then you run mamba activate to enter said environment
- This should prefix your prompt with "(ros_env)"
- Later you can run
mamba deactivateto exit the environment - More on managing conda environments here
- Run
conda config --env --add channels conda-forge
conda config --env --add channels robostack-staging
conda config --env --remove channels defaults- This ensures packages are installed from conda-forge or robostack-staging
- Install Gazebo 11.10.2 by running
conda install gazebo=11.10.2 - Once the install is done, close your terminal
- From a new terminal, run
mamba activate ros_env, then try runninggazebo --version- This should not throw an error
- Run
gazeboin your terminal, this should open a GUI - Close the GUI (either CTR+C from the terminal or press the x at the top right of the gazebo GUI)
- From the terminal change directory into your home directory
- In Mac and Linux, this can be done with
cd ~ - In Windows,
cd %userprofile%
- Run
cd .gazebo
git clone https://github.com/PX4/PX4-gazebo-models.git- We need the various meshes and scripts inside this repository so that our gazebo client can render the simulation properly
- Move all of the files and folders of the cloned repository to the .gazebo directory
From the docker container, run HEADLESS=1 GAZEBO_IP=$(ip a | grep 'eth0' -A 3 -m 1| grep 'inet' | awk '{print $2}' | awk -F"/" '{print $1}') make px4_sitl gazebo-classic_standard_vtol. From the native environment, open your terminal, activate your conda environment, run gzclient --verbose
We want a way to have our system run the simulation smoothly to make development enjoyable, this requires GPU accelerated graphics. In the case of a graphics card that is within the same chip as the CPU, a virtual machine or WSL should work fine. The issue arises when the computer has a dedicated GPU, thus making it complicated for the simulator to access the GPU from a virtual machine. Without a hypervisor type 1, only one OS can use the GPU at a time, meaning only the host OS uses the GPU, meaning no GPU for our virtual machine. Not to mention that a good proportion of students use mac, so our solution should be OS agnostic.
- Dual booting
- - Non-trivial to set up
- - Not universal, notably, complicated on Mac.
- - Trickier to restart from 0 than virtual machines
- + Bare metal performance
- WSL by itself
- - Requires Windows machine
- - Doesn't work with some GPUs, notably Intel Iris Xe GPU
- + Supports most GPUs
- + As easy to experiment with as any virtual machine, can always scrap it and restart from new
- Virtual machine by itself
- Doesn't work with GPUs at all
- Docker for tool set + Gazebo ignition running natively
- + Can easily share an image with all the tools needed for development
- Supported platforms for gazebo
- - Gazebo's Windows support doesn't include the GUI at the time of writing
- - Untested on Mac
- Docker for tool set + AirSim running natively
- + Can easily share an image with all the tools needed for development
- + Runs on top of Unreal Engine, making it ideal for realistic computer vision
- - AirSim doesn't work on MacOS
- - Microsoft, AirSim's developers, have stopped working on it since 2022
- Colosseum is a successor to AirSim which supports PX4, sadly only for multi rotors as well
- - Only supports PX4 multi rotor, no VTOL
- Docker for tool set + Gazebo-classic
- + Can easily share an image with all the tools needed for development
- - Gazebo-classic is reaching end of life in 2025
- Hopefully by the time it reaches end of life, gazebo ignition will work on more than just linux
- + Easy to setup
- + Uses Conda which is cross-plateform
- + Gazebo classic works on all platforms (supposedly), meaning simulation is running natively