Skip to main content
Version: Next

SOFA Robotics without Emio Labs

This guide provides instructions for using SOFA Robotics independently of the Emio Labs application.

warning
  • To use SOFA Robotics independently of Emio Labs, you first need to download the appropriate Emio Labs package for your operating system. This package may come as an installer (.deb for Linux, .msi for Windows, or .dmg for MacOS) or as a compressed archive (.zip).
  • It is important to note that portable formats (.AppImage for Linux, .exe for Windows, .app for MacOS), which run from a temporary directory, are not supported.
  • Ensure you extract or install the package to a permanent location on your system before proceeding.

Locate the SOFA Robotics Directory and Executable

To find the paths to the SOFA Robotics directory and executable, follow the instructions below depending on your chosen package format:

  1. Locate the directory where you installed the Emio Labs application. We will refer to this directory as PATH_TO_EMIO_LABS.
  2. Within this directory, you will find the SOFA Robotics directory at PATH_TO_EMIO_LABS/resources/sofa.
  3. Inside this directory, you will find the bin subdirectory, which contains the executable file required to run the software. This executable is essential for launching SOFA Robotics independently.
tip
  • A typical path example when you installed Emio Labs on Windows using the .msi installer is C:\Users\YOUR_USERNAME\AppData\Local\Programs\emio-labs
  • A typical example on Linux when you used the .deb installer is /opt/emio-labs

Setup the Environment Variables

In the previous section, you located the path to the SOFA Robotics directory. We will refer to this path as PATH_TO_SOFA_ROBOTICS_DIR throughout this guide.

To run the software, you need to configure your environment by adding specific paths to your PATH and PYTHONPATH, along with other required environment variables.

The steps below will help you set up these variables temporarily. Note that these changes will only last for the duration of your terminal session. To avoid repeating these steps every time you run SOFA, consider creating a script to automate the process. However, we recommend against setting these variables permanently to maintain a clean environment.

Open a terminal and run the commands for your operating system as outlined below.

export SOFA_ROOT=PATH_TO_SOFA_ROBOTICS_DIR
export PATH=$PATH:$SOFA_ROOT\bin
export PYTHONHOME=$SOFA_ROOT\bin\python
export PYTHONPATH=$SOFA_ROOT\bin\python\lib\python3.10\site-packages
export PYTHONPATH=$PYTHONPATH:$SOFA_ROOT\plugins\SofaPython3\lib\python3\site-packages

Launch the Software

In the same terminal, try the following command:

runSofa -l SofaPython3,SofaImGui

This should run the SOFA Robotics with a default simulation (press the play button).

To run your own simulation:

runSofa -l SofaPython3,SofaImGui your_scene.py