We have followed the instructions provided on Flightmare installation guide:
Flightmare relies on several essential system packages to function optimally. These packages include:
- CMake: Flightmare utilizes CMake as a build system generator. CMake simplifies the process of building Flightmare components by automating the generation of build files for various platforms and compilers.
To install CMake, the following commands were run:
sudo apt-get update
sudo apt-get install -y cmake
Installation was successful and the below messages were observed on the terminal:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
cmake is already the newest version (3.22.1-1ubuntu1.22.04.2).
cmake set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 70 not upgraded.
To Verify that CMake is installed correctly, its version is checked:
cmake --version
An the version was displayed as below:
cmake --version
cmake version 3.16.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
- GCC Compiler: Flightmare requires the GNU Compiler Collection (GCC) compiler for compiling source code into executable binaries. GCC is a crucial tool for translating Flightmare's source code into machine-readable instructions.
To install GCC compiler, the following commands were run:
sudo apt-get install -y --no-install-recommends build-essential
Installation was successful and the below messages were observed on the terminal:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
build-essential set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 70 not upgraded.
To make sure that GCC compiler is installed correctly, its version is checked:
gcc --version
An the version was displayed as below:
gcc (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- Python 3: Flightmare relies on Python 3 for running its scripts and executing various simulation tasks. Python 3 provides a versatile and easy-to-use programming environment, essential for interfacing with Flightmare and performing simulation-related operations.
To install Python 3 along with its dependencies, the following commands were run:
sudo apt-get install -y --no-install-recommends python3
Because Python had already been installed, the below messages were observed on the terminal:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3 is already the newest version (3.10.6-1~22.04).
0 upgraded, 0 newly installed, 0 to remove and 70 not upgraded.
- OpenMPI: Flightmare leverages OpenMPI for parallel computing tasks. OpenMPI enables Flightmare to efficiently distribute simulation workload across multiple processors or nodes, enhancing performance and scalability. To install OpenMPI, the following commands were run:
sudo apt-get update
sudo apt-get install -y --no-install-recommends \libopenmpi-dev
Installation was successful and the below messages were observed on the terminal:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libopenmpi-dev is already the newest version (4.1.2-2ubuntu1).
libopenmpi-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 70 not upgraded.
- OpenCV: Flightmare incorporates OpenCV for computer vision tasks within its simulation environment. OpenCV provides robust functionality for image processing and analysis, enabling Flightmare to interact with visual data effectively.
To install OpenCV, the following commands were run:
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libopencv-dev
Installation was successful and the below messages were observed on the terminal:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libopencv-dev is already the newest version (4.5.4+dfsg-9ubuntu4).
libopencv-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 70 not upgraded.
- ZeroMQ: Flightmare relies on ZeroMQ development librariesfor message passing between components. To install ZeroMQ development libraries along with their dependencies, the following commands were run:
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libzmqpp-dev
An issue was faced when trying to install ZeroMQ:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libzmqpp-dev
Checked if the package is available under a different name or in a different repository. Searched for packages using the following command:
apt-cache search libzmq
The following messages were returned on the terminal:
libjeromq-java - Java implementation of the ZeroMQ messaging library
libzmq-ffi-perl - version agnostic Perl bindings for zeromq using ffi
libzmq-java - ZeroMQ Java bindings (jzmq)
libzmq-java-doc - Documentation for ZeroMQ Java bindings (jzmq)
libzmq-jni - ZeroMQ Java bindings (jzmq)
libzmq3-dev - lightweight messaging kernel (development files)
libzmq5 - lightweight messaging kernel (shared library)
From the messages above, it could be inferred that the package libzmq3-dev provides development files for the ZeroMQ messaging library, which was what was needed. It was installed running the following command:
sudo apt-get install libzmq3-dev
The package libzmq3-dev was installed successfully and the following meaasges were returned:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libzmq3-dev is already the newest version (4.3.4-2).
libzmq3-dev set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 70 not upgraded.
- octomap ros
sudo apt-get install ros-noetic-octomap
We have followed the instruction given on (ROS WIKI)[/http://wiki.ros.org/noetic/Installation/Ubuntu].
- Setup your sources.list
Setup your computer to accept software from packages.ros.org.
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
- Set up your keys
sudo apt install curl # if you haven't already installed curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
- Installation First, make sure your Debian package index is up-to-date:
sudo apt update
- Desktop-Full Install:Everything in Desktop plus 2D/3D simulators and 2D/3D perception packages.
sudo apt install ros-noetic-desktop-full
- Environment Setup You must source this script in every bash terminal you use ROS in.
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
- Installing Dependences Install system and ROS dependencies.
sudo apt-get install libgoogle-glog-dev protobuf-compiler ros-$ROS_DISTRO-octomap-msgs ros-$ROS_DISTRO-octomap-ros ros-$ROS_DISTRO-joy python3-wcstool
Before creating a catkin workspace its advisable to install catkin tools
sudo apt-get install python-pip
sudo pip install catkin-tools
- Catkin Workspace
cd
mkdir -p catkin_ws/src
cd catkin_ws
catkin config --init --mkdirs --extend /opt/ros/$ROS_DISTRO --merge-devel --cmake-args -DCMAKE_BUILD_TYPE=Release
- Clone the repository
cd ~/catkin_ws/src git clone https://github.com/uzh-rpg/flightmare.git
- Clone dependencies
vcs-import < flightmare/flightros/dependencies.yaml
- Building Worksapce
If in case catkin build is fails ----> There is a higher chance of problem of with ROS installation try to completly remove ROS and install it again
catkin build
- Add sourcing of your catkin workspace and FLIGHTMARE_PATH environment variable to your .bashrc file:
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc echo "export FLIGHTMARE_PATH=~/catkin_ws/src/flightmare" >> ~/.bashrc source ~/.bashrc
- Adding Unity to Flightmare Download the Flightmare Unity Binary RPG_Flightmare.tar.xz for rendering from the Releases and extract it into the /path/to/flightmare/flightrender.