Skip to content

Commit 8d4dac0

Browse files
authored
Document Inverse Kinematics and Forward Kinematics
Added section on Inverse and Forward Kinematics with example code.
1 parent 43977c8 commit 8d4dac0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,22 @@ robot.Dashboard.LoadProgram("prg1.urp");
140140
robot.Dashboard.Play();
141141
```
142142

143+
### 🔹 Inverse Kinematics - Forward Kinematics
144+
145+
Calculates joint positions corresponding to a cartesian position and vice versa. Uses a purely algebraic and optimized algorithm.
146+
147+
```csharp
148+
// Get default DH parameters for UR3e robot model²
149+
IUrDhParameters dhParameters = KinematicsUtils.GetDhParametersFromModel(RobotModelsExtended.UR3e);
150+
151+
// Calculate forward kinematics for given joint angles in radians
152+
KinematicsResult fkResult = KinematicsUtils.ForwardKinematics(new double[] { 0, -1.57, 1.57, 0, 0, 0 }, dhParameters);
153+
154+
// Calculate inverse kinematics for given cartesian pose
155+
var matrix = vectorPose.FromRotationVectorTo4x4Matrix();
156+
double[][] ikSolutions = KinematicsUtils.InverseKinematics(matrix, dhParameters);
157+
```
158+
143159
### 🔹 XML-RPC – Call .NET Functions from URScript
144160

145161
Enable remote function calls from your robot program.

0 commit comments

Comments
 (0)