Source

puma / ik.h

Diff from to

File ik.h

 #pragma once
 
+/** Combine the DH parameters for FK/IK and limits/scaling for drive */
+typedef struct {
+	double d;
+	double a;
+	double scale; // rads to counter ticks
+	double angle; // offset from "0" in the DH map
+	double coupled; // amount this axis is cross coupled to the previous
+	int min;
+	int max;
+} joint_cfg_t;
+
 extern int
 ik_first(
+	const joint_cfg_t * const joints,
 	double * const theta, // output commands
 	const double * const xyz, // desired position (in mm)
 	const int right, // right arm = +1, left arm = -1
 
 extern int
 ik_wrist(
-	double * const theta, // input/output commands
+	const joint_cfg_t * const joints,
+	double * const theta, // input(0-2)/output(3-5) commands
 	const double * const xyz, // desired position (in mm)
 	const double * const a, // desired approach vector
 	const double * const s, // desired sliding vector (for hand opening)