Getting Started - A2R-Lab/indy7-sdk GitHub Wiki
Prerequisites
- Ubuntu 22.04 or 20.04
- Nvidia GPU compatible with CUDA v12.2
Installing Dependencies
You will need gRPC, CUDA, ROS 2, and MuJoCo.
gRPC and neuromeka-package
1. Install GRPC
This guide is summarized from grpc website. For more information, please visit grpc.io.
Choose a directory to hold locally installed packages. This page assumes that the environment variable MY_INSTALL_DIR holds this directory path. For example:
export MY_INSTALL_DIR=$HOME/.local
Ensure that the directory exists:
mkdir -p $MY_INSTALL_DIR
Add the local bin folder to your path variable, for example:
export PATH="$MY_INSTALL_DIR/bin:$PATH"
Install cmake
You need version 3.13 or later of cmake. Install it by following these instructions:
sudo apt install -y cmake
Check the version of cmake:
cmake --version
On Linux, the system-wide CMake version might be outdated. To install a more recent version in your local installation directory, use:
wget -q -O cmake-linux.sh https://github.com/Kitware/CMake/releases/download/v3.19.6/cmake-3.19.6-Linux-x86_64.sh
sh cmake-linux.sh -- --skip-license --prefix=$MY_INSTALL_DIR
rm cmake-linux.sh
Install other required tools
Install the basic tools required to build gRPC:
$ sudo apt install -y build-essential autoconf libtool pkg-config
Clone the grpc repo and its submodules:
$ git clone --recurse-submodules -b v1.59.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc
Build and Install gRPC and Protocol Buffers
gRPC applications often use Protocol Buffers for service definitions and data serialization, as in the example code that follows. To build and locally install gRPC and Protocol Buffers, run:
cd grpc
mkdir -p cmake/build
pushd cmake/build
cmake -DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR \
../..
make -j 4
make install
popd
Important It is strongly recommended to install gRPC locally with a properly set CMAKE_INSTALL_PREFIX, as there is no simple way to uninstall gRPC after a global installation.
2. Build neuromeka-package
Navigate to the C++ folder of the submodule
cd external/neuromeka-package/cpp/
Create and Enter the Build Directory
mkdir build && cd build
Run CMake Configuration and Build the Example
cmake -DBUILD_PROTO=OFF ..
cmake --build .
If you need to rebuild the .proto files, set -DBUILD_PROTO=ON. The build_proto executable file will be generated. After running this file, the generated proto files will be located in the proto/cpp_generated folder.
CUDA
- Instructions here.
ROS 2
-
Instructions here.
-
For each new shell, make sure to source the ROS 2 environment by running:
source /opt/ros/humble/setup.bash
MuJoCo
-
Build from source
cd external/mujocomkdir build && cd buildcmake ..cmake --build .
Usage
See How to Use