Go to the documentation of this file.00001
00002
00003
00004
00005
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
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
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
00056 static inline double BaseToJ1(void) {
00057 return 0.1370+0.0174;
00058 }
00059
00060
00061 static inline double J1ToJ2(void) {
00062 return 0.1181;
00063 }
00064
00065
00066 static inline double J2ToJ3(void) {
00067 return 0.4100;
00068 }
00069 static inline double J3Offset(void) {
00070 return 0.0113;
00071 }
00072
00073 static inline double J3ToJ4(void) {
00074 return 0.2070;
00075 }
00076
00077 static inline double J4ToJ5(void) {
00078 return 0.0750;
00079 }
00080
00081 static inline double J5ToJ6(void) {
00082 return 0.0750;
00083 }
00084
00085 static inline double J6ToEnd(void) {
00086 return 0.1850;
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