RaiSim is a physics engine for robotics and artificial intelligence research. RaiSim2 is distributed as binary libraries with headers, examples, rayrai tools, and documentation. Get the public package from https://github.com/raisimTech/raisim2Lib.
Download the RaiSim2 binary package for your platform from
https://github.com/raisimTech/raisim2Lib and unpack it to an install location
such as $HOME/raisim2Lib on Linux/macOS or C:\raisim on Windows. Keep the
package directories together; examples and rayrai tools expect the bundled
assets to remain next to the installed binaries.
Set the runtime library path before running examples, rayrai tools, RaiSim
applications, or raisimPy:
cd $HOME/raisim2Lib
source ./raisim_env.shThe environment script adds both RaiSim and rayrai libraries to the platform
loader path. On Windows, use raisim_env.bat or add the installed RaiSim and
rayrai bin directories to Path.
From the raisim2Lib root, configure and build the examples and Python wrapper:
cmake -S . -B build \
-DRAISIM_EXAMPLE=ON \
-DRAISIM_PY=ON
cmake --build build -jRAISIM_EXAMPLE is enabled by default, but it is shown here because most users
build examples first. RAISIM_PY is disabled by default and must be enabled to
build raisimPy.
Installation is optional for running examples from the build tree. 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/installRename the activation key received by email to activation.raisim and place it in the default location:
Linux/macOS: $HOME/.raisim/activation.raisim
Windows: C:\Users\<YOUR-USERNAME>\.raisim\activation.raisim
You can also set the activation key explicitly in your application with raisim::World::setActivationKey().
Server-based examples publish a raisim::World through RaisimServer. Start
the rayrai TCP viewer in one sourced terminal:
source ./raisim_env.sh
./build/examples/rayrai_tcp_viewerRun the example in another sourced terminal:
source ./raisim_env.sh
./build/examples/primitive_gridIn-process rayrai examples open their own renderer window and do not need the TCP viewer:
source ./raisim_env.sh
./build/examples/rayrai_basic_scene
./build/examples/rayrai_complete_showcaseRaiSim and rayrai are CMake packages in the unpacked raisim2Lib tree. Point
CMAKE_PREFIX_PATH at those package prefixes from your downstream project:
export RAISIM_ROOT=$HOME/raisim2Lib
cmake -S . -B build -DCMAKE_PREFIX_PATH="$RAISIM_ROOT/raisim;$RAISIM_ROOT/rayrai"
cmake --build build -jMinimal downstream CMakeLists.txt:
cmake_minimum_required(VERSION 3.16)
project(my_raisim_app LANGUAGES CXX)
find_package(raisim CONFIG REQUIRED)
find_package(Eigen3 REQUIRED)
add_executable(app main.cpp)
target_link_libraries(app PRIVATE raisim::raisim)
if (UNIX)
target_link_libraries(app PRIVATE pthread)
endif()Use rayrai_tcp_viewer for applications that publish through raisim::RaisimServer. Use in-process rayrai APIs when your application needs its own renderer window, offscreen rendering, RGB/depth sensors, or screenshots. RaisimUnity and RaisimUnreal are legacy integrations and are no longer the supported visualization path.
Available at raisim.com




