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 and rayrai viewer sources, 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, examples, and viewer sources. See the license files distributed with the package for third-party license details.
Download
Clone the public repository to obtain the example and wrapper sources, runtime resources, environment scripts, and documentation:
git clone https://github.com/raisimTech/raisim2Lib.git
cd raisim2Lib
The top-level CMake configure downloads the binary release selected by
RAISIM_VERSION when it is missing or the installed version differs. For a
manual installation, download the asset for your OS and CPU architecture from
the repository’s Releases page, then copy its raisim and rayrai
directories together into this checkout. Release archives contain compiled
packages; the public Git checkout supplies examples, wrappers, and rsc.
Current asset names are linux-x86-<version>.zip for Linux x86-64,
linux-arm64-<version>.zip for Linux ARM64,
macos-arm64-<version>.zip for Apple Silicon,
macos-x86_64-<version>.zip for Intel Macs when available, and
windows-x86-<version>.zip for Windows x86-64.
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.
cd $HOME/raisim2Lib
source ./raisim_env.sh
raisim_env.sh adds the matching RaiSim and rayrai library directories
to DYLD_LIBRARY_PATH. It selects the legacy $RAISIM_OS/lib
directories when present and otherwise uses the current flat lib
directories. Configure and build this public workspace in Release mode:
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DRAISIM_EXAMPLE=ON
cmake --build build --parallel 12
RAISIM_EXAMPLE is enabled by default. If raisim/ is missing or its
version differs from RAISIM_VERSION, CMake downloads the pinned release
asset and replaces both raisim/ and rayrai/.
You can also update an unpacked macOS tree explicitly:
./raisim_upgrade.sh -y
Apple Silicon hosts select macos-arm64, even when CMake or the shell is
running under Rosetta. Intel Mac builds select macos-x86_64 when that
release asset is available. RAISIM_PY must be enabled explicitly when
you want the Python wrapper.
Run raisim_env.bat or add the installed RaiSim and rayrai bin
directories to Path. Configure and build this public workspace with examples
and raisimPy enabled:
cmake -S . -B build -DRAISIM_EXAMPLE=ON -DRAISIM_PY=ON
cmake --build build --config Release --parallel 12
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, and CMake files; it does not install the
example executables built from examples/, including rayrai_tcp_viewer.
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.raisimWindows:
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 source-built
rayrai_tcp_viewerconnects to applications that publish araisim::Worldthroughraisim::RaisimServer.In-process rayrai examples create
raisin::RayraiWindowdirectly 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.