Skip to content

Instantly share code, notes, and snippets.

@jeguzzi
Last active February 25, 2024 20:29
Show Gist options
  • Save jeguzzi/1b1ed8c495b7cab54ac4b953243fe669 to your computer and use it in GitHub Desktop.
Save jeguzzi/1b1ed8c495b7cab54ac4b953243fe669 to your computer and use it in GitHub Desktop.
How to compile CoppeliaSim on Linux
repositories:
coppeliaSimClientApplication:
type: git
url: https://github.com/CoppeliaRobotics/coppeliaSimClientApplication.git
version: coppeliasim-v4.4.0-rev0
CoppeliaSimLib:
type: git
url: https://github.com/CoppeliaRobotics/CoppeliaSimLib.git
version: coppeliasim-v4.4.0-rev0
include:
type: git
url: https://github.com/CoppeliaRobotics/include.git
version: coppeliasim-v4.4.0-rev0
simMath:
type: git
url: https://github.com/CoppeliaRobotics/simMath.git
version: coppeliasim-v4.4.0-rev0
libPlugin:
type: git
url: https://github.com/CoppeliaRobotics/libPlugin.git
version: coppeliasim-v4.4.0-rev0
coppeliaGeometricRoutines:
type: git
url: https://github.com/CoppeliaRobotics/coppeliaGeometricRoutines.git
version: coppeliasim-v4.4.0-rev0
coppeliaKinematicsRoutines:
type: git
url: https://github.com/CoppeliaRobotics/coppeliaKinematicsRoutines.git
version: coppeliasim-v4.4.0-rev0
bubbleRobClient:
type: git
url: https://github.com/CoppeliaRobotics/bubbleRobClient.git
version: coppeliasim-v4.4.0-rev0
bubbleRobServer:
type: git
url: https://github.com/CoppeliaRobotics/bubbleRobServer.git
version: coppeliasim-v4.4.0-rev0
bubbleRobZmqServer:
type: git
url: https://github.com/CoppeliaRobotics/bubbleRobZmqServer.git
version: coppeliasim-v4.4.0-rev0
common:
type: git
url: https://github.com/CoppeliaRobotics/common.git
version: coppeliasim-v4.4.0-rev0
helpFiles:
type: git
url: https://github.com/CoppeliaRobotics/helpFiles.git
version: coppeliasim-v4.4.0-rev0
lua:
type: git
url: https://github.com/CoppeliaRobotics/lua.git
version: coppeliasim-v4.4.0-rev0
# models:
# type: git
# url: https://github.com/CoppeliaRobotics/models.git
# version: coppeliasim-v4.4.0-rev0
mtbServer:
type: git
url: https://github.com/CoppeliaRobotics/mtbServer.git
version: coppeliasim-v4.4.0-rev0
python:
type: git
url: https://github.com/CoppeliaRobotics/python.git
version: coppeliasim-v4.4.0-rev0
rcsServer:
type: git
url: https://github.com/CoppeliaRobotics/rcsServer.git
version: coppeliasim-v4.4.0-rev0
# scenes:
# type: git
# url: https://github.com/CoppeliaRobotics/scenes.git
# version: coppeliasim-v4.4.0-rev0
simExtAssimp:
type: git
url: https://github.com/CoppeliaRobotics/simExtAssimp.git
version: coppeliasim-v4.4.0-rev0
simExtBubbleRob:
type: git
url: https://github.com/CoppeliaRobotics/simExtBubbleRob.git
version: coppeliasim-v4.4.0-rev0
simExtCHAI3D:
type: git
url: https://github.com/CoppeliaRobotics/simExtCHAI3D.git
version: coppeliasim-v4.4.0-rev0
simExtCodeEditor:
type: git
url: https://github.com/CoppeliaRobotics/simExtCodeEditor.git
version: coppeliasim-v4.4.0-rev0
simExtCollada:
type: git
url: https://github.com/CoppeliaRobotics/simExtCollada.git
version: coppeliasim-v4.4.0-rev0
simExtConvexDecompose:
type: git
url: https://github.com/CoppeliaRobotics/simExtConvexDecompose.git
version: coppeliasim-v4.4.0-rev0
simExtDataflow:
type: git
url: https://github.com/CoppeliaRobotics/simExtDataflow.git
version: coppeliasim-v4.4.0-rev0
simExtDyn:
type: git
url: https://github.com/CoppeliaRobotics/simExtDyn.git
version: coppeliasim-v4.4.0-rev0
simExtEigen:
type: git
url: https://github.com/CoppeliaRobotics/simExtEigen.git
version: coppeliasim-v4.4.0-rev0
simExtExternalRenderer:
type: git
url: https://github.com/CoppeliaRobotics/simExtExternalRenderer.git
version: coppeliasim-v4.4.0-rev0
simExtGeom:
type: git
url: https://github.com/CoppeliaRobotics/simExtGeom.git
version: coppeliasim-v4.4.0-rev0
simExtGLTF:
type: git
url: https://github.com/CoppeliaRobotics/simExtGLTF.git
version: coppeliasim-v4.4.0-rev0
simExtICP:
type: git
url: https://github.com/CoppeliaRobotics/simExtICP.git
version: coppeliasim-v4.4.0-rev0
simExtIGL:
type: git
url: https://github.com/CoppeliaRobotics/simExtIGL.git
version: coppeliasim-v4.4.0-rev0
simExtIK:
type: git
url: https://github.com/CoppeliaRobotics/simExtIK.git
version: coppeliasim-v4.4.0-rev0
simExtIM:
type: git
url: https://github.com/CoppeliaRobotics/simExtIM.git
version: coppeliasim-v4.4.0-rev0
simExtK3:
type: git
url: https://github.com/CoppeliaRobotics/simExtK3.git
version: coppeliasim-v4.4.0-rev0
simExtLuaCmd:
type: git
url: https://github.com/CoppeliaRobotics/simExtLuaCmd.git
version: coppeliasim-v4.4.0-rev0
simExtLuaParser:
type: git
url: https://github.com/CoppeliaRobotics/simExtLuaParser.git
version: coppeliasim-v4.4.0-rev0
simExtLuaRemoteApiClient:
type: git
url: https://github.com/CoppeliaRobotics/simExtLuaRemoteApiClient.git
version: coppeliasim-v4.4.0-rev0
simExtMTB:
type: git
url: https://github.com/CoppeliaRobotics/simExtMTB.git
version: coppeliasim-v4.4.0-rev0
simExtOctomap:
type: git
url: https://github.com/CoppeliaRobotics/simExtOctomap.git
version: coppeliasim-v4.4.0-rev0
simExtOMPL:
type: git
url: https://github.com/CoppeliaRobotics/simExtOMPL.git
version: coppeliasim-v4.4.0-rev0
simExtOpenGL3Renderer:
type: git
url: https://github.com/CoppeliaRobotics/simExtOpenGL3Renderer.git
version: coppeliasim-v4.4.0-rev0
simExtOpenMesh:
type: git
url: https://github.com/CoppeliaRobotics/simExtOpenMesh.git
version: coppeliasim-v4.4.0-rev0
simExtPovRay:
type: git
url: https://github.com/CoppeliaRobotics/simExtPovRay.git
version: coppeliasim-v4.4.0-rev0
simExtQHull:
type: git
url: https://github.com/CoppeliaRobotics/simExtQHull.git
version: coppeliasim-v4.4.0-rev0
simExtQML:
type: git
url: https://github.com/CoppeliaRobotics/simExtQML.git
version: coppeliasim-v4.4.0-rev0
simExtRemoteApi:
type: git
url: https://github.com/CoppeliaRobotics/simExtRemoteApi.git
version: coppeliasim-v4.4.0-rev0
simExtRML2:
type: git
url: https://github.com/CoppeliaRobotics/simExtRML2.git
version: coppeliasim-v4.4.0-rev0
simExtRRS1:
type: git
url: https://github.com/CoppeliaRobotics/simExtRRS1.git
version: coppeliasim-v4.4.0-rev0
simExtRuckig:
type: git
url: https://github.com/CoppeliaRobotics/simExtRuckig.git
version: coppeliasim-v4.4.0-rev0
simExtSDF:
type: git
url: https://github.com/CoppeliaRobotics/simExtSDF.git
version: coppeliasim-v4.4.0-rev0
simExtSubprocess:
type: git
url: https://github.com/CoppeliaRobotics/simExtSubprocess.git
version: coppeliasim-v4.4.0-rev0
simExtSurfRec:
type: git
url: https://github.com/CoppeliaRobotics/simExtSurfRec.git
version: coppeliasim-v4.4.0-rev0
simExtUI:
type: git
url: https://github.com/CoppeliaRobotics/simExtUI.git
version: coppeliasim-v4.4.0-rev0
simExtURDF:
type: git
url: https://github.com/CoppeliaRobotics/simExtURDF.git
version: coppeliasim-v4.4.0-rev0
simExtURLDrop:
type: git
url: https://github.com/CoppeliaRobotics/simExtURLDrop.git
version: coppeliasim-v4.4.0-rev0
simExtWS:
type: git
url: https://github.com/CoppeliaRobotics/simExtWS.git
version: coppeliasim-v4.4.0-rev0
simExtZMQ:
type: git
url: https://github.com/CoppeliaRobotics/simExtZMQ.git
version: coppeliasim-v4.4.0-rev0
standAloneKinematicsDemo1:
type: git
url: https://github.com/CoppeliaRobotics/standAloneKinematicsDemo1.git
version: coppeliasim-v4.4.0-rev0
standAloneKinematicsDemo2:
type: git
url: https://github.com/CoppeliaRobotics/standAloneKinematicsDemo2.git
version: coppeliasim-v4.4.0-rev0
threejsFrontend:
type: git
url: https://github.com/CoppeliaRobotics/threejsFrontend.git
version: coppeliasim-v4.4.0-rev0
videoRecorder:
type: git
url: https://github.com/CoppeliaRobotics/videoRecorder.git
version: coppeliasim-v4.4.0-rev0
wsRemoteApi:
type: git
url: https://github.com/CoppeliaRobotics/wsRemoteApi.git
version: coppeliasim-v4.4.0-rev0
zmqRemoteApi:
type: git
url: https://github.com/CoppeliaRobotics/zmqRemoteApi.git
version: coppeliasim-v4.4.0-rev0
simMath:
type: git
url: https://github.com/CoppeliaRobotics/simMath.git
version: coppeliasim-v4.4.0-rev0
remoteApi:
type: git
url: https://github.com/CoppeliaRobotics/remoteApi.git
version: coppeliasim-v4.4.0-rev0

