Installation

What This Page Covers

This page covers installed package paths, environment variables, build commands for examples and raisimPy, dependencies, and license activation for the binary RaiSim2 distribution. Get RaiSim2 from https://github.com/raisimTech/raisim2Lib; it is distributed as binary libraries with headers, example sources, rayrai tools, and documentation.

Dependencies

Minimum requirements:

  • A supported 64-bit operating system.

  • CMake 3.18 or newer for the top-level package workspace.

  • A C++20-capable compiler when building your own application against RaiSim.

  • OpenGL runtime support for rayrai.

  • SDL2 runtime libraries for rayrai on Linux or macOS when they are not bundled with the package.

  • Visual Studio 2019 or newer on Windows when compiling downstream C++ projects.

The binary package includes RaiSim and rayrai libraries, headers, tools, and examples. See the license files distributed with the package for third-party license details.

Download

Download the RaiSim2 binary package for your platform from:

https://github.com/raisimTech/raisim2Lib

Unpack the package to a local directory such as $HOME/raisim2Lib on Linux/macOS or C:\raisim on Windows. Current macOS packages are named macos-arm64-<version>.zip for Apple Silicon and macos-x86_64-<version>.zip for Intel. Keep the package directories together; examples and rayrai tools resolve resources from the accompanying rsc and package directories.

Local Install Layout

The unpacked release is already a usable local package tree. Its current flat layout is:

<raisim2Lib>/raisim
<raisim2Lib>/rayrai

RaiSim and rayrai are installed as CMake packages. Downstream projects that use only physics should point CMAKE_PREFIX_PATH at the RaiSim package prefix. Projects that use rayrai should include both prefixes.

Older releases also supported architecture subdirectories such as raisim/linux and rayrai/linux. The current CMake and environment scripts still recognize that legacy layout, but new documentation and release archives use the flat prefixes above.

Environment Setup

cd $HOME/raisim2Lib
source ./raisim_env.sh

raisim_env.sh adds the matching RaiSim and rayrai library directories to LD_LIBRARY_PATH. Current flat packages use raisim/lib and rayrai/lib; legacy packages use the $RAISIM_OS/lib directories below those prefixes. Configure and build this public workspace with examples and raisimPy enabled:

cmake -S . -B build \
  -DCMAKE_BUILD_TYPE=Release \
  -DRAISIM_EXAMPLE=ON \
  -DRAISIM_PY=ON
cmake --build build --parallel 12

RAISIM_EXAMPLE is enabled by default. RAISIM_PY must be enabled explicitly when you want the Python wrapper.

Build And Install

Use this command sequence when you want examples and raisimPy from the local raisim2Lib tree:

cd $HOME/raisim2Lib
source ./raisim_env.sh
cmake -S . -B build \
  -DCMAKE_BUILD_TYPE=Release \
  -DRAISIM_EXAMPLE=ON \
  -DRAISIM_PY=ON
cmake --build build --parallel 12

On macOS, prefer adding -DCMAKE_BUILD_TYPE=Release to the configure command for local example builds. If raisim/ is missing or its version differs from RAISIM_VERSION, the configure step downloads the pinned macOS package.

Installation is optional for running examples from the build tree. The install step copies package headers, libraries, CMake files, and bundled rayrai tools; it does not install the example executables built from examples/. If you do install, choose a prefix you can write to instead of relying on CMake’s default /usr/local:

cmake --install build --prefix $HOME/raisim2Lib/install

For downstream C++ projects that use both RaiSim and rayrai, configure with both package prefixes from the unpacked raisim2Lib tree:

export RAISIM_ROOT=$HOME/raisim2Lib
cmake -S . -B build -DCMAKE_PREFIX_PATH="$RAISIM_ROOT/raisim;$RAISIM_ROOT/rayrai"
cmake --build build --parallel 12

Activation Key

Rename the activation key received by email to activation.raisim and place it in:

  • Linux and macOS: $HOME/.raisim/activation.raisim

  • Windows: C:\Users\<YOUR-USERNAME>\.raisim\activation.raisim

RaiSim also checks the path passed to raisim::World::setActivationKey(). If that file is not found, it falls back to the user-directory location above.

Rayrai

rayrai is the supported visualizer for current RaiSim. There are two usage modes:

  • The packaged rayrai_raisim_tcp_viewer connects to applications that publish a raisim::World through raisim::RaisimServer.

  • In-process rayrai examples create raisin::RayraiWindow directly for screenshots, RGB/depth rendering, PBR assets, HDR lighting, and offscreen workflows.

RaisimUnity and RaisimUnreal are legacy integrations and are no longer the supported visualization path.

Blender and glTF Assets

For Blender-authored scenes, use the general exporter:

blender --background scene.blend \
  --python $HOME/raisim2Lib/scripts/export_blender_scene.py \
  -- --format glb --output /path/to/scene.glb

The exporter writes renderable glTF/GLB scenes, keeps Z-up coordinates for RaiSim/rayrai, and emits RayRai sidecars for Blender area lights and authored reflection probes: *.rayrai_lights.json and *.rayrai_probes.json.