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 JACO_DRIVER_JACO_API_H 00010 #define JACO_DRIVER_JACO_API_H 00011 00012 #include <dlfcn.h> 00013 #include <ros/ros.h> 00014 00015 #include <iostream> 00016 #include <vector> 00017 00018 #include "kinova/Kinova.API.UsbCommandLayerUbuntu.h" 00019 #include "kinova/KinovaTypes.h" 00020 00021 00022 namespace jaco 00023 { 00024 00025 #define JACO_USB_LIBRARY "Kinova.API.USBCommandLayerUbuntu.so" 00026 00027 class JacoAPI 00028 { 00029 public: 00030 JacoAPI(void); 00031 00032 int (*initAPI)(void); 00033 int (*closeAPI)(void); 00034 int (*getAPIVersion)(std::vector<int> &); 00035 int (*getDevices)(std::vector<KinovaDevice> &, int &); 00036 int (*setActiveDevice)(KinovaDevice); 00037 00038 int (*getGeneralInformations)(GeneralInformations &); 00039 int (*getQuickStatus)(QuickStatus &); 00040 // int (*GetForcesInfo)(ForcesInfo &); 00041 00042 int (*getCodeVersion)(std::vector<int> &); 00043 int (*startControlAPI)(); 00044 int (*stopControlAPI)(); 00045 int (*initFingers)(); 00046 00047 int (*moveHome)(); 00048 00049 int (*getCartesianPosition)(CartesianPosition &); 00050 int (*getAngularPosition)(AngularPosition &); 00051 int (*getCartesianForce)(CartesianPosition &); 00052 int (*getAngularForce)(AngularPosition &); 00053 int (*getAngularCurrent)(AngularPosition &); 00054 int (*getControlType)(int &); 00055 int (*getActualTrajectoryInfo)(TrajectoryPoint &); 00056 int (*getGlobalTrajectoryInfo)(TrajectoryFIFO &); 00057 int (*getSensorsInfo)(SensorsInfo &); 00058 int (*setAngularControl)(); 00059 int (*setCartesianControl)(); 00060 int (*restoreFactoryDefault)(); 00061 int (*sendJoystickCommand)(JoystickCommand); 00062 int (*sendAdvanceTrajectory)(TrajectoryPoint); 00063 int (*sendBasicTrajectory)(TrajectoryPoint); 00064 int (*getClientConfigurations)(ClientConfigurations &); 00065 int (*setClientConfigurations)(ClientConfigurations); 00066 int (*eraseAllTrajectories)(); 00067 int (*getPositionCurrentActuators)(std::vector<float> &); 00068 int (*setActuatorPID)(unsigned int, float, float, float); 00069 }; 00070 00071 } // namespace jaco 00072 #endif // JACO_DRIVER_JACO_API_H