jaco_arm_kinematics.h
Go to the documentation of this file.
00001 /*
00002  * jaco_arm.h
00003  *
00004  *  Created on: Mar 6, 2013
00005  *      Author: mdedonato
00006  */
00007 
00008 #ifndef JACO_ARM_H_
00009 #define JACO_ARM_H_
00010 
00011 #include <math.h>
00012 #include <tf/tf.h>
00013 #include <tf/transform_broadcaster.h>
00014 #include <ros/ros.h>
00015 //#include <jaco_driver/jaco_arm_controller.h>
00016 
00017 /******************************************/
00018 /**************DH Parameters***************/
00019 /******************************************/
00020 /* i * alpha(i-1) * a(i-1) * di  * theta1 */
00021 /******************************************/
00022 /* 1 * 0          * 0      * D1  * q1     */
00023 /* 2 * -pi/2      * 0      * 0   * q2     */
00024 /* 3 * 0          * D2     * 0   * q3     */
00025 /* 4 * -pi/2      * 0      * d4b * q4     */
00026 /* 5 * 2*aa       * 0      * d5b * q5     */
00027 /* 6 * 2*aa       * 0      * d6b * q6     */
00028 /******************************************/
00029 
00030 namespace jaco {
00031 class JacoKinematics {
00032 
00033 public:
00034         JacoKinematics(void);
00035 
00036         static inline float Q1(float joint_angle) {
00037                 return (-1 * (joint_angle - 180));
00038         }
00039         static inline float Q2(float joint_angle) {
00040                 return (joint_angle - 270);
00041         }
00042         static inline float Q3(float joint_angle) {
00043                 return (-1 * (joint_angle - 90));
00044         }
00045         static inline float Q4(float joint_angle) {
00046                 return (-1 * (joint_angle - 180));
00047         }
00048         static inline float Q5(float joint_angle) {
00049                 return (-1 * (joint_angle - 180));
00050         }
00051         static inline float Q6(float joint_angle) {
00052                 return (-1 * (joint_angle - (180 + 80)));
00053         }
00054 
00055         /* Robot Length Values (Meters) */
00056         static inline double BaseToJ1(void) {
00057                 return 0.1370+0.0174;                   //Base to J1 (Meters)
00058         }
00059 
00060         /* Robot Length Values (Meters) */
00061         static inline double J1ToJ2(void) {
00062                 return 0.1181;                  //J1 to J2 (Meters)
00063         }
00064 
00065 
00066         static inline double J2ToJ3(void) {
00067                 return 0.4100;                  //Arm Length (Meters)
00068         }
00069         static inline double J3Offset(void) {
00070                         return 0.0113;                  //Arm Length (Meters)
00071                 }
00072 
00073         static inline double J3ToJ4(void) {
00074                 return 0.2070;                  //Front Arm Length (Meters)
00075         }
00076 
00077         static inline double J4ToJ5(void) {
00078                 return 0.0750;                  //First Wrist Length (Meters)
00079         }
00080 
00081         static inline double J5ToJ6(void) {
00082                 return 0.0750;                  //Second Wrist Length (Meters)
00083         }
00084 
00085         static inline double J6ToEnd(void) {
00086                 return 0.1850;                  //Wrist to Center of Hand(Meters)
00087         }
00088 
00089 
00090 
00091 public:
00092 
00093         inline float deg_to_rad(float degrees) {
00094                 return (degrees * (M_PI / 180));
00095         }
00096 
00097 
00098         void UpdateForward(float q1,float q2,float q3,float q4,float q5,float q6);
00099 private:
00100         tf::TransformBroadcaster br;
00101 
00102 };
00103 }
00104 
00105 #endif /* JACO_ARM_H_ */


jaco_driver
Author(s): Jeff Schmidt (Clearpath), Alex Bencz (Clearpath), Matt DeDonato (WPI)
autogenerated on Mon Jan 6 2014 11:23:43