00001 /* 00002 * jacolib.h 00003 * 00004 * Created on: Feb 16, 2013 00005 * Modified on: June 25, 2013 00006 * Author: mdedonato, Clearpath Robotics 00007 */ 00008 00009 #ifndef JACOLIB_H_ 00010 #define JACOLIB_H_ 00011 00012 #include "jaco_driver/Kinova.API.UsbCommandLayerUbuntu.h" 00013 #include "jaco_driver/KinovaTypes.h" 00014 #include <dlfcn.h> 00015 #include <iostream> 00016 #include <ros/ros.h> 00017 00018 00019 00020 00021 namespace jaco { 00022 #define JACO_USB_LIBRARY "Kinova.API.USBCommandLayerUbuntu.so" 00023 00024 class JacoAPI { 00025 00026 public: 00027 JacoAPI(void); 00028 int (*InitAPI)(void); 00029 int (*CloseAPI)(void); 00030 int (*GetCodeVersion)(std::vector<int> &); 00031 int (*GetCartesianPosition)(CartesianPosition &); 00032 int (*GetAngularPosition)(AngularPosition &); 00033 int (*GetCartesianForce)(CartesianPosition &); 00034 int (*GetAngularForce)(AngularPosition &); 00035 int (*GetAngularCurrent)(AngularPosition &); 00036 int (*GetControlOperator)(int &); 00037 int (*GetActualTrajectoryInfo)(TrajectoryPoint &); 00038 int (*GetGlobalTrajectoryInfo)(TrajectoryFIFO &); 00039 int (*GetSensorsInfo)(SensorsInfo &); 00040 int (*GetSingularityVector)(SingularityVector &); 00041 int (*SetAngularControl)(); 00042 int (*SetCartesianControl)(); 00043 int (*StartControlAPI)(); 00044 int (*StopControlAPI)(); 00045 int (*RestoreFactoryDefault)(); 00046 int (*SendJoystickCommand)(JoystickCommand); 00047 int (*SendAdvanceTrajectory)(TrajectoryPoint); 00048 int (*SendBasicTrajectory)(TrajectoryPoint); 00049 int (*GetClientConfigurations)(ClientConfigurations &); 00050 int (*SetClientConfigurations)(ClientConfigurations); 00051 int (*EraseAllTrajectories)(); 00052 int (*GetPositionCurrentActuators)(std::vector<float> &); 00053 int (*SetActuatorPID)(unsigned int, float, float, float); 00054 00055 };} 00056 00057 #endif /* JACOLIB_H_ */