Installation¶
cuRobo is a library built in python with core compute components implemented as CUDA kernels and wrapped within python through pyTorch. We can install cuRobo for use directly through python following instructions for Library Installation. If you want to use cuRobo in Isaac sim, skip library instructions and follow Install for use in Isaac Sim. If you want to use cuRobo within a docker container, follow instructions in Docker Development.
System Requirements¶
Ubuntu 20.04 or 22.04. Other linux environments might also work. We have added experimental support for Windows.
NVIDIA GPU with VOLTA or newer architecture and at least 4 GB of VRAM. NVIDIA Jetson Orin is also supported.
PyTorch 1.15 or newer. PyTorch 2.0+ is recommended.
git lfs before cloning cuRobo repository (
sudo apt install git-lfs
).
Library Installation¶
Start with a pytorch docker or a python environment with pytorch >= 1.10.
Install git lfs with
sudo apt install git-lfs
.Clone cuRobo repository with
git clone https://github.com/NVlabs/curobo.git
, move inside the cloned repo withcd curobo
, and runpip install -e . --no-build-isolation
. This will take 20 minutes to install.Run
python3 -m pytest .
to verify that all unit tests pass.Look at python scripts in
examples/
path for examples.
Note
NVIDIA Isaac Sim is not a required dependency of cuRobo. All functions of cuRobo can be accessed through python
Install for use in Isaac Sim¶
Install CUDA 11.8 following cuda_instructions and add to your path with:
export PATH=/usr/local/cuda-11.8/bin${PATH:+:${PATH}}
Install NVIDIA Isaac Sim 4.0 following isaac_sim_workstation_install
Add an alias to Isaac Sim’s python in your bashrc file:
echo "alias omni_python='~/.local/share/ov/pkg/isaac_sim-4.0.0/python.sh'" >> ~/.bashrc
and source it withsource ~/.bashrc
. If your isaac sim path is different, change the path accordingly.Install git lfs with
sudo apt install git-lfs
.Install these additional packages:
omni_python -m pip install tomli wheel ninja
.Clone cuRobo repository with
git clone https://github.com/NVlabs/curobo.git
, move inside the cloned repo withcd curobo
.run
omni_python -m pip install -e .[isaacsim] --no-build-isolation
, whereomni_python
refers to./python.sh
from isaac sim installation (info).Run
omni_python examples/isaac_sim/motion_gen_reacher.py
to run a motion generation example. Once Isaac Sim loads, click play and move the target cube to start generating motions.
Note
cuRobo works with all versions of Isaac Sim as it mainly depends on pytorch and CUDA. However, due to changes in Isaac Sim APIs/Functionalities, examples might not work with all versions of Isaac Sim. cuRobo <= 0.7.3 provides examples that work with Isaac Sim 2022.2.1, 2023.1.0. Starting with cuRobo >= 0.7.4, examples will not work in Isaac Sim older than 4.0.0.
Install nvblox (optional)¶
We recommend using a docker for running cuRobo with nvblox, instructions available at Docker Development. We provide instructions to use nvblox natively below.
Before proceeding with the installation, check how pytorch was compiled. Specifically, pyTorch that is
available through pip wheels and also with Isaac Sim has been compiled with D_GLIBCXX_USE_CXX11_ABI=0
.
pyTorch that’s available through docker containers at ngc are
compiled with D_GLIBCXX_USE_CXX11_ABI=1
. You can check what value was used for your pytorch installation with
python -c "import torch; print(torch._C._GLIBCXX_USE_CXX11_ABI)"
.
Once you detect the status of GLIBCXX_USE_CXX11_ABI
, follow either of the instructions.
Installing nvblox for CXX11_ABI and pytorch dockers¶
Instructions for CXX11_ABI
(GLIBCXX_USE_CXX11_ABI==True
).
Install dependenices
sudo apt-get install libgoogle-glog-dev libgtest-dev libsqlite3-dev curl tcl libbenchmark-dev
Install nvblox
git clone https://github.com/valtsblukis/nvblox.git && cd nvblox/nvblox && mkdir build && \ cmake .. \ -DPRE_CXX11_ABI_LINKABLE=ON -DBUILD_TESTING=OFF \ && make -j32 && \ sudo make install
Install nvblox_torch
git clone https://github.com/NVlabs/nvblox_torch.git && cd nvblox_torch sh install.sh $(python -c 'import torch.utils; print(torch.utils.cmake_prefix_path)') python -m pip install -e .
Install packages to run nvblox examples
python -m pip install opencv-python pyrealsense2 transforms3d
Installing nvblox for PRECXX11_ABI and Isaac Sim¶
Instructions here are for PRE_CXX11_ABI
(GLIBCXX_USE_CXX11_ABI==False
).
To install with Isaac Sim, change all instances of python
to omni_python
,
where omni_python
maps to the python shell of your Isaac Sim installation as alias omni_python='~/.local/share/ov/pkg/isaac_sim-4.0.0/python.sh'
.
Create environment variable that stores the value of
CXX11_ABI
of pytorch installationexport TORCH_CXX11=0 # change this value (0=False, 1=True) based on python -c "import torch; print(torch._C._GLIBCXX_USE_CXX11_ABI)"
Create environment variables that will store the path you want to install nvblox and also the value of CXX11_ABI:
export PKGS_PATH=/home/${USER}/pkgs mkdir -p ${PKGS_PATH}
Update cmake with:
cd ${PKGS_PATH} && wget https://cmake.org/files/v3.27/cmake-3.27.1.tar.gz && \ tar -xvzf cmake-3.27.1.tar.gz && \ sudo apt update && sudo apt install -y build-essential checkinstall zlib1g-dev libssl-dev && \ cd cmake-3.27.1 && ./bootstrap && \ make -j8 && \ sudo make install
Install sqlite3:
cd ${PKGS_PATH} && git clone https://github.com/sqlite/sqlite.git -b version-3.39.4 && \ cd ${PKGS_PATH}/sqlite && CFLAGS=-fPIC ./configure --prefix=${PKGS_PATH}/sqlite/install/ && \ make -j8 && make install
Install glog:
cd ${PKGS_PATH} && git clone https://github.com/google/glog.git -b v0.6.0 && \ cd glog && \ mkdir build && cd build && \ cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DCMAKE_INSTALL_PREFIX=${PKGS_PATH}/glog/install/ \ -DWITH_GFLAGS=OFF -DWITH_GTEST=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=${TORCH_CXX11} \ && make -j8 && make install
Install gflags:
cd ${PKGS_PATH} && git clone https://github.com/gflags/gflags.git -b v2.2.2 && \ cd gflags && \ mkdir build && cd build && \ cmake .. -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DCMAKE_INSTALL_PREFIX=${PKGS_PATH}/gflags/install/ \ -DGFLAGS_BUILD_STATIC_LIBS=ON -DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=${TORCH_CXX11} \ && make -j8 && make install
Install nvblox:
cd ${PKGS_PATH} && git clone https://github.com/valtsblukis/nvblox.git && cd ${PKGS_PATH}/nvblox/nvblox mkdir build && cd build && \ cmake .. -DBUILD_REDISTRIBUTABLE=ON \ -DCMAKE_CXX_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 -DPRE_CXX11_ABI_LINKABLE=ON \ -DSQLITE3_BASE_PATH="${PKGS_PATH}/sqlite/install/" -DGLOG_BASE_PATH="${PKGS_PATH}/glog/install/" \ -DGFLAGS_BASE_PATH="${PKGS_PATH}/gflags/install/" -DCMAKE_CUDA_FLAGS=-D_GLIBCXX_USE_CXX11_ABI=0 && \ make -j32 && \ sudo make install
Install nvblox_torch in your python environment:
cd ${PKGS_PATH} && git clone https://github.com/NVlabs/nvblox_torch.git && cd nvblox_torch sh install.sh $(python -c 'import torch.utils; print(torch.utils.cmake_prefix_path)') python -m pip install -e .
Install packages to run nvblox examples
python -m pip install opencv-python pyrealsense2 transforms3d
If you get a library not found runtime error, run export LD_LIBRARY_PATH=/usr/local/lib
Note
If you get a GLU not found runtime error with nvblox, install it with sudo apt install freeglut3-dev
.
Installing on NVIDIA Jetson (aarch64)¶
Native installation on NVIDIA Jetson is not supported. Use cuRobo in a docker following instructions at Docker Development.