00001 #ifdef KINOVAAPIUSBCOMMANDLAYER_EXPORTS 00002 #define KINOVAAPIUSBCOMMANDLAYER_API __declspec(dllexport) 00003 #else 00004 #define KINOVAAPIUSBCOMMANDLAYER_API __declspec(dllimport) 00005 #endif 00006 00007 #include <vector> 00008 #include <jaco_driver/KinovaTypes.h> 00009 00010 //namespace jaco_arm { 00011 // ***** E R R O R C O D E S ****** 00012 00013 #define ERROR_INIT_API 2001 // Error while initializing the API 00014 #define ERROR_LOAD_COMM_DLL 2002 // Error while loading the communication layer 00015 00016 //Those 3 codes are mostly for internal use 00017 #define JACO_NACK_FIRST 2003 00018 #define JACO_COMM_FAILED 2004 00019 #define JACO_NACK_NORMAL 2005 00020 00021 #define COMMAND_LAYER_VERSION 10001 00022 00023 // ***** API'S FUNCTIONAL CORE ***** 00024 extern "C" __attribute__ ((visibility ("default"))) int InitAPI(void); 00025 00026 extern "C" __attribute__ ((visibility ("default"))) int CloseAPI(void); 00027 00028 extern "C" __attribute__ ((visibility ("default"))) int GetCodeVersion(std::vector<int> &Response); 00029 00030 extern "C" __attribute__ ((visibility ("default"))) int GetCartesianPosition(CartesianPosition &Response); 00031 00032 extern "C" __attribute__ ((visibility ("default"))) int GetAngularPosition(AngularPosition &Response); 00033 00034 extern "C" __attribute__ ((visibility ("default"))) int GetCartesianForce(CartesianPosition &Response); 00035 00036 extern "C" __attribute__ ((visibility ("default"))) int GetAngularForce(AngularPosition &Response); 00037 00038 extern "C" __attribute__ ((visibility ("default"))) int GetAngularCurrent(AngularPosition &Response); 00039 00040 extern "C" __attribute__ ((visibility ("default"))) int GetControlOperator(int &Response); 00041 00042 extern "C" __attribute__ ((visibility ("default"))) int GetActualTrajectoryInfo(TrajectoryPoint &Response); 00043 00044 extern "C" __attribute__ ((visibility ("default"))) int GetGlobalTrajectoryInfo(TrajectoryFIFO &Response); 00045 00046 extern "C" __attribute__ ((visibility ("default"))) int GetSensorsInfo(SensorsInfo &Response); 00047 00048 extern "C" __attribute__ ((visibility ("default"))) int GetSingularityVector(SingularityVector &Response); 00049 00050 extern "C" __attribute__ ((visibility ("default"))) int SetAngularControl(); 00051 00052 extern "C" __attribute__ ((visibility ("default"))) int SetCartesianControl(); 00053 00054 extern "C" __attribute__ ((visibility ("default"))) int StartControlAPI(); 00055 00056 extern "C" __attribute__ ((visibility ("default"))) int StopControlAPI(); 00057 00058 extern "C" __attribute__ ((visibility ("default"))) int RestoreFactoryDefault(); 00059 00060 extern "C" __attribute__ ((visibility ("default"))) int SendJoystickCommand(JoystickCommand joystickCommand); 00061 00062 extern "C" __attribute__ ((visibility ("default"))) int SendAdvanceTrajectory(TrajectoryPoint trajectory); 00063 00064 extern "C" __attribute__ ((visibility ("default"))) int SendBasicTrajectory(TrajectoryPoint trajectory); 00065 00066 extern "C" __attribute__ ((visibility ("default"))) int GetClientConfigurations(ClientConfigurations &config); 00067 00068 extern "C" __attribute__ ((visibility ("default"))) int SetClientConfigurations(ClientConfigurations config); 00069 00070 extern "C" __attribute__ ((visibility ("default"))) int EraseAllTrajectories(); 00071 00072 extern "C" __attribute__ ((visibility ("default"))) int GetPositionCurrentActuators(std::vector<float> &Response); 00073 00074 extern "C" __attribute__ ((visibility ("default"))) int SetActuatorPID(unsigned int address, float P, float I, float D); 00075 //}