Creating a shared catkin workspace, that way we're all on the same dependencies and running the same launch files.
Since this workspace already sets up the agile autonomy repo, we only have to run a subset of their installation instructions.
This workspace has been tested with Ubuntu 20.04, Open3D 0.18.0, RTX 4090, GTX 980, cuda 11.2, and cuda 12.2.
The code was tested with Ubuntu 20.04, ROS Noetic, Anaconda v4.8.3., and gcc/g++
7.5.0.
Different OS and ROS versions are possible but not supported.
Before you start, make sure that your compiler versions match gcc/g++
7.5.0. To do so, use the following commands:
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 100
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 100
You might need to install gcc/g++
7.5.0 first.
sudo apt install build-essential
sudo apt -y install gcc-7 g++-7
Use the following commands to create a new catkin workspace and a virtual environment with all the required dependencies.
cd agile_autonomy_ws
git submodule update --init --recursive
#install extra dependencies (might need more depending on your OS)
sudo apt-get install libqglviewer-dev-qt5 libfmt-dev
# Install external libraries for rpg_flightmare
sudo apt install -y libzmqpp-dev libeigen3-dev libglfw3-dev libglm-dev
# Install dependencies for rpg_flightmare renderer
sudo apt install -y libvulkan1 vulkan-utils gdb
# Add environment variables (Careful! Modify path according to your local setup)
echo 'export RPGQ_PARAM_DIR=/home/<path/to/>agile_autonomy_ws/catkin_aa/src/rpg_flightmare' >> ~/.bashrc
I was able
Follow the instructions here to build open3d from source, as there's no apt install for the cpp library.
Open3d requires cmake --verison
> 3.19. So run the steps here before building open3d.
Note the authors test with open3d 0.9.0 (this tag), but it seems to work fine with version 0.18.0.
Install other dependencies not listed in the original installation guide
sudo apt-get install libsdl-image1.2-dev
sudo apt-get install libsdl-dev
sudo apt-get install ros-noetic-mavros
sudo apt-get install libsdl-dev libsdl-image1.2-dev ros-noetic-octomap ros-noetic-octomap-msgs ros-noetic-octomap-ros
sudo apt-get install ros-noetic-joy
sudo apt install net-tools
Now open a new terminal and type the following commands.
# Build and re-source the workspace
cd agile_autonomy_ws/catkin_aa
catkin build --cmake-args -DCMAKE_CXX_STANDARD=17 -DPYTHON_EXECUTABLE=/usr/bin/python3
source devel/setup.bash
# Create your learning environment
roscd planner_learning
conda create --name tf_24 python=3.7.7
conda activate tf_24
conda install cudatoolkit=11.1 -c conda-forge
conda install cudnn -c conda-forge
pip install tensorflow-gpu==2.4
pip install rospkg==1.2.3 pyquaternion open3d opencv-python
# Install other dependencies not listed in the original installation guide
pip install defusedxml PySide2
Now download the flightmare standalone available at this link, extract it and put in the catkin_aa/src/rpg_flightmare/flightrender
folder.
See the README in catkin_aa/src/agile_autonomy
- Issue: Unable to find either executable 'empy' or Python module 'em'
- Fix: Caused by running catkin build inside a conda environment. Deactivate the environment and catkin clean github issue.
- Issue: Segmentation fault when running
python train.py --settings_file=config/train_settings.yaml
. Same error as github issue- Use conda 11.1 in the virtual envrionment github issue
- Issue: hummingbird/rqt_quad_gui process dies (ValueError: bad marshal data) when running
roslaunch agile_autonomy simulation.launch
.- Fix: Don't run the launchfile from a conda envrionment
conda deactivate
.
- Fix: Don't run the launchfile from a conda envrionment
- Issue: no kernel image is available for execution on the device 209
- Fix: Add
-gencode=arch=compute_89,code=sm_89
to CMakeLists then catkin clean and rebuild. Replace 89 with the compute capability of your GPU capability table. This might require updating cudatoolkit to most recent cuda version supported bynvidia-smi
.
- Fix: Add
- Issue: catkin build issues with open3d and rviz
- Fix: github issue
- Issue: simulator process dying when running
roslaunch agile_autonomy simulation.launch
- Fix: github issue
- Issue: Crawling for plugins of type 'qt_gui'. Value error: bad marshal data (unknown type code).
- Fix: Ron't run roslaunch with conda environments activated.
conda deactivate
.
- Fix: Ron't run roslaunch with conda environments activated.
- Issue: error
zmq.error.ZQMError Address already in use
- Fix: stackoverflow solution
sudo netstat -ltnp kill -9 <pid>
- Fix: stackoverflow solution
- Issue: bad callback on running test script
- Fix: github issue