How to compile CoppeliaSim (v4.4) from source on Linux

Tested on Ubuntu 22.04 (arm64 and x64)

  1. Install dependicies

  • pip: sudo apt install python3-pip
  • colcon: pip install -U colcon-common-extensions
  • vcs: pip install vcstool
  • git: sudo apt install git
  • cmake: sudo apt install cmake
  • lua5.3: sudo apt install lua5.3 liblua5.3-dev
  • luarocks: sudo apt install luarocks
  • qt@5: sudo apt install qtbase5-dev
  • qscintilla2: sudo apt install libqscintilla2-qt5-dev
  • eigen: sudo apt install libeigen3-dev
  • boost: sudo apt install libboost-all-dev
  • xsltproc: sudo apt install xsltproc
  • xmlschema: pip install xmlschema
  1. Download CoppeliaSim

Get the 4.4 version from https://www.coppeliarobotics.com/downloads

  1. Remove the compiled libraries

This is only needed if you are compiling for a different architecture, like arm.

Also the directories:

  • luar
  • platforms
  • platformthemes

TODO: and some more

  1. Create a workspace where to build

  • create a directory with subdir src
  • download the list of repos wget https://gist.githubusercontent.com/jeguzzi/1b1ed8c495b7cab54ac4b953243fe669/raw/8ea752cb5a0385d6b9f492527321a93df5438fff/coppeliasim.repos
  • import the repos: vcs import src < coppeliasim.repos
  • patch with this: https://github.com/CoppeliaRobotics/CoppeliaSimLib/pull/19/files in case you are installing coppeliaSim <= v4.4
  1. Setup your env

