Go to the documentation of this file.00001 #ifdef KINOVAAPIUSBCOMMANDLAYER_EXPORTS
00002 #define KINOVAAPIUSBCOMMANDLAYER_API __attribute__ ((visibility ("default")))
00003 #else
00004 #define KINOVAAPIUSBCOMMANDLAYER_API __attribute__ ((visibility ("default")))
00005 #endif
00006
00012 #include <vector>
00013 #include "KinovaTypes.h"
00014
00015
00016 #define COMM_LAYER_PATH "Kinova.API.CommLayerUbuntu.so"
00017
00018
00019 #define SUCCESS 1
00020
00021
00022 #define ERROR_INIT_API 2001 // Error while initializing the API
00023 #define ERROR_LOAD_COMM_DLL 2002 // Error while loading the communication layer
00024
00025 #define ERROR_INVALID_PARAM 2100 // Input parameter of the function is invalid
00026 #define ERROR_UNKNOWN_DEVICE 2200 // The device is not recognized by the API
00027
00028
00029 #define JACO_NACK_FIRST 2003
00030 #define JACO_COMM_FAILED 2004
00031 #define JACO_NACK_NORMAL 2005
00032
00033
00034 #define COMMAND_LAYER_VERSION 50006
00035
00036
00037
00038 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int InitAPI(void);
00039
00040 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int CloseAPI(void);
00041
00042 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetCodeVersion(std::vector<int> &Response);
00043
00044 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetAPIVersion(std::vector<int> &Response);
00045
00046 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetCartesianPosition(CartesianPosition &Response);
00047
00048 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetAngularPosition(AngularPosition &Response);
00049
00050 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetCartesianForce(CartesianPosition &Response);
00051
00052 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetAngularForce(AngularPosition &Response);
00053
00054 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetAngularCurrent(AngularPosition &Response);
00055
00056 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetActualTrajectoryInfo(TrajectoryPoint &Response);
00057
00058 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetGlobalTrajectoryInfo(TrajectoryFIFO &Response);
00059
00060 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetSensorsInfo(SensorsInfo &Response);
00061
00062 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetSingularityVector(SingularityVector &Response);
00063
00064 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetAngularControl();
00065
00066 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetCartesianControl();
00067
00068 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int StartControlAPI();
00069
00070 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int StopControlAPI();
00071
00072 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int RestoreFactoryDefault();
00073
00074 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SendJoystickCommand(JoystickCommand joystickCommand);
00075
00076 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SendAdvanceTrajectory(TrajectoryPoint trajectory);
00077
00078 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SendBasicTrajectory(TrajectoryPoint trajectory);
00079
00080 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetClientConfigurations(ClientConfigurations &config);
00081
00082 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetClientConfigurations(ClientConfigurations config);
00083
00084 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int EraseAllTrajectories();
00085
00086 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetPositionCurrentActuators(std::vector<float> &Response);
00087
00088 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetActuatorPID(unsigned int address, float P, float I, float D);
00089
00090 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetAngularCommand(AngularPosition &Response);
00091
00092 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetCartesianCommand(CartesianPosition &Response);
00093
00094 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetAngularCurrentMotor(AngularPosition &Response);
00095
00096 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetAngularVelocity(AngularPosition &Response);
00097
00098 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetControlType(int &Response);
00099
00100 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int StartForceControl();
00101
00102 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int StopForceControl();
00103
00104 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int StartCurrentLimitation();
00105
00106 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int StopCurrentLimitation();
00107
00108 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetSystemErrorCount(unsigned int &Response);
00109
00110 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetSystemError(unsigned int indexError, SystemError &Response);
00111
00112 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int ClearErrorLog();
00113
00114 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int EraseAllProtectionZones();
00115
00116 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetSerialNumber(char Command[STRING_LENGTH]);
00117
00118 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetControlMapping(ControlMappingCharts &Response);
00119
00120 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetProtectionZone(ZoneList &Response);
00121
00122 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetProtectionZone(ZoneList Command);
00123
00124 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetGripperStatus(Gripper &Response);
00125
00126 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetQuickStatus(QuickStatus &Response);
00127
00128 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetForcesInfo(ForcesInfo &Response);
00129
00130 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetControlMapping(ControlMappingCharts Command);
00131
00132 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int ProgramFlash(char * filename);
00133
00134 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetJointZero(int ActuatorAdress);
00135
00136 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetTorqueZero(int ActuatorAdress);
00137
00138 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetTorqueGain(int ActuatorAdress, int Gain);
00139
00140 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetActuatorPIDFilter(int ActuatorAdress, float filterP, float filterI,
00141 float filterD);
00142
00143 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetActuatorAddress(int ActuatorAdress, int newAddress);
00144
00145 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetGeneralInformations(GeneralInformations &Response);
00146
00147 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetFrameType(int frameType);
00148
00149 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetCartesianForceMinMax(CartesianInfo min, CartesianInfo max);
00150
00151 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetCartesianInertiaDamping(CartesianInfo inertia, CartesianInfo damping);
00152
00153 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetAngularTorqueMinMax(AngularInfo min, AngularInfo max);
00154
00155 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetAngularInertiaDamping(AngularInfo inertia, AngularInfo damping);
00156
00157
00158 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetDevValue(std::vector<float> command);
00159
00160
00161 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetDevValue(std::vector<float> &Response);
00162
00163 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetSpasmFilterValues(std::vector<float> Response, int activationStatus);
00164
00165 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetSpasmFilterValues(std::vector<float> &Response, int &activationStatus);
00166
00167 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int MoveHome();
00168
00169 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetAngularForceGravityFree(AngularPosition &Response);
00170
00171 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetActuatorAcceleration(AngularAcceleration &Response);
00172
00173 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int InitFingers();
00174
00175 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int GetPeripheralInventory(std::vector<PeripheralInfo> &);
00176
00177
00178 extern "C" KINOVAAPIUSBCOMMANDLAYER_API int SetModel(char Command[STRING_LENGTH], char temp[STRING_LENGTH]);
00179