Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #include <jaco_driver/jaco_api.h>
00010
00011 namespace jaco {
00012
00013 JacoAPI::JacoAPI(void) {
00014
00015 void *USBLib = dlopen(JACO_USB_LIBRARY, RTLD_NOW | RTLD_GLOBAL);
00016 if (USBLib == NULL) {
00017 ROS_WARN("%s", dlerror());
00018 }
00019
00020 InitAPI = (int (*)())dlsym(USBLib, "InitAPI");
00021
00022 CloseAPI = (int (*)())dlsym(USBLib, "CloseAPI");
00023
00024 GetCodeVersion = (int (*)(
00025 std::vector<int> &))dlsym(USBLib, "GetCodeVersion");
00026
00027 GetCartesianPosition = (int (*)(
00028 CartesianPosition &))dlsym(USBLib, "GetCartesianPosition");
00029
00030 GetAngularPosition = (int (*)(
00031 AngularPosition &))dlsym(USBLib, "GetAngularPosition");
00032
00033 GetCartesianForce = (int (*)(
00034 CartesianPosition &))dlsym(USBLib, "GetCartesianForce");
00035
00036 GetAngularForce = (int (*)(
00037 AngularPosition &))dlsym(USBLib, "GetAngularForce");
00038
00039 GetAngularCurrent = (int (*)(
00040 AngularPosition &))dlsym(USBLib, "GetAngularCurrent");
00041
00042 GetControlOperator = (int (*)(int &))dlsym(USBLib, "GetControlOperator");
00043
00044 GetActualTrajectoryInfo = (int (*)(
00045 TrajectoryPoint &))dlsym(USBLib, "GetActualTrajectoryInfo");
00046
00047 GetGlobalTrajectoryInfo = (int (*)(
00048 TrajectoryFIFO &))dlsym(USBLib, "GetGlobalTrajectoryInfo");
00049
00050 GetSensorsInfo = (int (*)(SensorsInfo &))dlsym(USBLib, "GetSensorsInfo");
00051
00052 GetSingularityVector = (int (*)(
00053 SingularityVector &))dlsym(USBLib, "GetSingularityVector");
00054
00055 SetAngularControl = (int (*)())dlsym(USBLib, "SetAngularControl");
00056
00057 SetCartesianControl = (int (*)())dlsym(USBLib, "SetCartesianControl");
00058
00059 StartControlAPI = (int (*)())dlsym(USBLib, "StartControlAPI");
00060
00061 StopControlAPI = (int (*)())dlsym(USBLib, "StopControlAPI");
00062
00063 RestoreFactoryDefault = (int (*)())dlsym(USBLib, "RestoreFactoryDefault");
00064
00065 SendJoystickCommand = (int (*)(
00066 JoystickCommand))dlsym(USBLib, "SendJoystickCommand");
00067
00068 SendAdvanceTrajectory = (int (*)(
00069 TrajectoryPoint))dlsym(USBLib, "SendAdvanceTrajectory");
00070
00071 SendBasicTrajectory = (int (*)(
00072 TrajectoryPoint))dlsym(USBLib, "SendBasicTrajectory");
00073
00074 GetClientConfigurations = (int (*)(
00075 ClientConfigurations &))dlsym(USBLib, "GetClientConfigurations");
00076
00077 SetClientConfigurations = (int (*)(
00078 ClientConfigurations))dlsym(USBLib, "SetClientConfigurations");
00079
00080 EraseAllTrajectories = (int (*)())dlsym(USBLib, "EraseAllTrajectories");
00081
00082 GetPositionCurrentActuators = (int (*)(
00083 std::vector<float> &))dlsym(USBLib, "GetPositionCurrentActuators");
00084
00085 SetActuatorPID = (int (*)(unsigned int, float, float,
00086 float))dlsym(USBLib, "SetActuatorPID");
00087 }
00088
00089 }