eval $(luarocks path)
export LUA_LIBRARIES=/usr/lib/aarch64-linux-gnu/liblua5.3.so
export LUA_INCLUDE_DIR=/usr/include/lua5.3
export QSCINTILLA_DIR=/usr/include/aarch64-linux-gnu/qt5/Qsci
export QSCINTILLA_LIBS="/usr/lib/libqscintilla2_qt5.so"
export QSCINTILLA_INCLUDEPATH="/usr/include/aarch64-linux-gnu/qt5"
export PATH=$HOME/.local/bin:$PATH

Set the COPPELIASIM_ROOT_DIR to where you saved the original coppeliaSim directory

export COPPELIASIM_ROOT_DIR=<COPPELIASIM_DIR>
  1. Build the coppeliaSim library

colcon build --packages-select coppeliaSim --cmake-args \
-DCMAKE_BUILD_TYPE=Release \
-DINSTALL_DIR=$COPPELIASIM_ROOT_DIR \
-DCOPPELIASIM_PROGRAMMING_DIR=$PWD/src \
-DLUA_LIBRARIES=/usr/lib/aarch64-linux-gnu/liblua5.3.so \
-DLUA_INCLUDE_DIR=/usr/include/lua5.3 \
-DQSCINTILLA_DIR=/usr/include/aarch64-linux-gnu/qt5/Qsci \
-DQSCINTILLA_LIBRARY=/usr/lib/libqscintilla2_qt5.so

