Trammell Hudson avatar Trammell Hudson committed 0644cea

skeleton for fk

Comments (0)

Files changed (2)

 }
 
 
+void
+fk(
+	const joint_cfg_t * const joints,
+	const double counters[],
+	double xyz_out[3]
+)
+{
+}
+
+
 #if 0
 int main(int argc, char **argv)
 {
 #pragma once
 
-/** Combine the DH parameters for FK/IK and limits/scaling for drive */
+/** Combine the DH parameters for FK/IK and limits/scaling for drive
+ *
+ * Rotations are right-hand rule!  (Counter clockwise)
+ *
+ * 1. Translate by d along the new z axis.
+ * 2. Rotate by the new theta about the new z axis.
+ * 3. Translate by a along the old x axis.
+ * 4. Rotate by a about the old x axis.
+ *
+ * Note that for the PUMA the straight-up home position is
+ * [0, -90, 90, 0, 0, 0], not all zeros.  This is since the X
+ * axis is aligned with the horizontal plane.
+ */
 typedef struct {
+	// DH parameters
 	double d;
 	double a;
+	double alpha;
+	double angle; // offset from "0" in the DH map
+
+	// Mechanical details about the joint
+	double coupled; // amount this axis is cross coupled to the previous
 	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;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.