Skip to content

Installation

HuanNguyenARL edited this page Sep 27, 2023 · 6 revisions

This page will provide the instructions to set up a workspace to run the ORACLE family of methods in simulation.

These instructions assume that ROS desktop-full of the appropriate ROS distro is installed. The code was tested with Ubuntu 18.04 + ROS Melodic and Ubuntu 20.04 + ROS Noetic. Different OS and ROS versions are possible but not officially supported.

Setup simulation environment

Follow the instructions here: LMF_sim to set up the simulation workspace.

Install NVIDIA software

You also need to install the NVIDIA GPU driver, CUDA toolkit, and cudnn to run Tensorflow on NVIDIA GPU. A typical procedure to install them can be found in Link, please note that the exact versions may vary depending on your system.

Create Anaconda virtual environment

Additionally, create a conda environment:

# Follow the below procedure if you have CUDA 11
conda create -n oracle_env python=3.8 libffi=3.3
conda activate oracle_env
cd lmf_sim_ws/src/planning/ORACLE/
pip install -r requirements_cuda11.txt 

# OR follow the below procedure if you have CUDA 10.1 - cudnn 7.6
conda create -n oracle_env python=3.7 libffi=3.3
conda activate oracle_env
cd lmf_sim_ws/src/planning/ORACLE/
pip install -r requirements_cuda10_1.txt 

Note: It's ok if you receive some error messages related to pip dependency for open3d, ray, stable-baselines3

If you have CUDA 10.1 - cudnn 7.6, follow the instructions Here to install the TensorRT 6.0.1 python3 wheel file in oracle_env

If you would like to try out seVAE-ORACLE, install additional Python packages in oracle_env from seVAE repo

conda activate oracle_env
cd lmf_sim_ws/src/planning/sevae
pip3 install -e .

If you are using ROS version < Noetic, then you need to build geometry, geometry2, and vision_opencv packages with python 3 (for import tf, cv_bridge) following the below instructions.

Build geometry, geometry2 and vision_opencv with python 3 (NO need for ROS Noetic)

First, we need to get the path to our conda env:

conda activate oracle_env
which python

You should get something like this PATH_TO_YOUR_ORACLE_ENV/bin/python.

Then run the following commands (replace PATH_TO_YOUR_ORACLE_ENV with what you get in your terminal) to create and build a workspace containing geometry, geometry2, and vision_opencv packages:

mkdir ros_stuff_ws && cd ros_stuff_ws
mkdir src && cd src
git clone https://github.com/ros/geometry.git -b 1.12.0
git clone https://github.com/ros/geometry2.git -b 0.6.5
git clone https://github.com/ros-perception/vision_opencv.git -b YOUR_ROS_VERSION
catkin config -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=PATH_TO_YOUR_ORACLE_ENV/bin/python -DPYTHON_INCLUDE_DIR=PATH_TO_YOUR_ORACLE_ENV/include/python3.8 -DPYTHON_LIBRARY=PATH_TO_YOUR_ORACLE_ENV/lib/libpython3.8.so
catkin config --install
catkin build geometry geometry2 vision_opencv -DSETUPTOOLS_DEB_LAYOUT=OFF

Don't forget to source this folder in your terminal

source ros_stuff_ws/devel/setup.bash
# or source ros_stuff_ws/install/setup.bash --extend
Clone this wiki locally