This may take some minutes.

  1. Build the client application

TODO: patch coppeliaSim/CMakeLists.txt to add target_compile_options(coppeliaSim PRIVATE -fvisibility=hidden) else it won't work on arm64.

colcon build --packages-select simClientApplication --cmake-args \
-DCMAKE_BUILD_TYPE=Release \
-DINSTALL_DIR=$COPPELIASIM_ROOT_DIR \
-DCOPPELIASIM_LIBRARY=$COPPELIASIM_ROOT_DIR
  1. Install the rocks

luarocks --tree $COPPELIASIM_ROOT_DIR/luar install lpeg
luarocks --tree $COPPELIASIM_ROOT_DIR/luar install lpeglabel
luarocks --tree $COPPELIASIM_ROOT_DIR/luar install lua-parser
luarocks --tree $COPPELIASIM_ROOT_DIR/luar install luasocket
luarocks --tree $COPPELIASIM_ROOT_DIR/luar install org.conman.cbor
  1. Install the plugins

TODO: add SciLexer.h

colcon build --packages-select simExtCodeEditor --cmake-args \
-DCMAKE_BUILD_TYPE=Release \
-DQSCINTILLA_DIR=/usr/include/aarch64-linux-gnu/qt5/Qsci \
-DQSCINTILLA_LIBRARY=/usr/lib/libqscintilla2_qt5.so

TODO: patch simExtDyn/CMakeLists.txt

  • for arm to remove all the sse flags
  • to find LIBCOPPELIASIM_SOURCE_DIR
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release -DBullet_2_83=OFF -DVortex=OFF  -DMujoco=OFF -DNewton=OFF --packages-select simExtDyn
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-skip-build-finished --packages-select-regex "simExt*" --continue-on-error

Some may fail if you miss dependencies and a few fails anyway on arm64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment