|
coppeliasim-cpp
A C++ library to interface with CoppeliaSim.
|

coppeliasim-cpp provides a C++ library for interfacing with CoppeliaSim through its legacy remote API.
The library lives in coppeliasim-cpp-client/ — see its README for the API overview and usage examples.
coppeliasim-cpp-client/lib/), so CoppeliaSim is not required to build — only to run. You can download it from the Coppelia Robotics website.CMake presets are also available (see coppeliasim-cpp-client/CMakePresets.json).
Enable the legacy remote API on the server side. Add the following command to be executed once, at simulation start, in a child script of your CoppeliaSim scene:
Replace 19999 with a different port if needed (the client's default is 19999). A ready-made scene is included at coppeliasim-cpp-client/scene.ttt.
If you want to use the raw C API in your own project instead of the C++ client, the required files are already vendored in this repository:
coppeliasim-cpp-client/lib/extApi.h / extApi.ccoppeliasim-cpp-client/lib/extApiPlatform.h / extApiPlatform.c (platform-specific code)Define the following preprocessor definitions in your project configuration (this repository's CMakeLists.txt does this already):
NON_MATLAB_PARSINGMAX_EXT_API_CONNECTIONS=255 (the value is adjustable)DO_NOT_USE_SHARED_MEMORY (optional, if not using shared memory)Feel free to modify and extend the project according to your needs. If you encounter any issues or have questions, please open an issue in this repository.
This project is licensed under the [MIT License](LICENSE). The vendored CoppeliaSim legacy remote API sources under coppeliasim-cpp-client/lib/ are third-party code distributed under their own license — see coppeliasim-cpp-client/lib/license.txt.