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.

Library Installation

  1. Start with a pytorch docker or a python environment with pytorch >= 1.10.

  2. Install git lfs with sudo apt install git-lfs.

  3. Clone cuRobo repository with git clone https://github.com/NVlabs/curobo.git and run pip install -e . --no-build-isolation. This will take 20 minutes to install.

  4. Run python3 -m pytest . to verify that all unit tests pass.

  5. 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

  1. Install NVIDIA Isaac Sim 2022.2.1 or 2023.1.0 following isaac_sim_workstation_install

  2. Install CUDA 11.7 following cuda_instructions and add to your path with: export PATH=/usr/local/cuda-11.7/bin${PATH:+:${PATH}}

  3. Add an alias to Isaac Sim’s python in your bashrc file: echo "alias omni_python='~/.local/share/ov/pkg/isaac_sim-2023.1.0/python.sh'" >> ~/.bashrc or echo "alias omni_python='~/.local/share/ov/pkg/isaac_sim-2023.1.0/python.sh'" >> ~/.bashrc and source it with source ~/.bashrc. If your isaac sim path is different, change the path accordingly.

  4. Install git lfs with sudo apt install git-lfs.

  5. If you are using Isaac Sim 2023.1.0+, install these additional packages: omni_python -m pip install tomli wheel ninja.

  6. Clone this repository and run omni_python -m pip install -e .[isaacsim] --no-build-isolation, where omni_python refers to ./python.sh from isaac sim installation (info).

  7. 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

Isaac Sim version: cuRobo is stable in Isaac Sim 2022.2.1. While all examples will work in 2023.1.0, you might have some instability as it has not been heavily tested. The examples will not work in 2023.1.1.

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).

  1. Install dependenices

    sudo apt-get install libgoogle-glog-dev libgtest-dev libsqlite3-dev curl tcl libbenchmark-dev
    
  2. 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
    
  3. 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 .
    
  4. 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-2023.1.0/python.sh'.

  1. Create environment variable that stores the value of CXX11_ABI of pytorch installation

    export TORCH_CXX11=0 # change this value (0=False, 1=True) based on python -c "import torch; print(torch._C._GLIBCXX_USE_CXX11_ABI)"
    
  2. 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}
    
  3. 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
    
  4. 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
    
  5. 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
    
  6. 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
    
  7. 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
    
  8. 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 .
    
  9. 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.