https://github.com/ziteh/coppelia-sim-csharp-wrapper
Control the robot in CoppeliaSim (V-REP) with C#
https://github.com/ziteh/coppelia-sim-csharp-wrapper
api coppeliasim csharp dll v-rep
Last synced: 27 days ago
JSON representation
Control the robot in CoppeliaSim (V-REP) with C#
- Host: GitHub
- URL: https://github.com/ziteh/coppelia-sim-csharp-wrapper
- Owner: ziteh
- License: bsd-2-clause
- Created: 2021-11-24T11:22:07.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-25T15:48:30.000Z (about 3 years ago)
- Last Synced: 2025-05-06T06:08:20.851Z (about 1 month ago)
- Topics: api, coppeliasim, csharp, dll, v-rep
- Language: C#
- Homepage:
- Size: 41 KB
- Stars: 6
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CoppeliaSim C# Wrapper
The CoppeliaSim (V-REP) remote control API wrapper for C#, based on [CoppeliaSim Legacy remote API](https://www.coppeliarobotics.com/helpFiles/en/legacyRemoteApiOverview.htm).
## Demo
[Demo video (YouTube)](https://youtu.be/ouNCwvsmBSY)
## Usage
### Client Side (i.e. C# Application)
1. Download the DLL file from [Releases](https://github.com/ziteh/coppelia-sim-csharp-api/releases). You can also build it from [source code](/CoppeliaSimCSharpAPI/CoppeliaSimCSharpAPI.cpp).
2. Copy and paste DLL file into your runtime path, e.g. `$(ProjectDir)x64/Debug/`.
3. Add `using System.Runtime.InteropServices;` at the beginning of code, use [`[DllImport()]`](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.dllimportattribute?view=net-6.0) attribute to import DLL functions. [Example](/CoppeliaSimCSharpAPI.TestForm/Api.cs).
4. Write your own code. [Example](/CoppeliaSimCSharpAPI.TestForm/Form1.cs).### Server Side (i.e. CoppeliaSim)
1. Add [`simRemoteApi.start()`](https://www.coppeliarobotics.com/helpFiles/en/remoteApiServerSide.htm) into your CoppeliaSim Lua script. For [example](/coppeliasim_ur5_script.lua):
```lua
function sysCall_init()
simRemoteApi.start(3000) -- Start remote API server on port 3000corout=coroutine.create(coroutineMain)
end-- Some code here...
```2. Start simulation to enabling the remote API server.
## Reference
- [CoppeliaRobotics/bubbleRobClient](https://github.com/CoppeliaRobotics/bubbleRobClient)## Dependency
- [CoppeliaRobotics/include](https://github.com/CoppeliaRobotics/include)
- [CoppeliaRobotics/remoteApi](https://github.com/CoppeliaRobotics/remoteApi)