C# wrapper for Universal Robots RTDE interface using native P/Invoke. Works with Rhino 7 (.NET 4.8) and Rhino 8 (.NET 8) on Windows and macOS. Zero dependencies - all native libraries included.
$ dotnet add package UR.RTDENative C# wrapper for Universal Robots RTDE using a C++ P/Invoke facade. No Python dependency; NuGet package contains managed assemblies and native binaries. Based on ur_rtde v1.6.2.
AGENTS.md.Requires Robotiq URCap on the controller.
RobotiqGripperNative wraps ur_rtde::RobotiqGripper.RobotiqGripper issues rq_* calls.RobotiqGripperRtde uses RTDE registers; installs a one-time URScript bridge.Default register mapping: input_int[0] command, input_int[1] value, output_int[0] status, output_int[1] position.
dotnet add package UR.RTDE --source C:\path\to\UR.RTDE\nupkgs
dotnet add package UR.RTDE
Native DLLs copy automatically to the output folder.
using UR.RTDE;
// Connect
using var control = new RTDEControl("192.168.1.100");
using var receive = new RTDEReceive("192.168.1.100");
// Move robot
double[] homeQ = { 0, -1.57, 1.57, -1.57, -1.57, 0 };
control.MoveJ(homeQ, speed: 1.05, acceleration: 1.4);
// Read state
double[] q = receive.GetActualQ();
Console.WriteLine($"Joint 0: {q[0]:F4} rad");
Build is verified; see BUILD_SUCCESS.md for details.
Automated:
cd UR.RTDE
.\build-complete.bat
Manual:
# Boost
cd C:\vcpkg
vcpkg install boost:x64-windows
# ur_rtde
cd C:\path\to\UR.RTDE\build-native\ur_rtde\build
cmake --build . --config Release
# C API facade
cd ..\..\native\facade\build
cmake --build . --config Release
# C# wrapper
cd ..\..\..\
dotnet build src\UR.RTDE -c Release
# NuGet
dotnet pack src\UR.RTDE -c Release -o nupkgs
ur_rtde v1.6.2 source includes Boost 1.89.0 compatibility patches; see BUILD_SUCCESS.md and BUILD_INSTRUCTIONS.md.
CHANGELOG.md - Version history and upgrades.AGENTS.md - Agent instructions and roadmap.docs/quickstart.md - Rhino/URSim quick start.docs/troubleshooting.md - Runtime issues.docs/version-matrix.md - Supported versions and RIDs.ROBOT_IP: overrides the default robot/URSim IP (default: localhost).ENABLE_ROBOTIQ_TESTS: set to true to run Robotiq tests (requires URCap).ENABLE_FT_TESTS: set to true to run FT zeroing test (may be unsupported in URSim).samples/ExtendedFeaturesTest/Program.csdotnet run -c Release from samples/ExtendedFeaturesTest (optional test name filter).build-native/ur_rtde to the tag (backup old copy); apply Boost/compat patches if still needed.src/UR.RTDE/runtimes/{rid}/native/.We use SemVer. This version is 1.2.0.0 (NuGet normalized as 1.2.0).
Steps to publish a GitHub Release (manual):
# Ensure your working tree is clean and up to date
git pull origin main
# Tag the release (match csproj version)
git tag v1.2.0.0 -m "UR.RTDE 1.2.0.0"
git push origin v1.2.0.0
# Create a GitHub Release for tag v1.2.0.0 and upload the nupkg
NuGet publish (manual):
dotnet pack src/UR.RTDE -c Release -o nupkgs
# NuGet normalizes trailing .0 segments, so the file is '1.2.0'
dotnet nuget push nupkgs/UR.RTDE.1.2.0.nupkg -k <API_KEY> -s https://api.nuget.org/v3/index.json
MIT License - see LICENSE
Credits: Built on ur_rtde by SDU Robotics
Install now: dotnet add package UR.RTDE