Add Aubo arm support

This commit is contained in:
xtkuang 2026-07-02 08:29:19 +08:00
parent 9b6f1b8d21
commit 27445c00f5
957 changed files with 485777 additions and 62 deletions

View File

@ -1,6 +0,0 @@
{
"recommendations": [
"ms-vscode.cpptools",
"ms-vscode.cmake-tools"
]
}

40
.vscode/launch.json vendored
View File

@ -1,32 +1,30 @@
{ {
"version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "C/C++: g++ 构建和调试活动文件", "name": "Debug cmvr_es (installed output)",
"type": "cppdbg", "type": "cppdbg",
"request": "launch", "request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}", "program": "${workspaceFolder}/output/bin/cmvr_es",
"args": [], "args": [],
"stopAtEntry": false, "stopAtEntry": false,
"cwd": "${fileDirname}", "cwd": "${workspaceFolder}/output/bin",
"environment": [], "environment": [
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{ {
"description": "为 gdb 启用整齐打印", "name": "LD_LIBRARY_PATH",
"text": "-enable-pretty-printing", "value": "${workspaceFolder}/output/lib:${env:LD_LIBRARY_PATH}"
"ignoreFailures": true
},
{
"description": "将反汇编风格设置为 Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
} }
], ],
"preLaunchTask": "C/C++: g++ 生成活动文件", "externalConsole": false,
"miDebuggerPath": "/usr/bin/gdb" "MIMode": "gdb",
"preLaunchTask": "cmake: install",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
} }
], ]
"version": "2.0.0" }
}

19
.vscode/settings.json vendored
View File

@ -1,12 +1,11 @@
{ {
"cmake.configureOnOpen": true, "cmake.sourceDirectory": "${workspaceFolder}",
"cmake.buildDirectory": "${workspaceFolder}/cmake-build-debug", "cmake.buildDirectory": "${workspaceFolder}/build/vscode-debug",
"cmake.copyCompileCommands": "${workspaceFolder}/compile_commands.json", "cmake.configureSettings": {
"cmake.configureSettings": { "CMAKE_BUILD_TYPE": "Debug",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON" "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}, },
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", "C_Cpp.default.compileCommands": "${workspaceFolder}/build/vscode-debug/compile_commands.json",
"C_Cpp.default.compileCommands": "${workspaceFolder}/compile_commands.json", "C_Cpp.default.cppStandard": "c++17",
"C_Cpp.default.cppStandard": "c++17", "C_Cpp.default.intelliSenseMode": "linux-gcc-x64"
"C_Cpp.default.intelliSenseMode": "linux-gcc-x64"
} }

74
.vscode/tasks.json vendored
View File

@ -1,25 +1,71 @@
{ {
"version": "2.0.0",
"tasks": [ "tasks": [
{ {
"type": "cppbuild", "label": "cmake: configure",
"label": "C/C++: g++ 生成活动文件", "type": "shell",
"command": "/usr/bin/g++", "command": "cmake",
"args": [ "args": [
"-fdiagnostics-color=always", "-S",
"-g", "${workspaceFolder}",
"${file}", "-B",
"-o", "${workspaceFolder}/build/vscode-debug",
"${fileDirname}/${fileBasenameNoExtension}" "-DCMAKE_BUILD_TYPE=Debug",
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
], ],
"options": { "group": "build",
"cwd": "${fileDirname}" "problemMatcher": []
},
{
"label": "cmake: build",
"type": "shell",
"command": "cmake",
"args": [
"--build",
"${workspaceFolder}/build/vscode-debug",
"-j",
"8"
],
"dependsOn": [
"cmake: configure"
],
"group": {
"kind": "build",
"isDefault": true
}, },
"problemMatcher": [ "problemMatcher": [
"$gcc" "$gcc"
]
},
{
"label": "cmake: install",
"type": "shell",
"command": "cmake",
"args": [
"--install",
"${workspaceFolder}/build/vscode-debug",
"--verbose"
],
"dependsOn": [
"cmake: build"
], ],
"group": "build", "group": "build",
"detail": "调试器生成的任务。" "problemMatcher": []
},
{
"label": "cmvr_es: run installed",
"type": "shell",
"command": "${workspaceFolder}/output/bin/cmvr_es",
"options": {
"cwd": "${workspaceFolder}/output/bin",
"env": {
"LD_LIBRARY_PATH": "${workspaceFolder}/output/lib:${env:LD_LIBRARY_PATH}"
}
},
"dependsOn": [
"cmake: install"
],
"problemMatcher": []
} }
], ]
"version": "2.0.0" }
}

View File

@ -63,6 +63,7 @@ function(setup_external_libs ARCH)
"${FULL_PATH}/lib/*.so" "${FULL_PATH}/lib/*.so"
"${FULL_PATH}/lib/*.so.*" "${FULL_PATH}/lib/*.so.*"
) )
list(FILTER _SO_FILES EXCLUDE REGEX "/libstdc\\+\\+\\.so(\\..*)?$")
if(_SO_FILES) if(_SO_FILES)
list(APPEND INSTALL_SO_FILES ${_SO_FILES}) list(APPEND INSTALL_SO_FILES ${_SO_FILES})
endif() endif()
@ -85,6 +86,7 @@ function(setup_external_libs ARCH)
"${FULL_PATH}/*.so" "${FULL_PATH}/*.so"
"${FULL_PATH}/*.so.*" "${FULL_PATH}/*.so.*"
) )
list(FILTER _SO_FILES2 EXCLUDE REGEX "/libstdc\\+\\+\\.so(\\..*)?$")
if(_SO_FILES2) if(_SO_FILES2)
list(APPEND INSTALL_SO_FILES ${_SO_FILES2}) list(APPEND INSTALL_SO_FILES ${_SO_FILES2})
endif() endif()
@ -138,6 +140,14 @@ function(setup_external_libs ARCH)
) )
install(FILES ${INSTALL_SO_FILES} DESTINATION lib) install(FILES ${INSTALL_SO_FILES} DESTINATION lib)
install(CODE [[
file(GLOB _bundled_stdlib_files
"${CMAKE_INSTALL_PREFIX}/lib/libstdc++.so"
"${CMAKE_INSTALL_PREFIX}/lib/libstdc++.so.*")
if(_bundled_stdlib_files)
file(REMOVE ${_bundled_stdlib_files})
endif()
]])
# After installing, patch RPATH of installed shared libs to $ORIGIN # After installing, patch RPATH of installed shared libs to $ORIGIN
install(CODE [[ install(CODE [[

View File

@ -1,13 +1,36 @@
add_library(aubo_arm SHARED add_library(aubo_arm SHARED
src/aubo_arm.cpp aubo_arm.cpp
) )
target_include_directories(aubo_arm PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(aubo_arm PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
set(AUBO_SDK_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/third_party/AuboSdk/linux/include) set(AUBO_SDK_ROOT ${CMAKE_SOURCE_DIR}/dependency/${ARCH}/third_party/aubo_sdk/v0.27.1)
set(AUBO_SDK_LIB_DIR ${CMAKE_SOURCE_DIR}/third_party/AuboSdk/linux/lib) set(AUBO_SDK_INCLUDE_DIR ${AUBO_SDK_ROOT}/include)
set(AUBO_SDK_LIB_DIR ${AUBO_SDK_ROOT}/lib)
if (EXISTS "${AUBO_SDK_INCLUDE_DIR}/aubo_sdk/rpc.h") if (EXISTS "${AUBO_SDK_LIB_DIR}/cmake/aubo_sdk/aubo_sdkConfig.cmake")
list(APPEND CMAKE_PREFIX_PATH "${AUBO_SDK_LIB_DIR}/cmake")
find_package(Qt5Core QUIET)
if (NOT Qt5Core_FOUND AND NOT TARGET Qt5::Core)
find_library(QT5_CORE_LIBRARY
NAMES Qt5Core libQt5Core.so.5
PATHS /lib /usr/lib /usr/local/lib /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu
)
if (QT5_CORE_LIBRARY)
add_library(Qt5::Core UNKNOWN IMPORTED)
set_target_properties(Qt5::Core PROPERTIES
IMPORTED_LOCATION "${QT5_CORE_LIBRARY}"
)
endif()
endif()
find_package(aubo_sdk REQUIRED CONFIG PATHS "${AUBO_SDK_LIB_DIR}/cmake/aubo_sdk" NO_DEFAULT_PATH)
set_target_properties(aubo_sdk::aubo_sdk aubo_sdk::robot_proxy PROPERTIES
MAP_IMPORTED_CONFIG_DEBUG Release
)
target_compile_definitions(aubo_arm PRIVATE CMVR_HAS_AUBO_SDK)
target_include_directories(aubo_arm PRIVATE ${AUBO_SDK_INCLUDE_DIR})
target_link_libraries(aubo_arm PRIVATE aubo_sdk::aubo_sdk)
elseif (EXISTS "${AUBO_SDK_INCLUDE_DIR}/aubo_sdk/rpc.h")
target_compile_definitions(aubo_arm PRIVATE CMVR_HAS_AUBO_SDK) target_compile_definitions(aubo_arm PRIVATE CMVR_HAS_AUBO_SDK)
target_include_directories(aubo_arm PRIVATE ${AUBO_SDK_INCLUDE_DIR}) target_include_directories(aubo_arm PRIVATE ${AUBO_SDK_INCLUDE_DIR})
if (EXISTS "${AUBO_SDK_LIB_DIR}") if (EXISTS "${AUBO_SDK_LIB_DIR}")

View File

@ -1,4 +1,4 @@
#include "devices/arm/aubo_arm/include/aubo_arm.h" #include "devices/arm/aubo_arm/aubo_arm.h"
#include <algorithm> #include <algorithm>
#include <chrono> #include <chrono>
@ -40,6 +40,42 @@ std::string vendorBrandName(const config::VendorRobotArmBrand brand)
} }
} }
#if defined(CMVR_HAS_AUBO_SDK)
using arcs::common_interface::RobotModeType;
using arcs::aubo_sdk::RobotInterfacePtr;
bool waitForRobotMode(const RobotInterfacePtr& robot_interface,
const RobotModeType& target_mode)
{
const auto start_time = std::chrono::steady_clock::now();
while (std::chrono::steady_clock::now() - start_time < std::chrono::seconds(20)) {
const auto current_mode = robot_interface->getRobotState()->getRobotModeType();
if (current_mode == target_mode) {
return true;
}
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
return false;
}
int waitArrival(const RobotInterfacePtr& robot_interface)
{
int retry_count = 0;
int exec_id = robot_interface->getMotionControl()->getExecId();
while (exec_id == -1 && retry_count++ < 5) {
std::this_thread::sleep_for(std::chrono::milliseconds(50));
exec_id = robot_interface->getMotionControl()->getExecId();
}
if (exec_id == -1) {
return -1;
}
while (robot_interface->getMotionControl()->getExecId() != -1) {
std::this_thread::sleep_for(std::chrono::milliseconds(50));
}
return 0;
}
#endif
} // namespace } // namespace
#if defined(CMVR_HAS_AUBO_SDK) #if defined(CMVR_HAS_AUBO_SDK)
@ -159,7 +195,38 @@ JointGroupState AuboArm::getJointState() const
CartesianPose AuboArm::getTcpPose(FrameType frame) const CartesianPose AuboArm::getTcpPose(FrameType frame) const
{ {
(void)frame; (void)frame;
return {}; CartesianPose pose;
#if defined(CMVR_HAS_AUBO_SDK)
if (!connected_.load() || !sdk_ || !sdk_->rpc_client) {
return pose;
}
try {
const auto robot_names = sdk_->rpc_client->getRobotNames();
if (robot_names.empty()) {
CMVR_LOG(ERROR) << "[AuboArm] getTcpPose failed: robot name list is empty";
return pose;
}
auto robot_interface = sdk_->rpc_client->getRobotInterface(robot_names.front());
if (!robot_interface) {
CMVR_LOG(ERROR) << "[AuboArm] getTcpPose failed: robot interface is null";
return pose;
}
const auto pose_values = robot_interface->getRobotState()->getTcpPose();
if (pose_values.size() >= 6) {
pose.x = pose_values[0];
pose.y = pose_values[1];
pose.z = pose_values[2];
pose.rx = pose_values[3];
pose.ry = pose_values[4];
pose.rz = pose_values[5];
}
} catch (const std::exception& e) {
CMVR_LOG(ERROR) << "[AuboArm] getTcpPose failed: " << e.what();
}
#endif
return pose;
} }
RobotMode AuboArm::getRobotMode() const RobotMode AuboArm::getRobotMode() const
@ -197,11 +264,16 @@ Result AuboArm::torqueOn()
std::vector<double> inertia(6, 0.0); std::vector<double> inertia(6, 0.0);
robot_interface->getRobotConfig()->setPayload(mass, cog, aom, inertia); robot_interface->getRobotConfig()->setPayload(mass, cog, aom, inertia);
if (robot_interface->getRobotState()->getRobotModeType() != const auto current_mode = robot_interface->getRobotState()->getRobotModeType();
arcs::common_interface::RobotModeType::Running) { if (current_mode != arcs::common_interface::RobotModeType::Running) {
robot_interface->getRobotManage()->poweron(); robot_interface->getRobotManage()->poweron();
std::this_thread::sleep_for(std::chrono::milliseconds(200)); if (!waitForRobotMode(robot_interface, arcs::common_interface::RobotModeType::Idle)) {
return Result::failure(ArmErrorCode::CommandFailed, "[AuboArm] torqueOn failed: timeout waiting for Idle");
}
robot_interface->getRobotManage()->startup(); robot_interface->getRobotManage()->startup();
if (!waitForRobotMode(robot_interface, arcs::common_interface::RobotModeType::Running)) {
return Result::failure(ArmErrorCode::CommandFailed, "[AuboArm] torqueOn failed: timeout waiting for Running");
}
} }
emergency_stopped_ = false; emergency_stopped_ = false;
return Result::success(); return Result::success();
@ -231,6 +303,9 @@ Result AuboArm::torqueOff()
return Result::failure(ArmErrorCode::RobotNotReady, "[AuboArm] robot interface is null"); return Result::failure(ArmErrorCode::RobotNotReady, "[AuboArm] robot interface is null");
} }
robot_interface->getRobotManage()->poweroff(); robot_interface->getRobotManage()->poweroff();
if (!waitForRobotMode(robot_interface, arcs::common_interface::RobotModeType::PowerOff)) {
return Result::failure(ArmErrorCode::CommandFailed, "[AuboArm] torqueOff failed: timeout waiting for PowerOff");
}
return Result::success(); return Result::success();
} catch (const std::exception& e) { } catch (const std::exception& e) {
return Result::failure(ArmErrorCode::CommandFailed, std::string("[AuboArm] torqueOff failed: ") + e.what()); return Result::failure(ArmErrorCode::CommandFailed, std::string("[AuboArm] torqueOff failed: ") + e.what());
@ -293,6 +368,9 @@ Result AuboArm::moveJ(const JointPositionCommand& target, const MotionOptions& o
options.velocity > 0.0 ? options.velocity : 0.5, options.velocity > 0.0 ? options.velocity : 0.5,
options.blend_radius, options.blend_radius,
0); 0);
if (waitArrival(robot_interface) != 0) {
return Result::failure(ArmErrorCode::CommandFailed, "[AuboArm] moveJ did not complete");
}
return Result::success(); return Result::success();
} catch (const std::exception& e) { } catch (const std::exception& e) {
return Result::failure(ArmErrorCode::CommandFailed, std::string("[AuboArm] moveJ failed: ") + e.what()); return Result::failure(ArmErrorCode::CommandFailed, std::string("[AuboArm] moveJ failed: ") + e.what());
@ -348,6 +426,9 @@ Result AuboArm::moveL(const CartesianPose& target, const MotionOptions& options,
options.velocity > 0.0 ? options.velocity : 0.25, options.velocity > 0.0 ? options.velocity : 0.25,
options.blend_radius, options.blend_radius,
0); 0);
if (waitArrival(robot_interface) != 0) {
return Result::failure(ArmErrorCode::CommandFailed, "[AuboArm] moveL did not complete");
}
return Result::success(); return Result::success();
} catch (const std::exception& e) { } catch (const std::exception& e) {
return Result::failure(ArmErrorCode::CommandFailed, std::string("[AuboArm] moveL failed: ") + e.what()); return Result::failure(ArmErrorCode::CommandFailed, std::string("[AuboArm] moveL failed: ") + e.what());
@ -385,7 +466,7 @@ Result AuboArm::stopMotion()
} }
auto robot_interface = sdk_->rpc_client->getRobotInterface(robot_names.front()); auto robot_interface = sdk_->rpc_client->getRobotInterface(robot_names.front());
if (robot_interface) { if (robot_interface) {
robot_interface->getMotionControl()->stopMove(); robot_interface->getMotionControl()->stopMove(true, true);
} }
busy_.store(false); busy_.store(false);
return Result::success(); return Result::success();

View File

@ -6,7 +6,7 @@
#include "cmvr/config/arm_config/arm_config.pb.h" #include "cmvr/config/arm_config/arm_config.pb.h"
#include "common/base/logging/logger.h" #include "common/base/logging/logger.h"
#include "devices/arm/aubo_arm/include/aubo_arm.h" #include "devices/arm/aubo_arm/aubo_arm.h"
#include "devices/arm/huayan_arm/huayan_arm.h" #include "devices/arm/huayan_arm/huayan_arm.h"
#include "devices/arm/motor_robot_arm/include/motor_robot_arm.h" #include "devices/arm/motor_robot_arm/include/motor_robot_arm.h"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,403 @@
/** @file aubo_api.h
* @brief \~chinese API接口
* @brief \~english API for controlling the robot and external axis
*/
#ifndef AUBO_SDK_AUBO_API_INTERFACE_H
#define AUBO_SDK_AUBO_API_INTERFACE_H
#include <aubo/system_info.h>
#include <aubo/runtime_machine.h>
#include <aubo/register_control.h>
#include <aubo/robot_interface.h>
#include <aubo/global_config.h>
#include <aubo/math.h>
#include <aubo/socket.h>
#include <aubo/serial.h>
#include <aubo/axis_interface.h>
#include <aubo/gripper_interface.h>
namespace arcs {
namespace common_interface {
/**
* \chinese
* @defgroup AuboApi AuboApi ()
* @ingroup AuboApi
* AuboApi
* \endchinese
*
* \english
* @defgroup AuboApi Main Entrance
* @ingroup AuboApi
* AuboApi
* \endenglish
*/
class ARCS_ABI_EXPORT AuboApi
{
public:
AuboApi();
virtual ~AuboApi();
/**
* @ingroup AuboApi
* @ref Math
* \chinese
*
*
* @return MathPtr对象的指针
*
* @par Python函数原型
* getMath(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.Math
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* MathPtr ptr = rpc_cli->getMath();
* @endcode
* \endchinese
*
*\english
* Get pure mathematic related API
*
* @return Shared pointer to a Math object
*
* @par Python function prototype
* getMath(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.Math
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* MathPtr ptr = rpc_cli->getMath();
* @endcode
*\endenglish
*/
MathPtr getMath();
/**
* @ingroup AuboApi
* @ref SystemInfo
* \chinese
*
*
* @return SystemInfoPtr对象的指针
*
* @par Python函数原型
* getSystemInfo(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.SystemInfo
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* SystemInfoPtr ptr = rpc_cli->getSystemInfo();
* @endcode
* \endchinese
*
* \english
* Get system info
*
* @return Shared pointer to SystemInfo object
*
* @par Python function prototype
* getSystemInfo(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.SystemInfo
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* SystemInfoPtr ptr = rpc_cli->getSystemInfo();
* @endcode
* \endenglish
*/
SystemInfoPtr getSystemInfo();
/**
* @ingroup AuboApi
* @ref RuntimeMachine
* \chinese
*
*
* @return RuntimeMachinePtr对象的指针
*
* @par Python函数原型
* getRuntimeMachine(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.RuntimeMachine
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* RuntimeMachinePtr ptr = rpc_cli->getRuntimeMachine();
* @endcode
* \endchinese
*
* \english
* Get runtime api
*
* @return Shared pointer to RuntimeMachine object
* Python function prototype
* getRuntimeMachine(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.RuntimeMachine
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* RuntimeMachinePtr ptr = rpc_cli->getRuntimeMachine();
* @endcode
* \endenglish
*/
RuntimeMachinePtr getRuntimeMachine();
/**
* @ingroup AuboApi
* @ref RegisterControl
* \chinese
*
*
* @return RegisterControlPtr对象的指针
*
* @par Python函数原型
* getRegisterControl(self: pyaubo_sdk.AuboApi) ->
* pyaubo_sdk.RegisterControl
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* RegisterControlPtr ptr = rpc_cli->getRegisterControl();
* @endcode
* \endchinese
*
* \english
* External registers api
*
* @return Shared pointer to RegisterControl object
*
* @par Python function prototype
* getRegisterControl(self: pyaubo_sdk.AuboApi) ->
* pyaubo_sdk.RegisterControl
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* RegisterControlPtr ptr = rpc_cli->getRegisterControl();
* @endcode
* \endenglish
*/
RegisterControlPtr getRegisterControl();
/**
* @ingroup AuboApi
* \chinese
*
*
* @return
*
* @par Python函数原型
* getRobotNames(self: pyaubo_sdk.AuboApi) -> List[str]
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* @endcode
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"getRobotNames","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":["rob1"]}
* \endchinese
*
* \english
* Get robot list
*
* @return robot list
*
* @par Python function prototype
* getRobotNames(self: pyaubo_sdk.AuboApi) -> List[str]
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* @endcode
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"getRobotNames","params":[],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":["rob1"]}
* \endenglish
*/
std::vector<std::string> getRobotNames();
/**
* @ingroup AuboApi
* @ref RobotInterface
* \chinese
* RobotInterfacePtr
*
* @param name
* @return RobotInterfacePtr对象的指针
*
* @par Python函数原型
* getRobotInterface(self: pyaubo_sdk.AuboApi, arg0: str) ->
* pyaubo_sdk.RobotInterface
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* RobotInterfacePtr ptr = rpc_cli->getRobotInterface(robot_name);
* @endcode
* \endchinese
*
* \english
* Get RobotInterfacePtr based on name
*
* @param name Robot name
* @return Shared pointer to a RobotInterface object
*
* @par Python function prototype
* getRobotInterface(self: pyaubo_sdk.AuboApi, arg0: str) ->
* pyaubo_sdk.RobotInterface
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* RobotInterfacePtr ptr = rpc_cli->getRobotInterface(robot_name);
* @endcode
* \endenglish
*/
RobotInterfacePtr getRobotInterface(const std::string &name);
/**
* @ingroup AuboApi
* \~chinese \~english Get external axis list
*
* @return
*/
std::vector<std::string> getAxisNames();
/**
* @ingroup AuboApi
* @ref AxisInterface
* \chinese
*
*
* @param name
* @return
* \endchinese
*
* \english
* Get external axis interface
*
* @param name
* @return
* \endenglish
*/
AxisInterfacePtr getAxisInterface(const std::string &name);
/**
* @ingroup AuboApi
* @ref Socket
* \chinese
* socket
* @return SocketPtr对象的指针
*
* @par Python函数原型
* getSocket(self: pyaubo_sdk.AuboApi) -> arcs::common_interface::Socket
* @endcode
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* SocketPtr ptr = rpc_cli->getSocket();
* @endcode
* \endchinese
*
* \english
* Get socket
* @return Shared pointer to a socket object
*
* @par Python function prototype
* getSocket(self: pyaubo_sdk.AuboApi) -> arcs::common_interface::Socket
* @endcode
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* SocketPtr ptr = rpc_cli->getSocket();
* @endcode
* \endenglish
*/
SocketPtr getSocket();
/**
* @ingroup AuboApi
* @ref Serial
* \chinese
* Serial串口
* @return SerialPtr对象的指针
*
* @par Python函数原型
* getSerial(self: pyaubo_sdk.AuboApi) -> arcs::common_interface::Serial
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* SerialPtr ptr = rpc_cli->getSerial();
* @endcode
* \endchinese
*
* \english
* @return Shared pointer to Serial object
*
* @par Python function prototype
* getSerial(self: pyaubo_sdk.AuboApi) -> arcs::common_interface::Serial
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* SerialPtr ptr = rpc_cli->getSerial();
* @endcode
* \endenglish
*/
SerialPtr getSerial();
/**
* @ingroup AuboApi
* @ref SyncMove
* \~chinese \~english Get syncronous move interface
*
* \~chinese @return SyncMovePtr对象的指针
* \~english @return Shared pointer to SyncMove object
*/
SyncMovePtr getSyncMove(const std::string &name);
/**
* @ingroup AuboApi
* @ref Trace
* \~chinese
* \~english Get alert interface
*
* \~chinese @return TracePtr对象的指针
* \~english @return Shared pointer of trace object
*/
TracePtr getTrace(const std::string &name);
/**
* @ingroup AuboApi
* @ref GripperInterface
* \~chinese
* \~english Get gripper interface
*
* \~chinese @return GripperInterfacePtr对象的指针
* \~english @return Shared pointer of gripper object
*/
GripperInterfacePtr getGripperInterface();
protected:
void *d_{ nullptr };
};
using AuboApiPtr = std::shared_ptr<AuboApi>;
} // namespace common_interface
} // namespace arcs
#endif // AUBO_SDK_AUBO_API_H

View File

@ -0,0 +1,650 @@
/** @file axes.h
* @brief
*/
#ifndef AUBO_SDK_AXIS_INTERFACE_H
#define AUBO_SDK_AXIS_INTERFACE_H
#include <aubo/sync_move.h>
#include <aubo/trace.h>
namespace arcs {
namespace common_interface {
/**
* \chinese
* @defgroup AxisInterface AxisInterface ()
* API接口
* \endchinese
*
* \english
* @defgroup AxisInterface External Axis
* External axis API interface
* \endenglish
*/
class ARCS_ABI_EXPORT AxisInterface
{
public:
AxisInterface();
virtual ~AxisInterface();
/**
* @ingroup AxisInterface
* \~chinese
* \~english Power on
* @return
*/
int poweronExtAxis();
/**
* @ingroup AxisInterface
* \~chinese
* \~english Power off
* @return
*/
int poweroffExtAxis();
/**
* @ingroup AxisInterface
* \~chinese 使
* \~english Enable
* @return
*/
int enableExtAxis();
/**
* @ingroup AxisInterface
* \~chinese 姿()
* \~chinese @param pose
* \~english Set mounting pose of external axis (wrt world frame)
* \~english @param pose
* @return
*/
int setExtAxisMountingPose(const std::vector<double> &pose);
/**
* @ingroup AxisInterface
* \chinese
*
* @param pos
* @param v
* @param a
* @param duration
* @return
* \endchinese
*
* \english move to pos, rotation or linear
*
* @param pos
* @param v
* @param a
* @param duration
* @return
* \endenglish
*/
int moveExtJoint(double pos, double v, double a, double duration);
/**
* @ingroup AxisInterface
* \chinese
*
*
* @param v
* @param a
* @param duration
* @return
* \endchinese
*
* \english
* Set target speed, acceleration and duration
* @param v
* @param a
* @param duration
* @return
* \endenglish
*/
int speedExtJoint(double v, double a, double duration);
/**
* @ingroup AxisInterface
* \chinese
*
*
* @param a
* @return
* \endchinese
*
* \english
* stop ext joint
* @param a
* @return
* \endenglish
*/
int stopExtJoint(double a);
/**
* @ingroup AxisInterface
* \~chinese 0 1
* \~english Get external axis type: 0 for rotation, 1 for linear
* @return
*/
int getExtAxisType();
/**
* @ingroup AxisInterface
* \~chinese
* @param type 0 1
*
* \~english Set external axis type
* @param type: 0 for rotation, 1 for linear
* @return
*/
int setExtAxisType(int type);
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis status
*
* @return Current exteral axis status
* \endenglish
*/
AxisModeType getAxisModeType();
/**
* @ingroup AxisInterface
* \chinese
* 姿
*
* @return 姿
* \endchinese
*
* \english
* Get external axis mounting pose
*
* @return External axis pose
* \endenglish
*/
std::vector<double> getExtAxisMountingPose();
/**
* @ingroup AxisInterface
* \chinese
* 姿
*
* @return 姿
* \endchinese
*
* \english
* Get pose wrt mounting coordinate system, axis can be positioner or linear
* rail
*
* @return Pose wrt mounting coordinate system
* \endenglish
*/
std::vector<double> getExtAxisPose();
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis position
*
* @return External axis position
* \endenglish
*/
double getExtAxisPosition();
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis speed
*
* @return External axis speed
* \endenglish
*/
double getExtAxisVelocity();
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Set external axis speed
*
* @return
* \endenglish
*/
int setExtAxisVelocity(double velocity);
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis acceleration
*
* @return External axis acceleration
* \endenglish
*/
double getExtAxisAcceleration();
/**
* @ingroup AxisInterface
* \chinese
*
*
* @param acc
* @return
* \endchinese
*
* \english
* Set external axis acceleration
*
* @param acc
* @return
* \endenglish
*/
int setExtAxisAcceleration(double acc);
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis current
*
* @return External axis current
* \endenglish
*/
double getExtAxisCurrent();
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis temperature
*
* @return External axis temperature
* \endenglish
*/
double getExtAxisTemperature();
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis voltage
*
* @return External axis voltage
* \endenglish
*/
double getExtAxisBusVoltage();
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis current
*
* @return external axis current
* \endenglish
*/
double getExtAxisBusCurrent();
/**
* @ingroup AxisInterface
* \chinese
* ()
*
* @return
* \endchinese
*
* \english
* Get external axis max position
*
* @return External axis max position
* \endenglish
*/
double getExtAxisMaxPosition();
/**
* @ingroup AxisInterface
* \chinese
* (/)
*
* @param q
* @return
* \endchinese
*
* \english
* Set external axis max position
*
* @param q
* @return
* \endenglish
*/
int setExtAxisMaxPositionLimit(double q);
/**
* @ingroup AxisInterface
* \chinese
* (/)
*
* @return
* \endchinese
*
* \english
* Get external axis max position
*
* @return External axis max position
* \endenglish
*/
double getExtAxisMaxPositionLimit();
/**
* @ingroup AxisInterface
* \chinese
* ()
*
* @return
* \endchinese
*
* \english
* Get external axis min position
*
* @return External axis min position
* \endenglish
*/
double getExtMinPosition();
/**
* @ingroup AxisInterface
* \chinese
* (/)
*
* @param q
* @return
* \endchinese
*
* \english
* Set external axis min position
*
* @param q
* @return
* \endenglish
*/
int setExtMinPositionLimit(double q);
/**
* @ingroup AxisInterface
* \chinese
* (/)
*
* @return
* \endchinese
*
* \english
* Get external axis min position
*
* @return External axis min position
* \endenglish
*/
double getExtMinPositionLimit();
/**
* @ingroup AxisInterface
* \chinese
* ()
*
* @return
* \endchinese
*
* \english
* Get external axis max speed
*
* @return External axis max speed
* \endenglish
*/
double getExtAxisMaxVelocity();
/**
* @ingroup AxisInterface
* \chinese
* (/)
*
* @param v
* @return
* \endchinese
*
* \english
* Set external axis max speed
*
* @param v
* @return
* \endenglish
*/
int setExtAxisMaxVelocityLimit(double v);
/**
* @ingroup AxisInterface
* \chinese
* (/)
*
* @return
* \endchinese
*
* \english
* Get external axis max speed
*
* @return External axis max speed
* \endenglish
*/
double getExtAxisMaxVelocityLimit();
/**
* @ingroup AxisInterface
* \chinese
* ()
*
* @return
* \endchinese
*
* \english
* Get external axis max acceleration
*
* @return External axis max acceleration
* \endenglish
*/
double getExtAxisMaxAcceleration();
/**
* @ingroup AxisInterface
* \chinese
* (/)
*
* @param acc
* @return
* \endchinese
*
* \english
* Set external axis max acceleration
*
* @param acc
* @return
* \endenglish
*/
int setExtAxisMaxAccelerationLimit(double acc);
/**
* @ingroup AxisInterface
* \chinese
* (/)
*
* @return
* \endchinese
*
* \english
* Get external axis max acceleration
*
* @return External axis max acceleration
* \endenglish
*/
double getExtAxisMaxAccelerationLimit();
/**
* @ingroup AxisInterface
* \chinese
* (使)
*
* @param target_name
* @param phase
* @param err
* @return
* \endchinese
*
* \english
* Follow motion of another external axis not to be used during motion
*
* @param target_name name of target axis
* @param phase phase difference
* @param err max error when following motion
* @return
* \endenglish
*/
int followAnotherAxis(const std::string &target_name, double phase,
double err);
/**
* @ingroup AxisInterface
* \~chinese @brief stopFollowAnotherAxis(使)
* \~english @brief stopFollowAnotherAxis(not to be used during motion)
* @return
*/
int stopFollowAnotherAxis();
/**
* @ingroup AxisInterface
* \~chinese @brief getErrorCode()
* \~english @brief getErrorCode(Get raw external axis error code)
* @return
*/
int getErrorCode();
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Reset axis error
*
* @return
* \endenglish
*/
int clearAxisError();
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Set current external axis position as zero.
*
* @return
* \endenglish
*/
int setExtAxisZero();
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Set axis reduction ratio
*
* @return
* \endenglish
*/
int setReductionRatio(double ratio);
/**
* @ingroup AxisInterface
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get axis reduction ratio
*
* @return
* \endenglish
*/
double getReductionRatio();
protected:
void *d_;
};
using AxisInterfacePtr = std::shared_ptr<AxisInterface>;
} // namespace common_interface
} // namespace arcs
#endif // AUBO_SDK_AXIS_INTERFACE_H

View File

@ -0,0 +1,118 @@
/** @file error_stack.h
* @brief
*/
#ifndef AUBO_SDK_ERROR_STACK_H
#define AUBO_SDK_ERROR_STACK_H
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <string>
#include <sstream>
#include <iomanip>
#include <aubo/global_config.h>
// 格式化占位符,默认是 fmt 的格式
#ifndef _PH1_
#define _PH1_ "{}"
#define _PH2_ "{}"
#define _PH3_ "{}"
#define _PH4_ "{}"
#endif
namespace arcs {
namespace error_stack {
constexpr int ARCS_ABI_EXPORT codeCompose(int aa, int bb, int cccc)
{
return (int)((aa * 1000000) + (bb * 10000) + cccc);
}
constexpr int ARCS_ABI_EXPORT mod(int x)
{
return (x % 1000000);
}
#include <aubo/error_stack/hal_error.h>
#include <aubo/error_stack/rtm_error.h>
#include <aubo/error_stack/system_error.h>
#define ARCS_ERROR_CODES \
SYSTEM_ERRORS \
JOINT_ERRORS \
JOINT_EX_ERRORS \
EXT_AXIS_ERRORS \
SAFETY_INTERFACE_BOARD_ERRORS \
RTM_ERRORS \
TOOL_ERRORS \
EX_TOOL_ERRORS \
PEDSTRAL_ERRORS \
EX_PEDSTRAL_ERRORS \
HARDWARE_INTERFACE_ERRORS \
_D(ARCS_MAX_ERROR_CODE, -1, "Max error code", "suggest...")
// 错误代码枚举
enum ErrorCodes
{
#define _D(n, v, s, r, ...) n = (int)v,
ARCS_ERROR_CODES
#undef _D
};
inline int str2ErrorCode(const char *err_code_name)
{
#define _D(n, v, s, r, ...) \
if (strcmp(#n, err_code_name) == 0) \
return v;
ARCS_ERROR_CODES
#undef _D
return ARCS_MAX_ERROR_CODE;
}
inline const char *errorCode2Str(int err_code)
{
static const char *errcode_str[] = {
#define _D(n, v, s, r, ...) s,
ARCS_ERROR_CODES
#undef _D
};
enum arcs_index
{
#define _D(n, v, s, r, ...) n##_INDEX,
ARCS_ERROR_CODES
#undef _D
};
int index = -1;
#define _D(n, v, s, r, ...) \
if (err_code == v) \
index = n##_INDEX;
ARCS_ERROR_CODES
#undef _D
if (index == -1) {
index = ARCS_MAX_ERROR_CODE_INDEX;
}
return errcode_str[(unsigned)index];
}
inline std::ostream &dump(std::ostream &os)
{
#define _D(n, v, s, r, ...) \
os << std::setw(20) << #n << "\t" << v << "\t" << s << "\t" << r \
<< std::endl;
ARCS_ERROR_CODES
#undef _D
return os;
}
} // namespace error_stack
} // namespace arcs
#endif // AUBO_SDK_ERROR_STACK_H

View File

@ -0,0 +1,350 @@
/** @file hal_error.h
* @brief
*/
#ifndef AUBO_SDK_HAL_ERROR_H
#define AUBO_SDK_HAL_ERROR_H
// 缩写说明
// JNT: joint
// PDL: pedstral
// TP: teach pendant
// COMM: communication
// ENC: encoder
// CURR: current
// POS: position
// PKG: package
// PROG: program
// clang-format off
#define JOINT_ERRORS \
_D(JOINT_ERR_OVER_CURRENET, 10001, "joint" _PH1_ " error: over current", "(a) Check for short circuit. (b) Do a Complete rebooting sequence. (c) If this happens more than two times in a row, replace joint") \
_D(JOINT_ERR_OVER_VOLTAGE, 10002, "joint" _PH1_ " error: over voltage", "(a) Do a Complete rebooting sequence. (b) Check 48 V Power supply, current distributer, energy eater and Control Board for issues") \
_D(JOINT_ERR_LOW_VOLTAGE, 10003, "joint" _PH1_ " error: low voltage", "(a) Do a Complete rebooting sequence. (b) Check for short circuit in robot arm. (c) Check 48 V Power supply, current distributer, energy eater and Control Board for issues") \
_D(JOINT_ERR_OVER_TEMP, 10004, "joint" _PH1_ " error: over temperature", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_HALL, 10005, "joint" _PH1_ " error: hall", "suggest...") \
_D(JOINT_ERR_ENCODER, 10006, "joint" _PH1_ " error: encoder", "Check encoder connections") \
_D(JOINT_ERR_ABS_ENCODER, 10007, "joint" _PH1_ " error: abs encoder", "suggest...") \
_D(JOINT_ERR_Q_CURRENT, 10008, "joint" _PH1_ " error: detect current", "suggest...") \
_D(JOINT_ERR_ENC_POLL, 10009, "joint" _PH1_ " error: encoder pollustion", "suggest...") \
_D(JOINT_ERR_ENC_Z_SIGNAL, 10010, "joint" _PH1_ " error: enocder z signal", "suggest...") \
_D(JOINT_ERR_ENC_CAL, 10011, "joint" _PH1_ " error: encoder calibrate", "suggest...") \
_D(JOINT_ERR_IMU_SENS, 10012, "joint" _PH1_ " error: IMU sensor", "suggest...") \
_D(JOINT_ERR_TEMP_SENS, 10013, "joint" _PH1_ " error: TEMP sensor", "suggest...") \
_D(JOINT_ERR_CAN_BUS, 10014, "joint" _PH1_ " error: CAN bus error", "suggest...") \
_D(JOINT_ERR_SYS_CUR, 10015, "joint" _PH1_ " error: system current error", "suggest...") \
_D(JOINT_ERR_SYS_POS, 10016, "joint" _PH1_ " error: system position error","suggest...") \
_D(JOINT_ERR_OVER_SP, 10017, "joint" _PH1_ " error: over speed","suggest...") \
_D(JOINT_ERR_OVER_ACC, 10018, "joint" _PH1_ " error: over accelerate", "suggest...") \
_D(JOINT_ERR_TRACE, 10019, "joint" _PH1_ " error: trace accuracy", "suggest...") \
_D(JOINT_ERR_TAG_POS_OVER, 10020, "joint" _PH1_ " error: target position out of range", "suggest...") \
_D(JOINT_ERR_TAG_SP_OVER, 10021, "joint" _PH1_ " error: target speed out of range", "suggest...") \
_D(JOINT_ERR_COLLISION, 10022, "joint" _PH1_ " error: collision", "suggest...") \
_D(JOINT_ERR_COMMON, 10023, "joint" _PH1_ " error: unkown error. Check communication with joint.", "suggest...") \
_D(JOINT_ERR_SWITCH_SERVO_MODE, 10024, "joint" _PH1_ " error: switch servo mode timeout.", "suggest...") \
_D(JOINT_ERR_MOTOR_STUCK, 10025, "joint" _PH1_ " error: motor stucked.", "suggest...") \
_D(JOINT_ERR_REDUCER_OVER_TEMP, 10026, "joint" _PH1_ " error: reducer over temperature", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_REDUCER_NTC, 10027, "joint" _PH1_ " error: reducer TEMP sensor failure", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_ABS_MULTITURN, 10028, "joint" _PH1_ " error: absolute encoder multiturn error", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_ADC_ZERO_OFFSET, 10029, "joint" _PH1_ " error: ADC zero offset failure", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_SHORT_CIRCUIT, 10030, "joint" _PH1_ " error: short circuit", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_PHASE_LOST, 10031, "joint" _PH1_ " error: motor phase lost", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_BRAKE, 10032, "joint" _PH1_ " error: brake failure", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_FIRMWARE_UPDATE, 10033, "joint" _PH1_ " error: firmware update failure", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_BATTERY_LOW, 10034, "joint" _PH1_ " error: battery low", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_PHASE_ALIGN, 10035, "joint" _PH1_ " error: phase align", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_CAN_HW_FAULT, 10036, "joint" _PH1_ " error: CAN bus hw fault", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_POS_DISCONTINUOUS, 10037, "joint" _PH1_ " error: target position discontinuous", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_POS_INIT, 10038, "joint" _PH1_ " error: position initiallization failure", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_TORQUE_SENSOR, 10039, "joint" _PH1_ " error: torqure sensor failure", "(a) Check robots environment and make sure the robot is operating within recommended limits. (b) Do a Complete rebooting sequence") \
_D(JOINT_ERR_OFFLINE, 10040, "joint" _PH1_ " error: joint may be offline", "(a) Check joint's hardware. (b) Check joint's id.") \
_D(JOINT_ERR_BOOTLOADER, 10041, "joint" _PH1_ " error: The joint is in bootloader mode. Retry firmware update. ", "suggest...") \
_D(JOINT_ERR_SLAVE_OFFLINE, 10042, "slave joint" _PH1_ " error: slave joint may be offline", "(a) Check slave joint's hardware. (b) Check slave joint's id.") \
_D(JOINT_ERR_SLAVE_BOOTLOADER, 10043, "slave joint" _PH1_ " error: The slave joint is in bootloader mode. Retry firmware update. ", "suggest...") \
_D(JOINT_ERR_ETHERCAT_BUS, 10044, "joint" _PH1_ " error: ETHERCAT bus error", "suggest...")
// Joint extended error codes (ex_err_code), starting from 10401
#define JOINT_EX_ERRORS \
_D(EX_JOINT_EC_SHORT_CIRCUIT, 10401, "joint" _PH1_ " error: short circuit protection", "suggest...", 0x2130) \
_D(EX_JOINT_EC_SHORT_CURRENT, 10402, "joint" _PH1_ " error: over current", "suggest...", 0x2310) \
_D(EX_JOINT_EC_PHASEA_CURRENT, 10403, "joint" _PH1_ " error: phase A over current", "suggest...", 0x2311) \
_D(EX_JOINT_EC_PHASEB_CURRENT, 10404, "joint" _PH1_ " error: phase B over current", "suggest...", 0x2312) \
_D(EX_JOINT_EC_PHASEC_CURRENT, 10405, "joint" _PH1_ " error: phase C over current", "suggest...", 0x2313) \
_D(EX_JOINT_EC_PHASE_CURRENT, 10406, "joint" _PH1_ " error: phase over current", "suggest...", 0x2314) \
_D(EX_JOINT_EC_MOTOR_PHASE_LOSE, 10407, "joint" _PH1_ " error: motor phase loss", "suggest...", 0x3331) \
_D(EX_JOINT_EC_BUS_OVER_VOLTAGE, 10408, "joint" _PH1_ " error: bus over voltage", "suggest...", 0x3210) \
_D(EX_JOINT_EC_BUS_LOW_VOLTAGE, 10409, "joint" _PH1_ " error: bus under voltage", "suggest...", 0x3220) \
_D(EX_JOINT_EC_OVERLOAD, 10410, "joint" _PH1_ " error: overload", "suggest...", 0x3230) \
_D(EX_JOINT_EC_IPM_OVER_TEMP, 10411, "joint" _PH1_ " error: IPM over temperature", "suggest...", 0x4310) \
_D(EX_JOINT_EC_REDUCER_OVER_TEMP, 10412, "joint" _PH1_ " error: reducer over temperature", "suggest...", 0x4311) \
_D(EX_JOINT_EC_ADC_ZERO_OFFSET, 10413, "joint" _PH1_ " error: ADC zero offset", "suggest...", 0x5101) \
_D(EX_JOINT_EC_REDUCER_NTC, 10414, "joint" _PH1_ " error: reducer NTC fault", "suggest...", 0x5102) \
_D(EX_JOINT_EC_IPM_NTC, 10415, "joint" _PH1_ " error: IPM NTC fault", "suggest...", 0x5103) \
_D(EX_JOINT_EC_TORQUE_SENSOR, 10416, "joint" _PH1_ " error: torque sensor fault", "suggest...", 0x5104) \
_D(EX_JOINT_EC_TORQUE_SENSOR_COMM, 10417, "joint" _PH1_ " error: torque sensor communication fault", "suggest...", 0x5105) \
_D(EX_JOINT_EC_MOTOR_ABS_ENC_COMM, 10418, "joint" _PH1_ " error: motor-side absolute encoder communication fault", "suggest...", 0x5201) \
_D(EX_JOINT_EC_REDUCER_ABS_ENC_COMM, 10419, "joint" _PH1_ " error: reducer-side absolute encoder communication fault", "suggest...", 0x5202) \
_D(EX_JOINT_EC_REDUCER_ABS_ENC_DATA, 10420, "joint" _PH1_ " error: reducer-side absolute encoder data channel disabled warning", "suggest...", 0x5203) \
_D(EX_JOINT_EC_REDUCER_ABS_ENC_CMD, 10421, "joint" _PH1_ " error: reducer-side absolute encoder command invalid warning", "suggest...", 0x5204) \
_D(EX_JOINT_EC_REDUCER_ABS_ENC_ERR, 10422, "joint" _PH1_ " error: reducer-side absolute encoder fault", "suggest...", 0x5205) \
_D(EX_JOINT_EC_REDUCER_ABS_ENC_WARNING, 10423, "joint" _PH1_ " error: reducer-side absolute encoder warning", "suggest...", 0x5206) \
_D(EX_JOINT_EC_BRAKE, 10424, "joint" _PH1_ " error: brake fault", "suggest...", 0x5301) \
_D(EX_JOINT_EC_COMM_HWL, 10425, "joint" _PH1_ " error: communication hardware layer error", "suggest...", 0x5302) \
_D(EX_JOINT_EC_FIRMWARE_UPDATE, 10426, "joint" _PH1_ " error: firmware update failed", "suggest...", 0x6100) \
_D(EX_JOINT_EC_FLASH_OP, 10427, "joint" _PH1_ " error: flash operation failed", "suggest...", 0x6101) \
_D(EX_JOINT_EC_MU_SAVE, 10428, "joint" _PH1_ " error: multi-turn data error", "suggest...", 0x6102) \
_D(EX_JOINT_EC_DEMADATA_LOST, 10429, "joint" _PH1_ " error: calibration zero point data lost", "suggest...", 0x6103) \
_D(EX_JOINT_EC_PARAMETER, 10430, "joint" _PH1_ " error: parameter error", "suggest...", 0x6200) \
_D(EX_JOINT_EC_UVW_LOGIC, 10431, "joint" _PH1_ " error: hall signal fault", "suggest...", 0x7001) \
_D(EX_JOINT_EC_UVW_ABZ, 10432, "joint" _PH1_ " error: incremental encoder fault", "suggest...", 0x7002) \
_D(EX_JOINT_EC_ENC_Z_LOST, 10433, "joint" _PH1_ " error: encoder Z signal lost", "suggest...", 0x7305) \
_D(EX_JOINT_EC_ENC_POLLUTE, 10434, "joint" _PH1_ " error: encoder pollution", "suggest...", 0x7004) \
_D(EX_JOINT_EC_ENC_CALI, 10435, "joint" _PH1_ " error: encoder calibration failed", "suggest...", 0x7005) \
_D(EX_JOINT_EC_MT_ABS_DATA, 10436, "joint" _PH1_ " error: multi-turn absolute data error", "suggest...", 0x7006) \
_D(EX_JOINT_EC_ENC_TYPE_INFO, 10437, "joint" _PH1_ " error: encoder type identified and saved", "suggest...", 0x7007) \
_D(EX_JOINT_EC_ENC_TYPE_ERROR, 10438, "joint" _PH1_ " error: encoder type error", "suggest...", 0x7008) \
_D(EX_JOINT_EC_ENC_VERIFY, 10439, "joint" _PH1_ " error: encoder verification failed", "suggest...", 0x7009) \
_D(EX_JOINT_EC_DUAL_ENC_ERROR, 10440, "joint" _PH1_ " error: dual encoder deviation too large", "suggest...", 0x700A) \
_D(EX_JOINT_EC_DUAL_ENC_EANGLE, 10441, "joint" _PH1_ " error: dual encoder electrical angle deviation too large", "suggest...", 0x700B) \
_D(EX_JOINT_EC_OBJECT_DICT_ERROR, 10442, "joint" _PH1_ " error: object dictionary data error", "suggest...", 0x700C) \
_D(EX_JOINT_EC_MOTOR_STALL, 10443, "joint" _PH1_ " error: motor stall protection", "suggest...", 0x7121) \
_D(EX_JOINT_EC_ABS_ENC_LOW_VOLT, 10444, "joint" _PH1_ " error: absolute encoder low voltage", "suggest...", 0x7385) \
_D(EX_JOINT_EC_MT_BATTERY_LOW, 10445, "joint" _PH1_ " error: multi-turn battery low voltage", "suggest...", 0x7386) \
_D(EX_JOINT_EC_POS_CMD, 10446, "joint" _PH1_ " error: position command discontinuous", "suggest...", 0x8001) \
_D(EX_JOINT_EC_POS_OVER_LIMIT, 10447, "joint" _PH1_ " error: position over limit", "suggest...", 0x8002) \
_D(EX_JOINT_EC_COMM_PROTO, 10448, "joint" _PH1_ " error: communication protocol layer error", "suggest...", 0x8003) \
_D(EX_JOINT_EC_GRAVITY_PARA_WARNING, 10449, "joint" _PH1_ " error: gravity compensation parameter invalid", "suggest...", 0x8004) \
_D(EX_JOINT_EC_GRAVITY_COMPENSATE_ERROR, 10450, "joint" _PH1_ " error: gravity compensation value sudden change", "suggest...", 0x8005) \
_D(EX_JOINT_EC_LOW_RIGIDITY, 10451, "joint" _PH1_ " error: collision soft float abnormal", "suggest...", 0x8006) \
_D(EX_JOINT_EC_POS_CMD_WARNING, 10452, "joint" _PH1_ " error: position command unchanged during motion", "suggest...", 0x8007) \
_D(EX_JOINT_EC_SLAVE_COMM, 10453, "joint" _PH1_ " error: master-slave MCU communication fault", "suggest...", 0x8008) \
_D(EX_JOINT_EC_POS_ERR, 10454, "joint" _PH1_ " error: position following error too large", "suggest...", 0x8009) \
_D(EX_JOINT_EC_DUAL_POS_ERR, 10455, "joint" _PH1_ " error: dual servo position sync error too large", "suggest...", 0x800A) \
_D(EX_JOINT_EC_DUAL_COMM_ERR, 10456, "joint" _PH1_ " error: dual servo communication", "suggest...", 0x800B) \
_D(EX_JOINT_EC_CAN_BUSOFF, 10457, "joint" _PH1_ " error: CAN bus-off warning", "suggest...", 0x800C) \
_D(EX_JOINT_EC_SYNC_SNAKE, 10458, "joint" _PH1_ " error: sync frame jitter warning", "suggest...", 0x800D) \
_D(EX_JOINT_EC_SYNC_DISCON, 10459, "joint" _PH1_ " error: sync frame discontinuous warning", "suggest...", 0x800E) \
_D(EX_JOINT_EC_RPDO_LOST, 10460, "joint" _PH1_ " error: RPDO lost warning", "suggest...", 0x800F) \
_D(EX_JOINT_EC_RPDO_MANY, 10461, "joint" _PH1_ " error: multiple RPDO in one sync cycle warning", "suggest...", 0x8010) \
_D(EX_JOINT_EC_GRAVITY_LOST, 10462, "joint" _PH1_ " error: gravity compensation value lost", "suggest...", 0x8011) \
_D(EX_JOINT_EC_MAININT_TIME_WARN, 10463, "joint" _PH1_ " error: servo main interrupt runtime warning", "suggest...", 0x8012) \
_D(EX_JOINT_EC_MAININT_TIME_ERROR, 10464, "joint" _PH1_ " error: servo main interrupt runtime error", "suggest...", 0x8013) \
_D(EX_JOINT_EC_SPDINT_TIME_WARN, 10465, "joint" _PH1_ " error: servo speed loop interrupt runtime warning", "suggest...", 0x8014) \
_D(EX_JOINT_EC_SPDINT_TIME_ERROR, 10466, "joint" _PH1_ " error: servo speed loop interrupt runtime error", "suggest...", 0x8015) \
_D(EX_JOINT_EC_POS_CMD_JUMP_WARNING, 10467, "joint" _PH1_ " error: position command sudden jump during motion", "suggest...", 0x8016) \
_D(EX_JOINT_EC_SYNC_TIMCOARSE, 10468, "joint" _PH1_ " error: clock sync compensation status", "suggest...", 0x8017) \
_D(EX_JOINT_EC_ENC_Z_CNTS_ERR, 10469, "joint" _PH1_ " error: incremental encoder Z signal or CNTS abnormal", "suggest...", 0x8018) \
_D(EX_JOINT_EC_SLAVE_OVER_CURRENT, 10470, "joint" _PH1_ " error: slave MCU detected motor phase current over safe threshold", "suggest...", 0x8019) \
_D(EX_JOINT_EC_SLAVE_OVER_VOLTAGE, 10471, "joint" _PH1_ " error: slave MCU detected DC bus voltage over upper threshold", "suggest...", 0x801A) \
_D(EX_JOINT_EC_SLAVE_UNDER_VOLTAGE, 10472, "joint" _PH1_ " error: slave MCU detected DC bus voltage below lower threshold", "suggest...", 0x801B) \
_D(EX_JOINT_EC_SLAVE_POS_ERR, 10473, "joint" _PH1_ " error: slave MCU detected master-slave motor position deviation out of range", "suggest...", 0x801C) \
_D(EX_JOINT_EC_SLAVE_SPEED_ERR, 10474, "joint" _PH1_ " error: slave MCU detected master-slave motor speed deviation out of range", "suggest...", 0x801D) \
_D(EX_JOINT_EC_SLAVE_TRACE_ERR, 10475, "joint" _PH1_ " error: slave MCU detected position following error out of control range", "suggest...", 0x801E) \
_D(EX_JOINT_EC_SLAVE_ABS_ERR, 10476, "joint" _PH1_ " error: slave MCU detected absolute encoder feedback abnormal", "suggest...", 0x801F) \
_D(EX_JOINT_EC_SLAVE_ADC_ZERO_OFFSET, 10477, "joint" _PH1_ " error: slave MCU detected current sampling zero offset out of calibration range", "suggest...", 0x8020) \
_D(EX_JOINT_EC_SLAVE_ENC_POLLUTE, 10478, "joint" _PH1_ " error: slave MCU detected encoder signal quality degradation", "suggest...", 0x8021) \
_D(EX_JOINT_EC_SLAVE_ENC_Z_LOST, 10479, "joint" _PH1_ " error: slave MCU detected encoder Z reference signal lost", "suggest...", 0x8022) \
_D(EX_JOINT_EC_SLAVE_COMM_OVER_TM, 10480, "joint" _PH1_ " error: slave MCU detected master-slave communication timeout", "suggest...", 0x8023) \
_D(EX_JOINT_EC_SLAVE_TRQ_ERR, 10481, "joint" _PH1_ " error: slave MCU detected master-slave motor torque deviation out of range", "suggest...", 0x8024) \
_D(EX_JOINT_EC_BRAKE_TYPE_ERR, 10482, "joint" _PH1_ " error: brake type config mismatch with hardware", "suggest...", 0x8025) \
_D(EX_JOINT_EC_PHASE_ALIGN, 10483, "joint" _PH1_ " error: phase alignment failed", "suggest...", 0xFF02) \
_D(EX_JOINT_EC_POS_OVER_LIMIT_WARNING, 10484, "joint" _PH1_ " error: position over limit", "suggest...", 0x8026) \
_D(EX_JOINT_EC_PHASE_ALIGN_WARNING, 10485, "joint" _PH1_ " error: phase alignment warning", "suggest...", 0xFF03) \
_D(EX_JOINT_EC_TASK_STACK_SHORTAGE, 10486, "joint" _PH1_ " error: task stack insufficient", "suggest...", 0xFF04) \
_D(EX_JOINT_EC_TASK_STACK_OVERFLOW, 10487, "joint" _PH1_ " error: task stack overflow", "suggest...", 0xFF05) \
_D(EX_JOINT_EC_SERVO_STEP, 10488, "joint" _PH1_ " servo process step", "For information only. No action required.", 0x6105) \
_D(EX_JOINT_EC_UNKNOWN, 10800, "joint" _PH1_ " error: unknown error", "suggest...", 0xFFFF)
#define EXT_AXIS_ERRORS \
_D(EXT_AXIS_ERR_COMMON, 11001, "ext axis" _PH1_ " error: common", "Check communication with ext axis drive.") \
_D(EXT_AXIS_ERR_OVER_CURRENT, 11002, "ext axis" _PH1_ " error: over current", "Check wiring/short circuit; reboot; if repeated replace drive/motor.") \
_D(EXT_AXIS_ERR_OVER_VOLTAGE, 11003, "ext axis" _PH1_ " error: over voltage", "Check DC supply, regen, energy eater; reboot.") \
_D(EXT_AXIS_ERR_LOW_VOLTAGE, 11004, "ext axis" _PH1_ " error: low voltage", "Check DC supply and cabling; reboot.") \
_D(EXT_AXIS_ERR_OVER_TEMP, 11005, "ext axis" _PH1_ " error: over temperature", "Check environment/cooling; reboot.") \
_D(EXT_AXIS_ERR_HALL, 11006, "ext axis" _PH1_ " error: hall fault", "Check hall sensor and motor cabling.") \
_D(EXT_AXIS_ERR_ENCODER, 11007, "ext axis" _PH1_ " error: encoder fault", "Check encoder connection/cable/noise.") \
_D(EXT_AXIS_ERR_ABS_ENCODER, 11008, "ext axis" _PH1_ " error: absolute encoder fault", "Check abs encoder power/cable; reboot.") \
_D(EXT_AXIS_ERR_CUR_CALIB, 11009, "ext axis" _PH1_ " error: current calibration fault", "Reboot; check current sensing circuit.") \
_D(EXT_AXIS_ERR_Q_CURRENT, 11010, "ext axis" _PH1_ " error: current detect fault", "Reboot; check current sensing circuit.") \
_D(EXT_AXIS_ERR_ENC_POLL, 11011, "ext axis" _PH1_ " error: encoder pollution", "Check encoder contamination/noise; improve shielding.") \
_D(EXT_AXIS_ERR_ENC_Z_SIGNAL, 11012, "ext axis" _PH1_ " error: encoder Z signal fault", "Check encoder Z channel and wiring.") \
_D(EXT_AXIS_ERR_ENC_CAL, 11013, "ext axis" _PH1_ " error: encoder calibrate invalid", "Redo calibration; check encoder.") \
_D(EXT_AXIS_ERR_IMU, 11014, "ext axis" _PH1_ " error: IMU fault", "Check IMU sensor and connection.") \
_D(EXT_AXIS_ERR_TEMP_SENSOR, 11015, "ext axis" _PH1_ " error: temperature sensor fault", "Check temp sensor wiring; reboot.") \
_D(EXT_AXIS_ERR_ECAT_BUS, 11016, "ext axis" _PH1_ " error: EtherCAT bus error", "Check EtherCAT cabling/topology/sync; reboot master/drive.") \
_D(EXT_AXIS_ERR_ECAT_CONFIG, 11017, "ext axis" _PH1_ " error: EtherCAT config/ESI/SM/PDO fault", "Check ESI, Mailbox/SM/PDO mapping, vendor/product/revision match.") \
_D(EXT_AXIS_ERR_ECAT_SYNC, 11018, "ext axis" _PH1_ " error: EtherCAT sync/frame/period fault", "Check DC sync, cycle time, frame loss; verify NIC/IRQ affinity.") \
_D(EXT_AXIS_ERR_SYS_CUR, 11019, "ext axis" _PH1_ " error: system current fault", "Check current loop and load; reboot.") \
_D(EXT_AXIS_ERR_SYS_POS, 11020, "ext axis" _PH1_ " error: position out of range", "Check encoder/scale/limits; reboot.") \
_D(EXT_AXIS_ERR_OVER_SPEED, 11021, "ext axis" _PH1_ " error: over speed", "Check command limits and tuning parameters.") \
_D(EXT_AXIS_ERR_OVER_ACC, 11022, "ext axis" _PH1_ " error: over acceleration", "Reduce acceleration/jerk; check tuning.") \
_D(EXT_AXIS_ERR_FOLLOW_ERROR, 11023, "ext axis" _PH1_ " error: following error", "Check gains, load, saturation; verify feedback.") \
_D(EXT_AXIS_ERR_TAG_POS_OVER, 11024, "ext axis" _PH1_ " error: target position out of range", "Check target limits and homing.") \
_D(EXT_AXIS_ERR_TAG_SPEED_OVER, 11025, "ext axis" _PH1_ " error: target speed out of range", "Clamp speed; check profile settings.") \
_D(EXT_AXIS_ERR_TAG_CURRENT_OVER, 11026, "ext axis" _PH1_ " error: target current out of range", "Clamp current/torque; check load.") \
_D(EXT_AXIS_ERR_COLLISION, 11027, "ext axis" _PH1_ " error: collision", "Remove obstruction; check torque/force limits.") \
_D(EXT_AXIS_ERR_ADC_ZERO_OFFSET, 11028, "ext axis" _PH1_ " error: ADC zero offset", "Reboot; check ADC/current sensor offset.") \
_D(EXT_AXIS_ERR_IPM_NTC, 11029, "ext axis" _PH1_ " error: IPM NTC fault", "Check power module temperature sensing.") \
_D(EXT_AXIS_ERR_SHORT_CIRCUIT, 11030, "ext axis" _PH1_ " error: short circuit", "Check motor phase wiring; insulation test.") \
_D(EXT_AXIS_ERR_MOTOR_STALL, 11031, "ext axis" _PH1_ " error: motor stall", "Check mechanical jam/load; reduce accel; reboot.") \
_D(EXT_AXIS_ERR_ABS_MULTITURN, 11032, "ext axis" _PH1_ " error: abs encoder multiturn fault", "Check abs encoder battery/params; reboot.") \
_D(EXT_AXIS_ERR_PHASE_LOST, 11033, "ext axis" _PH1_ " error: motor phase lost", "Check phase wiring/connector; measure continuity.") \
_D(EXT_AXIS_ERR_BRAKE, 11034, "ext axis" _PH1_ " error: brake fault", "Check brake wiring/power; verify brake release.") \
_D(EXT_AXIS_ERR_REDUCER_OVER_TEMP, 11035, "ext axis" _PH1_ " error: reducer over temperature", "Check reducer temperature/cooling.") \
_D(EXT_AXIS_ERR_REDUCER_NTC, 11036, "ext axis" _PH1_ " error: reducer NTC fault", "Check reducer temperature sensor.") \
_D(EXT_AXIS_ERR_FIRMWARE_UPDATE, 11037, "ext axis" _PH1_ " error: firmware update fault", "Retry update; check power stability.") \
_D(EXT_AXIS_ERR_FLASH_OP, 11038, "ext axis" _PH1_ " error: flash operation fault", "Retry; if persistent replace drive.") \
_D(EXT_AXIS_ERR_EXT_ABS_ENC, 11039, "ext axis" _PH1_ " error: motor-side abs encoder comm fault", "Check external abs encoder link/power.") \
_D(EXT_AXIS_ERR_DRIVE_FAULT, 11040, "ext axis" _PH1_ " error: drive fault", "Check drive alarm code; reboot; replace if repeated.") \
_D(EXT_AXIS_ERR_OVERLOAD, 11041, "ext axis" _PH1_ " error: overload", "Reduce load; check mechanics and tuning.") \
_D(EXT_AXIS_ERR_HARDWARE_LIMIT, 11042, "ext axis" _PH1_ " error: hardware limit triggered", "Move away from limit; check limit switch.") \
_D(EXT_AXIS_ERR_SERVO_MODE_TIMEOUT, 11043, "ext axis" _PH1_ " error: switch servo mode timeout", "Check mode transition and comm; reboot.") \
_D(EXT_AXIS_ERR_UVW_ABZ, 11044, "ext axis" _PH1_ " error: UVW/ABZ fault", "Check phase/encoder signals wiring.") \
_D(EXT_AXIS_ERR_BATTERY_LOW, 11045, "ext axis" _PH1_ " error: battery low", "Replace encoder battery; reboot.") \
_D(EXT_AXIS_ERR_PHASE_ALIGN, 11046, "ext axis" _PH1_ " error: phase align fail", "Redo phase alignment; check motor params.") \
_D(EXT_AXIS_ERR_POS_DISCONTINUOUS, 11047, "ext axis" _PH1_ " error: position command discontinuous", "Check trajectory generation and limits.") \
_D(EXT_AXIS_ERR_POS_INIT, 11048, "ext axis" _PH1_ " error: position initialization failure", "Check encoder init/homing procedure.") \
_D(EXT_AXIS_ERR_TORQUE_SENSOR, 11049, "ext axis" _PH1_ " error: torque sensor fault", "Check torque sensor wiring/calibration.") \
_D(EXT_AXIS_ERR_ABS_ENC_LOW_VOLT, 11050, "ext axis" _PH1_ " error: abs encoder low voltage", "Check encoder supply voltage and cable.") \
_D(EXT_AXIS_ERR_OFFLINE, 11051, "ext axis" _PH1_ " error: ext axis offline", "Check hardware and axis id; check EtherCAT state.") \
_D(EXT_AXIS_ERR_BOOTLOADER, 11052, "ext axis" _PH1_ " error: ext axis in bootloader", "Retry firmware update.") \
_D(EXT_AXIS_ERR_SLAVE_OFFLINE, 11053, "ext axis slave" _PH1_ " error: slave offline", "Check slave hardware and id.") \
_D(EXT_AXIS_ERR_SLAVE_BOOTLOADER, 11054, "ext axis slave" _PH1_ " error: slave in bootloader", "Retry firmware update.") \
_D(EXT_AXIS_ERR_EEPROM, 11055, "ext axis" _PH1_ " error: EEPROM/param store fault", "Check EEPROM/parameter storage; power cycle.") \
_D(EXT_AXIS_ERR_PARAM_CONFIG, 11056, "ext axis" _PH1_ " error: parameter/config fault", "Verify parameter set; restore defaults if needed.") \
_D(EXT_AXIS_ERR_STO, 11057, "ext axis" _PH1_ " error: STO safety fault", "Check STO wiring/safety chain; reset safety.") \
_D(EXT_AXIS_ERR_ENCRYPT_CHIP, 11058, "ext axis" _PH1_ " error: encrypt chip/key fault", "Check encryption chip/keys/firmware compatibility.") \
_D(EXT_AXIS_ERR_BRAKE_RES_OVERLOAD, 11059, "ext axis" _PH1_ " error: brake resistor overload", "Check brake resistor/regen circuit; duty cycle.") \
_D(EXT_AXIS_ERR_POWER_LINE_OPEN, 11060, "ext axis" _PH1_ " error: motor power line open", "Check motor power cable continuity/connector.") \
_D(EXT_AXIS_ERR_HOMING, 11061, "ext axis" _PH1_ " error: homing fault", "Check homing sensor/origin procedure; retry.") \
_D(EXT_AXIS_ERR_TUNING_FAIL, 11062, "ext axis" _PH1_ " error: tuning fail", "Redo tuning; reduce resonance; check mechanics.") \
_D(EXT_AXIS_ERR_INERTIA_ID_FAIL, 11063, "ext axis" _PH1_ " error: inertia identification fail", "Check load; redo inertia ID; adjust conditions.") \
_D(EXT_AXIS_ERR_FLYAWAY, 11064, "ext axis" _PH1_ " error: flyaway", "Emergency stop; check feedback polarity/scale; inspect drive params.") \
_D(EXT_AXIS_ERR_SPEED_PULSE_OVER, 11065, "ext axis" _PH1_ " error: feedback pulse overspeed", "Check encoder feedback and scaling; reduce speed.") \
_D(EXT_AXIS_ERR_CTRL_LOOP, 11066, "ext axis" _PH1_ " error: control loop/timeout fault", "Check sampling/current loop/comm timeout; reboot.")
#define TOOL_ERRORS \
_D(TOOL_FLASH_VERIFY_FAILED, 40001, "Flash write verify failed", "suggest...") \
_D(TOOL_PROGRAM_CRC_FAILED, 40002, "Program flash checksum failed during bootloading", "suggest...") \
_D(TOOL_PROGRAM_CRC_FAILED2, 40003, "Program flash checksum failed at runtime", "suggest...") \
_D(TOOL_ID_UNDIFINED, 40004, "Tool ID is undefined", "suggest...") \
_D(TOOL_ILLEGAL_BL_CMD, 40005, "Illegal bootloader command", "suggest...") \
_D(TOOL_FW_WRONG, 40006, "Wrong firmware at the joint", "suggest...") \
_D(TOOL_HW_INVALID, 40007, "Invalid hardware revision", "suggest...") \
_D(TOOL_SHORT_CURCUIT_H, 40011, "Short circuit detected on Digital Output: " _PH1_ " high side", "suggest...") \
_D(TOOL_SHORT_CURCUIT_L, 40012, "Short circuit detected on Digital Output: " _PH1_ " low side", "suggest...") \
_D(TOOL_AVERAGE_CURR_HIGH, 40013, "10 second Average tool IO Current of " _PH1_ " A is outside of the allowed range.", "suggest...") \
_D(TOOL_POWER_PIN_OVER_CURR, 40014, "Current of " _PH1_ " A on the POWER pin is outside of the allowed range.", "suggest...") \
_D(TOOL_DOUT_PIN_OVER_CURR, 40015, "Current of " _PH1_ " A on the Digital Output pins is outside of the allowed range.", "suggest...") \
_D(TOOL_GROUND_PIN_OVER_CURR, 40016, "Current of " _PH1_ " A on the ground pin is outside of the allowed range.", "suggest...") \
_D(TOOL_RX_FRAMING, 40021, "RX framing error", "suggest...") \
_D(TOOL_RX_PARITY, 40022, "RX Parity error", "suggest...") \
_D(TOOL_48V_LOW, 40031, "48V input is too low", "suggest...") \
_D(TOOL_48V_HIGH, 40032, "48V input is too high", "suggest...") \
_D(TOOL_ERR_OFFLINE, 40033, "tool error: tool may be offline", "(a) Check tool's hardware. (b) Check joint's id.") \
_D(TOOL_ERR_BOOTLOADER, 40034, "tool error: The tool is in bootloader mode. Retry firmware update. ", "suggest...")
#define EX_TOOL_ERRORS \
_D(EX_TOOL_EC_LOW_VOLTAGE, 40101, "tool error: low voltage", "check tool power supply voltage") \
_D(EX_TOOL_EC_FORCESENSOR_COMM, 40102, "tool error: external force sensor communication error", "check external force sensor communication connection") \
_D(EX_TOOL_485_SENDFULL_COMM, 40103, "tool error: 485 transparent transmission buffer full", "check 485 communication load and transmission frequency") \
_D(EX_TOOL_FORCESENSOR_FILTER_ZERO, 40104, "tool error: force sensor filter parameter is zero", "check force sensor filter parameter configuration") \
_D(EX_TOOL_EC_UNKNOWN, 40200, "tool error: unknown error", "check controller logs and hardware status")
#define PEDSTRAL_ERRORS \
_D(PKG_LOST, 50001, "Lost package from pedestal", "suggest...") \
_D(PEDSTRAL_OFFLINE, 50002, "pedestal error: pedestal may be offline", "(a) Check pedestal's hardware. (b) Check pedestal's id.") \
_D(PEDESTAL_ERR_BOOTLOADER, 50003, "pedestal error: The pedestal is in bootloader mode. Retry firmware update. ", "suggest...")
#define EX_PEDSTRAL_ERRORS \
_D(EX_BASE_EC_LOW_VOLTAGE, 50101, "pedstral error: low voltage", "check power supply voltage and battery status") \
_D(EX_BASE_EC_OVER_TEMPERATURE_RES, 50102, "pedstral error: resistor over temperature", "check braking resistor temperature and cooling condition") \
_D(EX_BASE_EC_OVER_TARGET_BRAKE_OPEN_VOLT, 50103, "pedstral error: input voltage close to or exceeds regenerative brake activation voltage", "check input power voltage and regenerative braking configuration") \
_D(EX_BASE_EC_RES_BREAKAGE, 50104, "pedstral error: brake resistor breakage", "check whether the brake resistor is disconnected or damaged") \
_D(EX_BASE_EC_IMU_CALIBRATE, 50105, "pedstral error: IMU calibration required", "perform IMU calibration according to maintenance procedure") \
_D(EX_BASE_EC_TEMP_SENSOR_SHORT, 50106, "pedstral error: temperature sensor short circuit", "check temperature sensor wiring and solder joints for short circuit") \
_D(EX_BASE_EC_TEMP_SENSOR_BREAK, 50107, "pedstral error: temperature sensor open circuit", "check temperature sensor connection and cable continuity") \
_D(EX_BASE_EC_96V_INSTANT_OVER_VOLTAGE, 50108, "pedstral error: 96V instantaneous over voltage after regenerative braking", "check regenerative braking behavior and power bus voltage") \
_D(EX_BASE_EC_UNKNOWN, 50200, "pedstral error: unknown error", "check controller logs and hardware status")
#define SAFETY_INTERFACE_BOARD_ERRORS \
_D(IFB_ERR_ROBOTTYPE, 20001, "Robot error type!", "suggest...") \
_D(IFB_ERR_ADXL_SENS, 20002, "Base Acceleration sensor error!", "suggest...") \
_D(IFB_ERR_EN_LINE, 20003, "Encoder line error!", "suggest...") \
_D(IFB_ERR_ENTER_HDG_MODE, 20004, "Robot enter handguide mode!", "suggest...") \
_D(IFB_ERR_EXIT_HDG_MODE, 20005, "Robot exit handguide mode!", "suggest...") \
_D(IFB_ERR_MAC_DATA_BREAK, 20006, "MAC data break!", "suggest...") \
_D(IFB_ERR_DRV_FIRMWARE_VERSION, 20007, "Motor driver firmware version error!", "suggest...") \
_D(INIT_ERR_EN_DRV, 20008, "Motor driver enable failed!", "suggest...") \
_D(INIT_ERR_EN_AUTO_BACK, 20009, "Motor driver enable auto back failed!", "suggest...") \
_D(INIT_ERR_EN_CUR_LOOP, 20010, "Motor driver enable current loop failed!", "suggest...") \
_D(INIT_ERR_SET_TAG_CUR, 20011, "Motor driver set target current failed!", "suggest...") \
_D(INIT_ERR_RELEASE_BRAKE, 20012, "Motor driver release brake failed!", "suggest...") \
_D(INIT_ERR_EN_POS_LOOP, 20013, "Motor driver enable postion loop failed!", "suggest...") \
_D(INIT_ERR_SET_MAX_ACC, 20014, "Motor set max accelerate failed!", "suggest...") \
_D(SAFETY_ERR_PROTECTION_STOP_TIMEOUT, 20015, "Protective stop timeout!", "suggest...") \
_D(SAFETY_ERR_REDUCED_MODE_TIMEOUT, 20016, "Reduced mode timeout!", "suggest...") \
_D(SYS_ERR_MCU_COM, 20017, "Robot system error: mcu communication error!", "suggest...") \
_D(SYS_ERR_RS485_COM, 20018, "Robot system error: RS485 communication error!", "suggest...") \
_D(IFB_ERR_DISCONNECTED, 20019, "Interface board may be disconnected. Please check connection between IPC and Interface board.", "suggest...")\
_D(IFB_ERR_PAYLOAD_ERROR, 20020, "Payload error.", "suggest...") \
_D(IFB_OFFLINE, 20021, "ifaceboard error: ifaceboard may be offline", "(a) Check ifaceboard's hardware. (b) Check ifaceboard's id.") \
_D(IFB_ERR_BOOTLOADER, 20022, "ifaceboard error: The ifaceboard is in bootloader mode. Retry firmware update. ", "suggest...") \
_D(IFB_SLAVE_OFFLINE, 20023, "interface slave board error: interface slave board may be offline", "(a) Check interface slave board's hardware. (b) Check interface slave board's id.") \
_D(IFB_SLAVE_ERR_BOOTLOADER, 20024, "interface slave board error: The interface slave board is in bootloader mode. Retry firmware update. ", "suggest...") \
_D(IFB_TOOL_ERR_ADXL_SENS, 20025, "Tool Acceleration sensor error!", "suggest...") \
_D(HANDLE_OFFLINE, 20026, "handle error: handle may be offline", "(a) Check handle's hardware. (b) Check handle's id.") \
_D(HANDLE_ERR_BOOTLOADER, 20027, "handle error: The handle is in bootloader mode. Retry firmware update. ", "suggest...") \
_D(IFB_POWERLOSS_OFFLINE, 20028, "interface powerloss board error: interface powerloss board may be offline", "(a) Check interface powerloss board's hardware. (b) Check interface powerloss board's id.") \
_D(IFB_POWERLOSS_ERR_BOOTLOADER, 20029, "interface powerloss board error: The interface powerloss board is in bootloader mode. Retry firmware update. ", "suggest...") \
_D(HANDLE_COMM_ERROR, 20030, "handle error: handle comm error", "(a) Check handle's hardware. (b) Check handle's id.")
#define HARDWARE_INTERFACE_ERRORS \
_D(HW_SCB_SETUP_FAILED, 60001, "Setup of Interface Board failed", "suggest...") \
_D(HW_PKG_CNT_DISAGEE, 60002, "Packet counter disagreements", "suggest...") \
_D(HW_SCB_DISCONNECT, 60003, "Connection to Interface Board lost", "suggest...") \
_D(HW_SCB_PKG_LOST, 60004, "Package lost from Interface Board", "suggest...") \
_D(HW_SCB_CONN_INIT_FAILED, 60005, "Ethernet connection initialization with Interface Board failed", "suggest...") \
_D(HW_LOST_JOINT_PKG, 60006, "Lost package from joint " _PH1_ "", "suggest...") \
_D(HW_LOST_TOOL_PKG, 60007, "Lost package from tool", "suggest...") \
_D(HW_JOINT_PKG_CNT_DISAGREE, 60008, "Packet counter disagreement in packet from joint " _PH1_ "", "suggest...") \
_D(HW_TOOL_PKG_CNT_DISAGREE, 60009, "Packet counter disagreement in packet from tool", "suggest...") \
_D(HW_JOINTS_FAULT, 60011, "" _PH1_ " joint entered the Fault State", "suggest...") \
_D(HW_JOINTS_VIOLATION, 60012, "" _PH1_ " joint entered the Violation State", "suggest...") \
_D(HW_TP_FAULT, 60013, "Teach Pendant entered the Fault State", "suggest...") \
_D(HW_TP_VIOLATION, 60014, "Teach Pendant entered the Violation State", "suggest...") \
_D(HW_JOINT_MV_TOO_FAR, 60021, "" _PH1_ " joint moved too far before robot entered RUNNING State", "suggest...") \
_D(HW_JOINT_STOP_NOT_FAST, 60022, "Joint Not stopping fast enough", "suggest...") \
_D(HW_JOINT_MV_LIMIT, 60023, "Joint moved more than allowable limit", "suggest...") \
_D(HW_FT_SENSOR_DATA_INVALID, 60024, "Force-Torque Sensor data invalid", "suggest...") \
_D(HW_NO_FT_SENSOR, 60025, "Force-Torque sensor is expected, but it cannot be detected", "suggest...") \
_D(HW_FT_SENSOR_NOT_CALIB, 60026, "Force-Torque sensor is detected but not calibrated", "suggest...") \
_D(HW_RELEASE_BRAKE_FAILED, 60030, "Robot was not able to brake release, see log for details", "suggest...") \
_D(HW_OVERCURR_SHUTDOWN, 60040, "Overcurrent shutdown", "suggest...") \
_D(HW_ENERGEY_SURPLUS, 60050, "Energy surplus shutdown", "suggest...") \
_D(HW_IDLE_POWER_HIGH, 60060, "Idle power consumption to high", "suggest...") \
_D(HW_ENTER_COLLISION_TIMEOUT, 60071, "Enter collision stop procedure timeout", "suggest...") \
_D(HW_POWERON_TIMEOUT, 60072, "Poweron robot timeout", "suggest...") \
_D(HW_NO_NIC_FOUND, 60073, "No network cards found.", "suggest...") \
_D(HW_IFB_NOT_FOUND, 60074, "No Interface Board found.", "suggest...") \
_D(HW_IFB_BOOTLOAD, 60075, "The Interface Board is in bootloader mode. Update firmware firstly.", "suggest...") \
_D(HW_TOOL_NOT_FOUND, 60076, "No Tool Board found.", "suggest...") \
_D(HW_BASE_NOT_FOUND, 60077, "No Base Board found.", "suggest...") \
_D(HW_BRINGUP_TIMEOUT, 60078, "Poweron robot timeout", "suggest...") \
_D(HW_COLLISION_RECOVERY_FAILED, 60079, "Collision recovery failed", "suggest...") \
_D(HW_TP_ENABLED, 60080, "Teach pendant enabled status changed to " _PH1_, "suggest...")
// clang-format on
// 定义硬件抽象层的错误代码
#define HAL_ERRORS \
JOINT_ERRORS \
JOINT_EX_ERRORS \
EXT_AXIS_ERRORS \
SAFETY_INTERFACE_BOARD_ERRORS \
TOOL_ERRORS \
EX_TOOL_ERRORS \
PEDSTRAL_ERRORS \
EX_PEDSTRAL_ERRORS \
HARDWARE_INTERFACE_ERRORS
#endif // AUBO_SDK_JOINT_ERROR_H

View File

@ -0,0 +1,187 @@
/** @file rtm_error.h
* @brief
*/
#ifndef AUBO_SDK_RTM_ERROR_H
#define AUBO_SDK_RTM_ERROR_H
// clang-format off
#define RTM_ERRORS \
_D(ROBOT_BE_PULLING, 30001, "Something is pulling the robot.","Please check TCP configuration,payload and mounting settings") \
_D(PSTOP_ELBOW_POS, 30002, "Protective Stop: Elbow position close to safety plane limits.","Please move robot Elbow joint away from the safety plane") \
_D(PSTOP_STOP_TIME, 30003, "Protective Stop: Exceeding user safety settings for stopping time.","(a) Check speeds and accelerations in the program (b) Check usage of TCP,payload and CoG correctly (c) Check external equipmentactivation if correctly set") \
_D(PSTOP_STOP_DISTANCE, 30004, "Protective Stop: Exceeding user safety settings for stopping distance.","(a) Check speeds and accelerations in the program (b) Check usage of TCP,payload and CoG correctly (c) Check external equipmentactivation if correctly set") \
_D(PSTOP_CLAMP, 30005, "Protective Stop: Danger of clamping between the Robots lower arm and tool.","(a) Check speeds and accelerations in the program (b) Check usage of TCP,payload and CoG correctly (c) Check external equipmentactivation if correctly set") \
_D(PSTOP_POS_LIMIT, 30006, "Protective Stop: Position close to joint limits", "suggest...") \
_D(PSTOP_ORI_LIMIT, 30007, "Protective Stop: Tool orientation close to limits", "suggest...") \
_D(PSTOP_PLANE_LIMIT, 30008, "Protective Stop: Position close to safety plane limits", "suggest...") \
_D(PSTOP_POS_DEVIATE, 30009, "Protective Stop: Position deviates from path", "Check payload, center of gravity and acceleration settings.") \
_D(JOINT_CHK_PAYLOAD, 30010, "Joint " _PH1_ ": Check payload, center of gravity and acceleration settings. Log screen may contain additional information.", "suggest...") \
_D(PSTOP_SINGULARITY, 30011, "Protective Stop: Position in singularity.","Please use MoveJ or change the motion") \
_D(PSTOP_CANNOT_MAINTAIN, 30012, "Protective Stop: Robot cannot maintain its position, check if payload is correct", "suggest...") \
_D(PSTOP_WRONG_PAYLOAD, 30013, "Protective Stop: Wrong payload or mounting detected, or something is pushing the robot when entering Freedrive mode","Verify that the TCP configuration and mounting in the used installation is correct") \
_D(PSTOP_JOINT_COLLISION, 30014, "Protective Stop: Collision detected by joint " _PH1_, "Make sure no objects are in the path of the robot and resume the program") \
_D(PSTOP_POS_DISAGREE, 30015, "Protective stop: The robot was powered off last time due to a joint position disagreement."," (a) Verify that the robot position in the 3D graphics matches the real robot, to ensure that the encoders function before releasing the brakes. Stand back and monitor the robot performing its first program cycle as expected. (b) If the position is not correct, the robot must be repaired. In this case, click Power Off Robot. (c) If the position is correct, please tick the check box below the 3D graphics and click Robot Position Verified") \
_D(TARGET_JOINT_SPEED_EXCEED, 30016, "Target joint speed exceed limits", "suggest...") \
_D(TARGET_POS_SUDDEN_CHG, 30017, "Sudden change in target position", "suggest...") \
_D(SUDDEN_STOP, 30018, "Sudden stop."," To abort a motion, use \"stopj\" or \"stopl\" script commands to generate a smooth deceleration before using \"wait\". Avoid aborting motions between waypoints with blend”") \
_D(ROBOT_STOP_ABNORMAL, 30019, "Robot has not stopped in the allowed reaction and braking time", "suggest...") \
_D(PROG_INVALID_SETP, 30020, "Robot program resulted in invalid setpoint.", "Please review waypoints in the program") \
_D(BLEND_INVALID_SETP, 30021, "Blending failed and resulted in an invalid setpoint.", "Try changing the blend radius or contact technical support") \
_D(APPROACH_SINGULARITY, 30022, "Robot approaching singularity Acceleration threshold failed.","Review waypoints in the program, try using MoveJ instead of MoveL in the position close to singularity") \
_D(TSPEED_UNMATCH_POS, 30023, "Target speed does not match target position", "suggest...") \
_D(INCONSIS_TPOS_SPD, 30024, "Inconsistency between target position and speed", "suggest...") \
_D(JOINT_TSPD_UNMATCH_POS, 30025, "Target joint speed does not match target joint position change Joint " _PH1_ "", "suggest...") \
_D(FIELDBUS_INPUT_DISCONN, 30026, "Fieldbus input disconnected.","Please check fieldbus connections (RTDE, ModBus, EtherNet/IP and Profinet) or disable the fieldbus in the installation. Check RTDE watchdog feature. Check if a URCap is using this feature.") \
_D(OPMODE_CHANGED, 30027, "Operational mode changed: " _PH1_ "", "suggest...") \
_D(NO_KIN_CALIB, 30028, "No Kinematic Calibration found (calibration.conf file is either corrupt or missing).","A new kinematics calibration may be needed if the robot needs to improve its kinematics, otherwise, ignore this message)") \
_D(KIN_CALIB_UNMATCH_JOINT, 30029, "Kinematic Calibration for the robot does not match the joint(s).", "If moving a program from a different robot to this one, rekinematic calibrate the second robot to improve kinematics, otherwise ignore this message.") \
_D(KIN_CALIB_UNMATCH_ROBOT, 30030, "Kinematic Calibration does not match the robot.","Please check if the serial number of the robot arm matches the Control Box") \
_D(JOINT_OFFSET_CHANGED, 30031, "Large movement of the robot detected while it was powered off. The joints were moved while it was powered off, or the encoders do not function", "suggest...") \
_D(OFFSET_CHANGE_HIGH, 30032, "Change in offset is too high", "suggest...") \
_D(JOINT_SPEED_LIMIT, 30033, "Close to joint speed safety limit.", "Review program speed and acceleration") \
_D(TOOL_SPEED_LIMIT, 30034, "Close to tool speed safety limit.", "Review program speed and acceleration") \
_D(MOMENTUM_LIMIT, 30035, "Close to momentum safety limit.", "Review program speed and acceleration") \
_D(ROBOT_MV_STOP, 30036, "Robot is moving when in Stop Mode", "suggest...") \
_D(HAND_PROTECTION, 30037, "Hand protection: Tool is too close to the lower arm: " _PH1_ " meter.","(a) Check wrist position. (b) Verify mounting (c) Do a Complete rebooting sequence (d) Update software (e) Contact your local AUBO Robots service provider for assistance") \
_D(WRONG_SAFETYMODE, 30038, "Wrong safety mode: " _PH1_, "suggest...") \
_D(SAFETYMODE_CHANGED, 30039, "Safety mode changed: " _PH1_, "suggest...") \
_D(JOINT_ACC_LIMIT, 30040, "Close to joint acceleration safety limit", "suggest...") \
_D(TOOL_ACC_LIMIT, 30041, "Close to tool acceleration safety limit", "suggest...") \
_D(JOINT_TEMPERATURE_LIMIT, 30042, "Joint " _PH1_ " temperature too high(>" _PH2_ "℃)", "suggest...") \
_D(CONTROL_BOX_TEMPERATURE_LIMIT, 30043, "Control box temperature too high(>" _PH1_ "℃)", "suggest...") \
_D(ROBOT_EMERGENCY_STOP, 30044, "Robot emergency stop", "suggest...") \
_D(ROBOTMODE_CHANGED, 30045, "Robot mode changed: " _PH1_, "suggest...") \
_D(ROBOTMODE_ERROR, 30046, "Wrong robot mode: " _PH1_, "suggest...") \
_D(POSE_OUT_OF_REACH, 30047, "Target pose [" _PH1_ "] out of reach", "suggest...") \
_D(TP_PLAN_FAILED, 30048, "Trajectory plan FAILED." , "suggest...") \
_D(START_FORCE_FAILED, 30049, "Start force control failed, because force sensor does not exist." , "suggest...") \
_D(OVER_SAFE_PLANE_LIMIT,30050, _PH1_ " axis exceeds the safety plane limit (Move_type:" _PH2_ " id:" _PH3_ ").","Please move the robot to the safety plane range.") \
_D(POWERON_FAIL_VIOLATION,30051, "Failed to power on because the robot safety mode is in violation", "suggest...") \
_D(POWERON_FAIL_SYSTEMEMERGENCYSTOP, 30052, "Failed to power on because the robot safety mode is in system emergency stop", "suggest...") \
_D(POWERON_FAIL_ROBOTEMERGENCYSTOP, 30053, "Failed to power on because the robot safety mode is in robot emergency stop", "Pop up the red emergency stop button on the teach pendant when the robot is in a safe range of motion") \
_D(POWERON_FAIL_FAULT, 30054, "Failed to power on because the robot safety mode is in fault", "suggest...") \
_D(STARTUP_FAIL_VIOLATION, 30055, "Failed to startup because the robot safety mode is in violation", "suggest...") \
_D(STARTUP_FAIL_SYSTEMEMERGENCYSTOP, 30056, "Failed to startup because the robot safety mode is in system emergency stop", "suggest...") \
_D(STARTUP_FAIL_ROBOTEMERGENCYSTOP, 30057, "Failed to startup because the robot safety mode is in robot emergency stop", "Pop up the red emergency stop button on the teach pendant when the robot is in a safe range of motion") \
_D(STARTUP_FAIL_FAULT, 30058, "Failed to startup because the robot safety mode is in fault", "suggest...") \
_D(BACKDRIVE_FAIL_VIOLATION, 30059, "Failed to backdrive because the robot safety mode is in violation", "suggest...") \
_D(BACKDRIVE_FAIL_SYSTEMEMERGENCYSTOP, 30060, "Failed to backdrive because the robot safety mode is in system emergency stop", "suggest...") \
_D(BACKDRIVE_FAIL_ROBOTEMERGENCYSTOP, 30061, "Failed to backdrive because the robot safety mode is in robot emergency stop", "Pop up the red emergency stop button on the teach pendant when the robot is in a safe range of motion") \
_D(BACKDRIVE_FAIL_FAULT, 30062, "Failed to backdrive because the robot safety mode is in fault", "suggest...") \
_D(SETSIM_FAIL_VIOLATION, 30063, "Switch sim mode failed because the robot safety mode is in violation", "suggest...") \
_D(SETSIM_FAIL_SYSTEMEMERGENCYSTOP, 30064, "Switch sim mode failed because the robot safety mode is in system emergency stop", "suggest...") \
_D(SETSIM_FAIL_ROBOTEMERGENCYSTOP, 30065, "Switch sim mode failed because the robot safety mode is in robot emergency stop", "Pop up the red emergency stop button on the teach pendant when the robot is in a safe range of motion") \
_D(SETSIM_FAIL_FAULT, 30066, "Switch sim mode failed because the robot safety mode is in fault", "suggest...") \
_D(FREEDRIVE_FAIL_VIOLATION, 30067, "Enable handguide mode failed because the robot safety mode is in violation", "suggest...") \
_D(FREEDRIVE_FAIL_SYSTEMEMERGENCYSTOP, 30068, "Enable handguide mode failed because the robot safety mode is in system emergency stop", "suggest...") \
_D(FREEDRIVE_FAIL_ROBOTEMERGENCYSTOP, 30069, "Enable handguide mode failed because the robot safety mode is in robot emergency stop", "Pop up the red emergency stop button on the teach pendant when the robot is in a safe range of motion") \
_D(FREEDRIVE_FAIL_FAULT, 30070, "Enable handguide mode failed because the robot safety mode is in fault", "suggest...") \
_D(UPFIRMWARE_FAIL_VIOLATION, 30071, "Firmware update failed because the robot safety mode is in violation", "suggest...") \
_D(UPFIRMWARE_FAIL_SYSTEMEMERGENCYSTOP, 30072, "Firmware update failed because the robot safety mode is in system emergency stop", "suggest...") \
_D(UPFIRMWARE_FAIL_ROBOTEMERGENCYSTOP, 30073, "Firmware update failed because the robot safety mode is in robot emergency stop", "Pop up the red emergency stop button on the teach pendant when the robot is in a safe range of motion") \
_D(UPFIRMWARE_FAIL_FAULT, 30074, "Firmware update failed because the robot safety mode is in fault", "suggest...") \
_D(SETPERSOSTENT_FAIL_VIOLATION, 30075, "Set persistent parameter failed because the robot safety mode is in violation", "suggest...") \
_D(SETPERSOSTENT_FAIL_SYSTEMEMERGENCYSTOP, 30076, "Set persistent parameter failed because the robot safety mode is in system emergency stop", "suggest...") \
_D(SETPERSOSTENT_FAIL_ROBOTEMERGENCYSTOP, 30077, "Set persistent parameter failed because the robot safety mode is in robot emergency stop", "Pop up the red emergency stop button on the teach pendant when the robot is in a safe range of motion") \
_D(SETPERSOSTENT_FAIL_FAULT, 30078, "Set persistent parameter failed because the robot safety mode is in fault", "suggest...") \
_D(SETPERSOSTENT_FAIL_PARAM_ERR, 30079, "Set persistent parameter failed", "(a) Check the parameter format, whether all are floating point numbers") \
_D(ROBOT_CABLE_DISCONN, 30080, "Robot cable not connected", "(a) Make sure the cable between Control Box and Robot Arm is correctly connected and it has no damage. (b) Check for loose connections (c) Do a Complete rebooting sequence (d) Update software (e) Contact your local AUBO Robots service provider for assistance Contact your local AUBO Robots service provider for assistance.") \
_D(TP_TOO_SHORT, 30081, "The generated trajectory is ignored because it is too short", "(a) Please check if the added waypoints are coincident (b) If it is an arc movement, please check whether the three points are collinear") \
_D(INV_KIN_FAIL, 30082, "Inverse kinematics solution failed. The target pose may be in a singular position or exceed the joint limits", "(a) Change the target pose and try moving again") \
_D(FREEDRIVE_ENABLED, 30083, "Freedrive status changed to " _PH1_ "", "suggest...") \
_D(TP_INV_FAIL_REFERENCE_JOINT_OUT_OF_LIMIT, 30084, "Inverse kinematics solution failed. Reference angle [" _PH1_ "] exceeds joint limit [" _PH2_ "].", "suggest...") \
_D(TP_INV_FAIL_NO_SOLUTION, 30085, "Inverse kinematics solution failed. The reference angle [" _PH1_ "] and the target angle [" _PH2_ "] are used as parameters. there is no solution in the calculation of the inverse solution process.", "suggest...")\
_D(SERVO_FAIL_VIOLATION, 30086, "Switch servo mode failed because the robot safety mode is in violation", "suggest...") \
_D(SERVO_FAIL_SYSTEMEMERGENCYSTOP, 30087, "Switch servo mode failed because the robot safety mode is in system emergency stop", "suggest...") \
_D(SERVO_FAIL_ROBOTEMERGENCYSTOP, 30088, "Switch servo mode failed because the robot safety mode is in robot emergency stop", "Pop up the red emergency stop button on the teach pendant when the robot is in a safe range of motion") \
_D(SERVO_FAIL_FAULT, 30089, "Switch servo mode failed because the robot safety mode is in fault", "suggest...") \
_D(FREEDRIVE_FAIL_NO_RUNNING, 30090, "Enable handguide mode failed because the robot mode type is " _PH1_ "(not running)", "suggest...") \
_D(RUNTIME_MACHINE_ERROR, 30091, "The state of the running machine is " _PH1_ ", not " _PH2_ ". " _PH3_ " function execution failed because the state is wrong." , "suggest...") \
_D(RESUME_FAR_PAUSE_PT, 30092, "Cannot resume from joint position [" _PH1_ "].\\nToo far away from paused point [" _PH2_ "]." , "suggest...") \
_D(PAYLOAD_LIGHTER_ERROR, 30093, "The payload setting is too small!" , "suggest...") \
_D(PAYLOAD_OVERLOAD_ERROR, 30094, "The payload setting is too large!" , "suggest...") \
_D(PAUSE_FAIL_NOT_POSITION_PLAN_MODE, 30095, "This motion does not support the pause function. The motion is stopping." , "suggest...") \
_D(TP_PLAN_FAILED_CIRCULAR_WAYPOINTS_COINCIDE, 30096, "The planning failed because the three waypoints of the arc were determined to coincide." , "Check the circular waypoints to make sure they are different.") \
_D(SERVO_WRONG_SAFETYMODE, 30097, "Switch servo mode failed because the robot safety mode is in " _PH1_ "." , "Check the circular waypoints to make sure they are different.") \
_D(SET_PERSTPARAM_WRONG_SAFETYMODE, 30098, "Set persistent parameter failed because the robot safety mode is in " _PH1_ , "suggest...") \
_D(SET_KINPARAM_WRONG_SAFETYMODE, 30099, "Set Kinematics Compensate parameters failed because the robot safety mode is in " _PH1_ , "suggest...") \
_D(SET_ROBOT_ZERO_WRONG_SAFETYMODE, 30100, "Set current joint angles to zero failed because the robot safety mode is in " _PH1_ , "suggest...") \
_D(UPFIRMWARE_WRONG_SAFETYMODE, 30101, "Firmware update failed because the robot safety mode is in " _PH1_, "suggest...") \
_D(POWERON_WRONG_SAFETYMODE, 30102, "Failed to power on because the robot safety mode is in " _PH1_, "suggest...") \
_D(STARTUP_WRONG_SAFETYMODE, 30103, "Failed to startup because the robot safety mode is in " _PH1_, "suggest...") \
_D(BACKDRIVE_WRONG_SAFETYMODE, 30104, "Failed to backdrive because the robot safety mode is in system emergency stop", "suggest...") \
_D(SETSIM_WRONG_SAFETYMODE, 30105, "Switch sim mode failed because the robot safety mode is in violation", "suggest...") \
_D(FREEDRIVE_WRONG_SAFETYMODE, 30106, "Enable handguide mode failed because the robot safety mode is in wrong safety mode: " _PH1_, "suggest...") \
_D(TP_PLAN_FAILED_JOINT_JUMP_BIGGER, 30107, "Inverse kinematics solution failed. The target point and the current point are in different robot configuration spaces.", "Add a few more points between the target point and the current point.") \
_D(RUN_PROGRAM_FAILED, 30108, "Run program " _PH1_ " failed.", "suggset...") \
_D(FREEDRIVE_FAIL_WRONG_RTMSTATE, 30109, "Unable to enter the HandGuide mode as the robot is not currently in a stopped or paused state.", "suggset...") \
_D(SAFEGUARDSTOP_CONFIGURABLE_INPUT, 30110, "Configurable safety input is triggered.", "suggset...") \
_D(SAFEGUARDSTOP_3PE, 30111, "3PE is triggered.", "suggset...") \
_D(SAFEGUARDSTOP_SI, 30112, "SI0/SI1 is triggered.", "suggset...") \
_D(ROBOT_TYPE_CHANGED, 30200, "Robot type changed to '" _PH1_ "', and robot subtype changed to '" _PH2_ "'", "suggest...") \
_D(LINKMODE_CHANGED, 30201, "Link mode changed to " _PH1_ "", "suggest...") \
_D(ROBOT_SELF_COLLISION, 30301, "Detect risk of robot self collision", "suggest...") \
_D(CONSTANT_INVALID, 30302, "Joint torque constants are invalid. HandGuide will be disabled, and the collision protection may be triggered by mistake.", "suggest...") \
_D(GRAVITY_INVALID, 30303, "Abnormal value of gravity acceleration sensor. HandGuide will be disabled, and the collision protection may be triggered by mistake.", "suggest...") \
_D(DYNAMICS_INVALID, 30304, "Robot dynamics parameters are invalid. HandGuide will be disabled, and the collision protection may be triggered by mistake.", "suggest...") \
_D(FRICTION_INVALID, 30305, "Joint friction parameters are invalid. HandGuide will be disabled, and the collision protection may be triggered by mistake.", "suggest...") \
_D(HANDGUIDE_UNDER_DEVELOP, 30306, "Robot type of " _PH1_ " function under development. HandGuide will be disabled, and the collision protection may be triggered by mistake.", "suggest...") \
_D(SLOW_DOWN_INFO, 30307, "Slow down level changed to " _PH1_ "(" _PH2_ "%)", "suggest...") \
_D(WRONG_JOINT_DESIGNED_LIMIT, 30308, "Joint designed ranges exceeds ranges read from hardware interface.", "suggest...") \
_D(FREEDRIVE_IN_SIMULATION, 30309, "Enable handguide mode failed because the robot is in simulation mode.", "suggest...") \
_D(ROBOT_STOPPING_TIMEOUT, 30310, "Robot stopping timeout.", "suggest...") \
_D(PSTOP_INCORRECT_FORCE_OFFSET, 30311, "Protective Stop: Sudden change in force control target position. Force sensor offset may be incorrect or force sensor fault.", "suggest...") \
_D(WRONG_JOINT_SAFETY_LIMIT, 30312, "Joint safety ranges exceeds designed ranges.", "suggest...") \
_D(PSTOP_TCP_PLANE_VIOLATION, 30401, "Protective Stop: TCP position close to safety plane limits.", "suggest...") \
_D(PSTOP_ELBOW_PLANE_VIOLATION, 30402, "Protective Stop: elbow position close to safety plane limits.", "suggest...") \
_D(PSTOP_JOINT_TORQUE_VIOLATION, 30403, "Protective Stop: joint" _PH1_ " exceeds torque limit.", "suggest...") \
_D(PSTOP_JOINT_POSITION_VIOLATION, 30404, "Protective Stop: joint" _PH1_ " exceeds position limit.", "suggest...") \
_D(PSTOP_JOINT_SPEED_VIOLATION, 30405, "Protective Stop: joint" _PH1_ " exceeds speed limit.", "suggest...") \
_D(PSTOP_TCP_SPEED_VIOLATION, 30406, "Protective Stop: TCP speed close to safety limits.", "suggest...") \
_D(PSTOP_ELBOW_SPEED_VIOLATION, 30407, "Protective Stop: elbow speed close to safety limits.", "suggest...") \
_D(PSTOP_TCP_FORCE_VIOLATION, 30408, "Protective Stop: TCP foece close to safety limits.", "suggest...") \
_D(PSTOP_ELBOW_TORQUE_VIOLATION, 30409, "Protective Stop: elbow torque close to safety limits.", "suggest...") \
_D(PSTOP_POWER_VIOLATION, 30410, "Protective Stop: robot power close to safety limits.", "suggest...") \
_D(PSTOP_MOMENTUM_VIOLATION, 30411, "Protective Stop: robot momentum close to safety limits.", "suggest...") \
_D(PSTOP_TCP_CUBE_VIOLATION, 30412, "Protective Stop: TCP position close to safety cube.", "suggest...") \
_D(PSTOP_ELBOW_CUBE_VIOLATION, 30413, "Protective Stop: TCP position close to safety cube.", "suggest...") \
_D(REDUCE_ELBOW_PLANE_TRIGGER, 30414, "Reduce mode: elbow close to safety plane triggers reduction mode.", "suggest...") \
_D(REDUCE_TCP_PLANE_TRIGGER, 30415, "Reduce mode: TCP close to safety plane triggers reduction mode.", "suggest...") \
_D(PSTOP_MOVE_OUT_RANGE, 30416, "Joint " _PH1_ " has exceeded the limit, please do not continue to move out of the range", "suggest...") \
_D(RESUME_PAUSE_FAILED, 30417, "Resume Failed: Safety mode type is " _PH1_ "", "suggest...") \
_D(FIRMWARE_UPDATE_FAIL_EMERGENCYSTOP, 30418, "Failed to firmware update because the robot safety mode is in " _PH1_ , "Release emergency stop when the robot is in a safe range of motion") \
_D(TOOL_SENSOR_CHANGED, 30419, "Tool sensor type changed to " _PH1_ "", "suggest...") \
_D(TOOL_SENSOR_REMOVED, 30420, "Tool sensor is removed.", "suggest...") \
_D(CAL_TARGET_CURRENT_ERR, 30421, "The calculation of the target current failed. Please try again later.", "suggest...") \
_D(CONVEYOR_MODE_CHANGED, 30422, "Conveyor" _PH1_ ": track mode changed to " _PH2_ ", track item id is " _PH3_, "suggest...") \
_D(CONVEYOR_ENQUEUE, 30423, "Conveyor" _PH1_ ": the queue has been changed, item" _PH2_ " is enqueue", "suggest...") \
_D(CONVEYOR_DEQUEUE_FINISH, 30424, "Conveyor" _PH1_ ": the queue has been changed, item" _PH2_ " dequeue due to track finished", "suggest...") \
_D(CONVEYOR_DEQUEUE_STARTWINDOW, 30425, "Conveyor" _PH1_ ": the queue has been changed, item" _PH2_ " dequeue due to exceeds startwindow", "suggest...") \
_D(CONVEYOR_DEQUEUE_LIMIT, 30426, "Conveyor" _PH1_ ": the queue has been changed, item" _PH2_ " dequeue due to exceed limit area", "suggest...") \
_D(CONVEYOR_DEQUEUE_CLEAR, 30427, "Conveyor" _PH1_ ": item queue is cleared", "suggest...") \
_D(CONVEYOR_NEXT_TRACK, 30428, "Conveyor" _PH1_ ": item" _PH2_ " inside the start window that can be tracked ", "suggest...") \
_D(CONVEYOR_EXCEED_LIMIT, 30429, "Conveyor" _PH1_ ": item" _PH2_ " exceeds the limit area during tracking", "suggest...") \
_D(WRONG_POWER_SAFETY_LIMIT, 30430, "Robot power safety value exceeds designed value.", "suggest...") \
_D(WRONG_POWER_DESIGNED_LIMIT, 30431, "Power designed value exceeds value read from hardware interface.", "suggest...") \
_D(TOOL_SENSOR_STATUS_CHANGED, 30432, "Tool sensor status changed to " _PH1_, "suggest...") \
_D(COLLISION_THRESHOLD_INVALID, 30433, "Robot collision threshold parameters are invalid.Please reidentify the threshold or modify the configuration to ensure that it does not cause accidental collisions.", "suggest...") \
_D(GRIPPER_DISCONNECT, 30434, "The gripper " _PH1_ " is disconnected.", "suggest...") \
_D(GRIPPER_UNKNOWN_FAULT, 30435, "There is an unknown fault with the gripper " _PH1_ , "suggest...") \
_D(GRIPPER_CURRENT_ANOMALY_FAULT, 30436, "There is an abnormal current fault with the gripper " _PH1_ , "suggest...") \
_D(GRIPPER_VOLTAGE_ANOMALY_FAULT, 30437, "There is an abnormal voltage fault with the gripper " _PH1_ , "suggest...") \
_D(GRIPPER_OVER_TEMPERATURE_FAULT, 30438, "There is an over-temperature fault with the gripper " _PH1_ , "suggest...") \
_D(GRIPPER_INTERNAL_FAULT, 30439, "There is an internal fault with the gripper " _PH1_ , "suggest...") \
_D(GRIPPER_COMMUNICATION_FAULT, 30440, "There is an communication fault with the gripper " _PH1_ , "suggest...") \
_D(GRIPPER_CONTROL_COMMAND_FAULT, 30441, "There is an control command fault with the gripper " _PH1_ , "suggest...") \
_D(GRIPPER_ENABLE_FAULT, 30442, "There is an enable fault with the gripper " _PH1_ , "suggest...") \
_D(WRIST_SINGULARITY_RISK, 30443,"Wrist singularity detected. Linear motion may cause excessive joint speed.Adjust robot posture to avoid J5 near 0° or 180°, or use joint motion instead of linear motion.","suggest...") \
_D(PSTOP_PATH_OFFSET_OVER_LIMIT, 30444, "Protective Stop: the offset of the robot has exceeded the limit.", "suggest...") \
_D(EXT_AXIS_SET_PARAM_FAILED_BUSY, 30445, "Set external axis parameter " _PH1_ " failed because the robot mode is in " _PH2_ ". Please power off the robot before changing this parameter.", "Power off the robot and try again.") \
_D(WRONG_JOINT_POS_LIMIT, 30446, "Joint limit max pos less than min pos.", "suggest...") \
_D(WRONG_JOINT_VEL_LIMIT, 30447, "Joint limit max vel is invalid.", "suggest...") \
_D(AUTO_RESUME_FAR_PAUSE_PT, 30448, "Robot is still paused after switching to automatic mode. Current joint position [" _PH1_ "] is too far away from pause position [" _PH2_ "]. Resuming directly may cause collision.", "Move the robot back to the pause position or stop the program before resuming.") \
_D(CONVEYOR_TRACK_CAPACITY_EXCEEDED, 30449, "Conveyor" _PH1_ ": item" _PH2_ " tracking capacity exceeded, tracking stop started. Capacity usage is " _PH3_ "%, actual conveyor speed is " _PH4_ " m/s.", "Reduce conveyor speed, shorten tracking distance, or adjust tracking posture.")
// clang-format on
#endif // AUBO_SDK_RTM_ERROR_H

View File

@ -0,0 +1,60 @@
/** @file system_error.h
* @brief
*/
#ifndef AUBO_SDK_SYSTEM_ERROR_H
#define AUBO_SDK_SYSTEM_ERROR_H
#define SYSTEM_ERRORS \
_D(DEBUG, 0, "Debug message " _PH1_, "suggest...") \
_D(POPUP, 1, "Popup title: " _PH1_ ", msg: " _PH2_ ", mode: " _PH3_, \
"suggest...") \
_D(POPUP_DISMISS, 2, _PH1_, "suggest...") \
_D(SYSTEM_HALT, 3, _PH1_, "suggest...") \
_D(INV_ARGUMENTS, 4, "Invalid arguments.", "suggest...") \
_D(USER_NOTIFY, 5, _PH1_, "suggest...") \
_D(POPUP_DISMISS_BY_ID, 6, _PH1_, "suggest...") \
_D(MODBUS_SIGNAL_CREATED, 10, "Modbus signal " _PH1_ " created.", \
"suggest...") \
_D(MODBUS_SIGNAL_REMOVED, 11, "Modbus signal " _PH1_ " removed.", \
"suggest...") \
_D(MODBUS_SIGNAL_VALUE_CHANGED, 12, \
"Modbus signal " _PH1_ " value changed to " _PH2_, "suggest...") \
_D(RUNTIME_CONTEXT, 13, \
"tid: " _PH1_ " lineno: " _PH2_ " index: " _PH3_ " comment: " _PH4_, \
"suggest...") \
_D(INTERP_CONTEXT, 14, \
"tid: " _PH1_ " lineno: " _PH2_ " index: " _PH3_ " comment: " _PH4_, \
"suggest...") \
_D(PROGRAM_LOADED, 15, "program loaded: " _PH1_, "suggest...") \
_D(TASK_DELETED, 16, "tid: " _PH1_, " was deleted") \
_D(MODBUS_SLAVE_BIT, 20, "Modbus slave address: " _PH1_ " value " _PH2_, \
"suggest...") \
_D(MODBUS_SLAVE_REG, 21, "Modbus slave address: " _PH1_ " value " _PH2_, \
"suggest...") \
_D(PNIO_SLAVE_SLOT_VALUE, 30, \
"PNIO slot: " _PH1_ " subslot " _PH2_ " index " _PH3_ " value " _PH4_, \
"suggest...") \
_D(PNIO_CONNECT_STATUS, 31, "PNIO connection status changed to " _PH1_, \
"suggest...") \
_D(PNIO_DEVICE_NAME, 32, "PNIO device name changed to " _PH1_, \
"suggest...") \
_D(PNIO_IP, 33, "PNIO ip " _PH1_ " mask " _PH2_ " gateway " _PH3_, \
"suggest...") \
_D(ICM_SERVER_STATUS, 40, " ICM server status changed to " _PH1_, \
"suggest...") \
_D(EIP_SLAVE_VALUE, 50, \
"EIP slave: trans_type " _PH1_ " index " _PH2_ " value " _PH3_, \
"suggest...") \
_D(EIP_SLAVE_CONNECT_STATUS, 51, \
"EIP slave connection status changed to " _PH1_, "suggest...") \
_D(LOG_PROGRAM_SUCCESS, 100, \
"[" _PH1_ "] Load program " _PH2_ " successful", "suggest...") \
_D(LOG_PROGRAM_FAILED, 101, \
"[" _PH1_ "] Load program " _PH2_ " failed, file not found", \
"suggest...") \
_D(LOG_PROGRAM_FAILED2, 102, \
"[" _PH1_ "] Load program " _PH2_ \
" failed, configuration file (.ins) does not match", \
"suggest...")
#endif // AUBO_SDK_SYSTEM_ERROR_H

View File

@ -0,0 +1,178 @@
/*
global_config.h
this file is generated. Do not change!
*/
#ifndef ARCS_GLOBALCONFIG_H
#define ARCS_GLOBALCONFIG_H
/* #undef ARCS_BUILD_SHARED_LIBS */
/* #undef ARCS_ENABLE_THREADING_SUPPORT */
//-------------------------------------------------------------------
// Header Availability
//-------------------------------------------------------------------
/* #undef ARCS_HAVE_CXXABI_H */
//-------------------------------------------------------------------
// Version information
//-------------------------------------------------------------------
#define INTERFACE_VERSION_MAJOR 0
#define INTERFACE_VERSION_MINOR 26
#define INTERFACE_VERSION_PATCH 0
#define INTERFACE_VERSION "0.26.0"
//-------------------------------------------------------------------
// Platform defines
//-------------------------------------------------------------------
#if defined(__APPLE__)
#define ARCS_PLATFORM_APPLE
#endif
#if defined(__linux__)
#define ARCS_PLATFORM_LINUX
#endif
#if defined(_WIN32) || defined(_WIN64)
#define ARCS_PLATFORM_WINDOWS
#else
#define ARCS_PLATFORM_POSIX
#endif
/* #undef ARCS_BIG_ENDIAN */
/* #undef ARCS_LITTLE_ENDIAN */
#define ARCS_LIB_PREFIX "lib"
#define ARCS_LIB_EXT ".so"
#define ARCS_EXE_EXT ""
#ifdef NDEBUG // Defined by cmake UNLESS Debug build type is chosen
#define ARCS_LIB_POSTFIX ""
#else
#define ARCS_LIB_POSTFIX \
"" // Set in top level CMakeList.txt
#endif
#define ARCS_FUNCTION // 函数接口
#define ARCS_INSTRUCT // 指令接口
///-------------------------------------------------------------------
// Macros for import/export declarations
//-------------------------------------------------------------------
#if defined(ARCS_PLATFORM_WINDOWS)
#define ARCS_ABI_EXPORT __declspec(dllexport)
#define ARCS_ABI_IMPORT __declspec(dllimport)
#define ARCS_ABI_LOCAL
#elif defined(ARCS_HAVE_VISIBILITY_ATTRIBUTE)
#define ARCS_ABI_EXPORT __attribute__((visibility("default")))
#define ARCS_ABI_IMPORT __attribute__((visibility("default")))
#define ARCS_ABI_LOCAL __attribute__((visibility("hidden")))
#else
#define ARCS_ABI_EXPORT
#define ARCS_ABI_IMPORT
#define ARCS_ABI_LOCAL
#endif
#ifdef ARCS_BUILDING_STAGE
#define ARCS_ABI ARCS_ABI_EXPORT
#else
#define ARCS_ABI ARCS_ABI_IMPORT
#endif
//-------------------------------------------------------------------
// Macros for suppressing warnings
//-------------------------------------------------------------------
#ifdef _MSC_VER
#define ARCS_MSVC_PUSH_DISABLE_WARNING(wn) \
__pragma(warning(push)) __pragma(warning(disable : wn))
#define ARCS_MSVC_POP_WARNING __pragma(warning(pop))
#define ARCS_MSVC_DISABLE_WARNING(wn) __pragma(warning(disable : wn))
#else
#define ARCS_MSVC_PUSH_DISABLE_WARNING(wn)
#define ARCS_MSVC_POP_WARNING
#define ARCS_MSVC_DISABLE_WARNING(wn)
#endif
#ifdef __GNUC__
#define aubo_gcc_pragma_expand(x) _Pragma(#x)
#define ARCS_GCC_PUSH_DISABLE_WARNING(wn) \
_Pragma("GCC diagnostic push") \
aubo_gcc_pragma_expand(GCC diagnostic ignored "-W" #wn)
#define ARCS_GCC_POP_WARNING _Pragma("GCC diagnostic pop")
#else
#define ARCS_GCC_PUSH_DISABLE_WARNING(wn)
#define ARCS_GCC_POP_WARNING
#endif
#if defined(__GNUC__)
#define ARCS_DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
#define ARCS_DEPRECATED __declspec(deprecated)
#else
#pragma message( \
"WARNING: You need to implement ARCS_DEPRECATED for your compiler!")
#define ARCS_DEPRECATED
#endif
// Do not warn about the usage of deprecated unsafe functions
ARCS_MSVC_DISABLE_WARNING(4996)
// Mark a variable or expression result as unused
#define ARCS_UNUSED(x) (void)(x)
//-------------------------------------------------------------------
// C++ Language features
//-------------------------------------------------------------------
/* #undef ARCS_HAVE_THREAD_LOCAL */
//-------------------------------------------------------------------
// C++ Library features
//-------------------------------------------------------------------
/* #undef ARCS_HAVE_REGEX */
//-------------------------------------------------------------------
// Hash Container
//-------------------------------------------------------------------
#define ARCS_HASH_FUNCTION_BEGIN(type) \
namespace std { \
template <> \
struct hash<type> \
{ \
std::size_t operator()(const type &arg) const \
{
#define ARCS_HASH_FUNCTION_END \
} \
} \
; \
}
//-------------------------------------------------------------------
// Utility macros
//-------------------------------------------------------------------
#define ARCS_STR_(x) #x
#define ARCS_STR(x) ARCS_STR_(x)
#define ARCS_CONCAT_(x, y) x##y
#define ARCS_CONCAT(x, y) ARCS_CONCAT_(x, y)
//-------------------------------------------------------------------
// Backwards compatibility macros
//-------------------------------------------------------------------
#if !defined(__clang__) && __GNUC__ == 4 && __GNUC_MINOR__ < 7
#define ARCS_FUTURE_READY true
#define ARCS_FUTURE_TIMEOUT false
#else
#define ARCS_FUTURE_READY std::future_status::ready
#define ARCS_FUTURE_TIMEOUT std::future_status::timeout
#endif
#endif // ARCS_GLOBALCONFIG_H

View File

@ -0,0 +1,320 @@
/** @file gripper_interface.h
* @brief
*/
#ifndef AUBO_SDK_GRIPPER_INTERFACE_H
#define AUBO_SDK_GRIPPER_INTERFACE_H
#include <aubo/sync_move.h>
#include <aubo/trace.h>
namespace arcs {
namespace common_interface {
/**
* \chinese
* @defgroup GripperInterface GripperInterface ()
* API接口
* \endchinese
*
* \english
* @defgroup GripperInterface Gripper Interface
* Common Gripper API interface
* \endenglish
*/
class ARCS_ABI_EXPORT GripperInterface
{
public:
GripperInterface();
virtual ~GripperInterface();
/**
* @ingroup GripperInterface
* \chinese
*
*
* @return
* \endchinese
*/
std::vector<std::string> gripperGetSupportedModels();
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param model
* @param device_name
* @return 0
* \endchinese
*/
ResultWithErrno2 gripperScanDevices(const std::string &model,
const std::string &device_name);
/**
* @ingroup GripperInterface
* \chinese
*
* @return
*/
std::vector<std::string> gripperGetNames();
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @param model
* @return 0
* \endchinese
*/
int gripperAdd(const std::string &name, const std::string &model);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @return 0
* \endchinese
*/
int gripperDelete(const std::string &name);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @return 0
* \endchinese
*/
int gripperDeleteAll();
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @param new_name
* @return 0
* \endchinese
*/
int gripperRename(const std::string &name, const std::string &new_name);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @param device_name
* @return 0
* \endchinese
*/
int gripperConnect(const std::string &name, const std::string &device_name);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @return 0
* \endchinese
*/
int gripperDisconnect(const std::string &name);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @return truefalse
* \endchinese
*/
bool gripperIsConnected(const std::string &name);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @param work_mode
* @return 0
* \endchinese
*/
int gripperSetWorkMode(const std::string &name, int work_mode);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @return
* \endchinese
*/
int gripperGetWorkMode(const std::string &name);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @param isVisibled
* @param pose 姿
* @return truefalse
* \endchinese
*/
int gripperSetMountPose(const std::string &name,
const std::vector<double> &pose,
bool enable_collision);
/**
* @brief
* @param name
* @return
*/
std::vector<double> gripperGetMountPose(const std::string &name);
/**
* @ingroup GripperInterface
* \chinese
* 使
*
* @param name
* @return
* \endchinese
*/
int gripperEnable(const std::string &name, bool enable);
/**
* \chinese
* 使15s
* gripper_link
*
* @param name
* @return 0
* \endchinese
*/
int gripperWaitEnableFinished(const std::string &name);
/**
* @ingroup GripperInterface
* \chinese
* 使
*
* @param name
* @return
* \endchinese
*/
bool gripperIsEnabled(const std::string &name);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @param position m/Pa
* @param velocity_percent %[0, 1]
* @param force N
* @param angle rad
* @param r_velocity_percent %[0, 1]
* @param torque_percent %[0, 1]
*
* @return
* \endchinese
*/
int gripperSetPosition(const std::string &name, const double position);
int gripperSetVelocity(const std::string &name,
const double velocity_percent);
int gripperSetForce(const std::string &name, const double force);
int gripperSetAngle(const std::string &name, const double angle);
int gripperSetRVelocity(const std::string &name,
const double r_velocity_percent);
int gripperSetTorque(const std::string &name, const double torque_percent);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @return
* \endchinese
*/
int gripperMove(const std::string &name);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @return
* \endchinese
*/
int gripperStop(const std::string &name);
/**
* @ingroup GripperInterface
* \chinese
*
*
* @param name
* @return
*
* @note Set接口一致
*
* \endchinese
*/
std::string gripperGetHardwareVersion(const std::string &name);
std::string gripperGetSoftwareVersion(const std::string &name);
double gripperGetPosition(const std::string &name);
double gripperGetVelocity(const std::string &name);
double gripperGetForce(const std::string &name);
double gripperGetAngle(const std::string &name);
double gripperGetRVelocity(const std::string &name);
double gripperGetTorque(const std::string &name);
bool gripperGetObjectDetection(const std::string &name);
bool gripperGetMotionState(const std::string &name);
double gripperGetVoltage(const std::string &name);
double gripperGetTemperature(const std::string &name);
/**
* @ingroup GripperInterface
* \chinese
* modbus从站ID
*
* @param name
* @param slave_id Id
* @return
* \endchinese
*/
int gripperResetSlaveId(const std::string &name, const int slave_id);
/**
* @ingroup GripperInterface
* \chinese
*
* @param name
* @return
* \endchinese
*/
int gripperGetStatusCode(const std::string &name);
protected:
void *d_;
};
using GripperInterfacePtr = std::shared_ptr<GripperInterface>;
} // namespace common_interface
} // namespace arcs
#endif // AUBO_SDK_GRIPPER_INTERFACE_H

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,403 @@
/** @file robot_interface.h
* @brief API
*/
#ifndef AUBO_SDK_ROBOT_INTERFACE_H
#define AUBO_SDK_ROBOT_INTERFACE_H
#include <aubo/sync_move.h>
#include <aubo/trace.h>
#include <aubo/robot/motion_control.h>
#include <aubo/robot/force_control.h>
#include <aubo/robot/io_control.h>
#include <aubo/robot/robot_algorithm.h>
#include <aubo/robot/robot_state.h>
#include <aubo/robot/robot_manage.h>
#include <aubo/robot/robot_config.h>
#include <aubo/global_config.h>
namespace arcs {
namespace common_interface {
/**
* \chinese
* @defgroup RobotInterface RobotInterface()
*
* \endchinese
*
* \english
* @defgroup RobotInterface Robot Module
* Robot Module
* \endenglish
*/
class ARCS_ABI_EXPORT RobotInterface
{
public:
RobotInterface();
virtual ~RobotInterface();
/**
* @ingroup RobotInterface
* @ref RobotConfig
* \chinese
* RobotConfig接口
*
* @return RobotConfigPtr对象的指针
*
* @par Python函数原型
* getRobotConfig(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::RobotConfig
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* RobotConfigPtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getRobotConfig();
* @endcode
* \endchinese
* \english
* Get RobotConfig interface
*
* @return Pointer to RobotConfig object
*
* @par Python function prototype
* getRobotConfig(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::RobotConfig
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* RobotConfigPtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getRobotConfig();
* @endcode
* \endenglish
*/
RobotConfigPtr getRobotConfig();
/**
* @ingroup RobotInterface
* @ref MotionControl
* \chinese
*
*
* @return MotionControlPtr对象的指针
*
* @par Python函数原型
* getMotionControl(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::MotionControl
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* MotionControlPtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getMotionControl();
* @endcode
* \endchinese
* \english
* Get motion planning interface
*
* @return Pointer to MotionControl object
*
* @par Python function prototype
* getMotionControl(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::MotionControl
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* MotionControlPtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getMotionControl();
* @endcode
* \endenglish
*/
MotionControlPtr getMotionControl();
/**
* @ingroup RobotInterface
* @ref ForceControl
* \chinese
*
*
* @return ForceControlPtr对象的指针
*
* @par Python函数原型
* getForceControl(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::ForceControl
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* ForceControlPtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getForceControl();
* @endcode
* \endchinese
* \english
* Get force control interface
*
* @return Pointer to ForceControl object
*
* @par Python function prototype
* getForceControl(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::ForceControl
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* ForceControlPtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getForceControl();
* @endcode
* \endenglish
*/
ForceControlPtr getForceControl();
/**
* @ingroup RobotInterface
* @ref IoControl
* \chinese
* IO控制的接口
*
* @return IoControlPtr对象的指针
*
* @par Python函数原型
* getIoControl(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::IoControl
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* IoControlPtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getIoControl();
* @endcode
* \endchinese
* \english
* Get IO control interface
*
* @return Pointer to IoControl object
*
* @par Python function prototype
* getIoControl(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::IoControl
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* IoControlPtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getIoControl();
* @endcode
* \endenglish
*/
IoControlPtr getIoControl();
/**
* @ingroup RobotInterface
* @ref SyncMove
* \chinese
*
*
* @return SyncMovePtr对象的指针
*
* @par Python函数原型
* getSyncMove(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::SyncMove
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* SyncMovePtr ptr = rpc_cli->getRobotInterface(robot_name)->getSyncMove();
* @endcode
* \endchinese
* \english
* Get synchronized motion interface
*
* @return Pointer to SyncMove object
*
* @par Python function prototype
* getSyncMove(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::SyncMove
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* SyncMovePtr ptr = rpc_cli->getRobotInterface(robot_name)->getSyncMove();
* @endcode
* \endenglish
*/
SyncMovePtr getSyncMove();
/**
* @ingroup RobotInterface
* @ref RobotAlgorithm
* \chinese
*
*
* @return RobotAlgorithmPtr对象的指针
*
* @par Python函数原型
* getRobotAlgorithm(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::RobotAlgorithm
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* RobotAlgorithmPtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getRobotAlgorithm();
* @endcode
* \endchinese
* \english
* Get robot utility algorithm interface
*
* @return Pointer to RobotAlgorithm object
*
* @par Python function prototype
* getRobotAlgorithm(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::RobotAlgorithm
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* RobotAlgorithmPtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getRobotAlgorithm();
* @endcode
* \endenglish
*/
RobotAlgorithmPtr getRobotAlgorithm();
/**
* @ingroup RobotInterface
* @ref RobotManage
* \chinese
* ()
*
* @return RobotManagePtr对象的指针
*
* @par Python函数原型
* getRobotManage(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::RobotManage
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* RobotManagePtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getRobotManage();
* @endcode
* \endchinese
* \english
* Get robot management interface (power on, start, stop, etc.)
*
* @return Pointer to RobotManage object
*
* @par Python function prototype
* getRobotManage(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::RobotManage
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* RobotManagePtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getRobotManage();
* @endcode
* \endenglish
*/
RobotManagePtr getRobotManage();
/**
* @ingroup RobotInterface
* @ref RobotState
* \chinese
*
*
* @return RobotStatePtr对象的指针
*
* @par Python函数原型
* getRobotState(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::RobotState
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* RobotStatePtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getRobotState();
* @endcode
* \endchinese
* \english
* Get robot state interface
*
* @return Pointer to RobotState object
*
* @par Python function prototype
* getRobotState(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::RobotState
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* RobotStatePtr ptr =
* rpc_cli->getRobotInterface(robot_name)->getRobotState();
* @endcode
* \endenglish
*/
RobotStatePtr getRobotState();
/**
* @ingroup RobotInterface
* @ref Trace
* \chinese
*
*
* @return TracePtr对象的指针
*
* @par Python函数原型
* getTrace(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::Trace
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* TracePtr ptr = rpc_cli->getRobotInterface(robot_name)->getTrace();
* @endcode
* \endchinese
* \english
* Get alarm information interface
*
* @return Pointer to Trace object
*
* @par Python function prototype
* getTrace(self: pyaubo_sdk.RobotInterface) ->
* arcs::common_interface::Trace
*
* @par C++ example
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* TracePtr ptr = rpc_cli->getRobotInterface(robot_name)->getTrace();
* @endcode
* \endenglish
*/
TracePtr getTrace();
protected:
void *d_;
};
using RobotInterfacePtr = std::shared_ptr<RobotInterface>;
} // namespace common_interface
} // namespace arcs
#endif // AUBO_SDK_ROBOT_INTERFACE_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,417 @@
/** @file serial.h
* @brief
*/
#ifndef AUBO_SDK_SERIAL_INTERFACE_H
#define AUBO_SDK_SERIAL_INTERFACE_H
#include <vector>
#include <memory>
#include <aubo/type_def.h>
#include <aubo/global_config.h>
namespace arcs {
namespace common_interface {
/**
* \chinese
* @defgroup Serial Serial ()
*
* \endchinese
*
* \english
* @defgroup Serial Serial Communication
* Serial communication
* \endenglish
*/
class ARCS_ABI_EXPORT Serial
{
public:
Serial();
virtual ~Serial();
/**
* @ingroup Serial
* \chinese
* TCP/IP以太网通信串口
*
* @param device
* @param baud
* @param stop_bits
* @param even
* @param serial_name
* @return
*
* @par Python函数原型
* serialOpen(self: pyaubo_sdk.Serial, arg0: str, arg1: int, arg2: float,
* arg3: int, arg4: str) -> int
*
* @par Lua函数原型
* serialOpen(device: string, baud: number, stop_bits: number, even: number,
* serial_name: string) -> nil
* \endchinese
* \english
* Open TCP/IP ethernet communication serial
*
* @param device
* @param baud
* @param stop_bits
* @param even
* @param serial_name
* @return
*
* @par Python function prototype
* serialOpen(self: pyaubo_sdk.Serial, arg0: str, arg1: int, arg2: float,
* arg3: int, arg4: str) -> int
*
* @par Lua function prototype
* serialOpen(device: string, baud: number, stop_bits: number, even: number,
* serial_name: string) -> nil
* \endenglish
*/
int serialOpen(const std::string &device, int baud, float stop_bits,
int even, const std::string &serial_name = "serial_0");
/**
* @ingroup Serial
* \chinese
* TCP/IP串口通信
*
*
* @param serial_name
* @return
*
* @par Python函数原型
* serialClose(self: pyaubo_sdk.Serial, arg0: str) -> int
*
* @par Lua函数原型
* serialClose(serial_name: string) -> nil
* \endchinese
* \english
* Close TCP/IP serial communication
* Close down the serial connection to the server.
*
* @param serial_name
* @return
*
* @par Python function prototype
* serialClose(self: pyaubo_sdk.Serial, arg0: str) -> int
*
* @par Lua function prototype
* serialClose(serial_name: string) -> nil
* \endenglish
*/
int serialClose(const std::string &serial_name = "serial_0");
/**
* @ingroup Serial
* \chinese
* 30
*
* @param variable
* @param serial_name
* @return
*
* @par Python函数原型
* serialReadByte(self: pyaubo_sdk.Serial, arg0: str, arg1: str) -> int
*
* @par Lua函数原型
* serialReadByte(variable: string, serial_name: string) -> number
* \endchinese
* \english
* Reads a number of bytes from the serial. Bytes are in network byte
* order. A maximum of 30 values can be read in one command.
*
* @param variable
* @param serial_name
* @return
*
* @par Python function prototype
* serialReadByte(self: pyaubo_sdk.Serial, arg0: str, arg1: str) -> int
*
* @par Lua function prototype
* serialReadByte(variable: string, serial_name: string) -> number
* \endenglish
*/
int serialReadByte(const std::string &variable,
const std::string &serial_name = "serial_0");
/**
* @ingroup Serial
* \chinese
* 30
* int列表=number+1
*
* @param number
* @param variable
* @param serial_name
* @return
*
* @par Python函数原型
* serialReadByteList(self: pyaubo_sdk.Serial, arg0: int, arg1: str, arg2: str) -> int
*
* @par Lua函数原型
* serialReadByteList(number: number, variable: string, serial_name: string) -> number
* \endchinese
* \english
* Reads a number of bytes from the serial. Bytes are in network byte
* order. A maximum of 30 values can be read in one command.
* A list of numbers read (list of ints, length=number+1)
*
* @param number Number of bytes to read
* @param variable
* @param serial_name Serial port name
* @return Return value
*
* @par Python function prototype
* serialReadByteList(self: pyaubo_sdk.Serial, arg0: int, arg1: str, arg2: str) -> int
*
* @par Lua function prototype
* serialReadByteList(number: number, variable: string, serial_name: string) -> number
* \endenglish
*/
int serialReadByteList(int number, const std::string &variable,
const std::string &serial_name = "serial_0");
/**
* @ingroup Serial
* \chinese
*
*
*
* "prefix" "suffix"
* "prefix" "prefix"
* "suffix" "suffix"
* "noise>hello<" prefix=">" suffix="<" "hello"
* 使 "prefix" "suffix" "suffix"
* ">hello<>world<"
*
* @param variable
* @param serial_name
* @param prefix
* @param suffix
* @param interpret_escape
* @return
*
* @par Python函数原型
* serialReadString(self: pyaubo_sdk.Serial, arg0: str, arg1: str, arg2: str, arg3: str, arg4: bool) -> int
*
* @par Lua函数原型
* serialReadString(variable: string, serial_name: string, prefix: string, suffix: string, interpret_escape: boolean) -> number
* \endchinese
* \english
* Reads all data from the serial and returns the data as a string.
* Bytes are in network byte order.
*
* The optional parameters "prefix" and "suffix", can be used to express
* what is extracted from the serial. The "prefix" specifies the start
* of the substring (message) extracted from the serial. The data up to
* the end of the "prefix" will be ignored and removed from the serial.
* The "suffix" specifies the end of the substring (message) extracted
* from the serial. Any remaining data on the serial, after the "suffix",
* will be preserved. E.g. if the serial server sends a string
* "noise>hello<", the controller can receive the "hello" by calling this
* script function with the prefix=">" and suffix="<". By using the
* "prefix" and "suffix" it is also possible send multiple string to the
* controller at once, because the suffix defines where the message ends.
* E.g. sending ">hello<>world<"
*
* @param variable
* @param serial_name
* @param prefix
* @param suffix
* @param interpret_escape
* @return
*
* @par Python function prototype
* serialReadString(self: pyaubo_sdk.Serial, arg0: str, arg1: str, arg2: str, arg3: str, arg4: bool) -> int
*
* @par Lua function prototype
* serialReadString(variable: string, serial_name: string, prefix: string, suffix: string, interpret_escape: boolean) -> number
* \endenglish
*/
int serialReadString(const std::string &variable,
const std::string &serial_name = "serial_0",
const std::string &prefix = "",
const std::string &suffix = "",
bool interpret_escape = false);
/**
* @ingroup Serial
* \chinese
*
* <value>ASCII字符1023
*
* @param value
* @param serial_name
* @return
*
* @par Python函数原型
* serialSendByte(self: pyaubo_sdk.Serial, arg0: str, arg1: str) -> int
*
* @par Lua函数原型
* serialSendByte(value: string, serial_name: string) -> nil
* \endchinese
* \english
* Sends a byte to the server
* Sends the byte <value> through the serial. Expects no response. Can
* be used to send special ASCII characters; 10 is newline, 2 is start of
* text, 3 is end of text.
*
* @param value
* @param serial_name
* @return
*
* @par Python function prototype
* serialSendByte(self: pyaubo_sdk.Serial, arg0: str, arg1: str) -> int
*
* @par Lua function prototype
* serialSendByte(value: string, serial_name: string) -> nil
* \endenglish
*/
int serialSendByte(char value, const std::string &serial_name = "serial_0");
/**
* @ingroup Serial
* \chinese
* int32_t
* <value>
*
* @param value
* @param serial_name
* @return
*
* @par Python函数原型
* serialSendInt(self: pyaubo_sdk.Serial, arg0: int, arg1: str) -> int
*
* @par Lua函数原型
* serialSendInt(value: number, serial_name: string) -> nil
* \endchinese
* \english
* Sends an int (int32_t) to the server
* Sends the int <value> through the serial. Send in network byte order.
* Expects no response.
*
* @param value
* @param serial_name
* @return
*
* @par Python function prototype
* serialSendInt(self: pyaubo_sdk.Serial, arg0: int, arg1: str) -> int
*
* @par Lua function prototype
* serialSendInt(value: number, serial_name: string) -> nil
* \endenglish
*/
int serialSendInt(int value, const std::string &serial_name = "serial_0");
/**
* @ingroup Serial
* \chinese
*
* ASCII编码通过串口发送字符串<str>
*
* @param str
* @param serial_name
* @return
*
* @par Python函数原型
* serialSendLine(self: pyaubo_sdk.Serial, arg0: str, arg1: str) -> int
*
* @par Lua函数原型
* serialSendLine(str: string, serial_name: string) -> nil
* \endchinese
* \english
* Sends a string with a newline character to the server
* Sends the string <str> through the serial in ASCII coding, appending a newline at the end. Expects no response.
*
* @param str
* @param serial_name
* @return
*
* @par Python function prototype
* serialSendLine(self: pyaubo_sdk.Serial, arg0: str, arg1: str) -> int
*
* @par Lua function prototype
* serialSendLine(str: string, serial_name: string) -> nil
* \endenglish
*/
int serialSendLine(const std::string &str,
const std::string &serial_name = "serial_0");
/**
* @ingroup Serial
* \chinese
*
* ASCII编码通过串口发送字符串<str>
*
* @param str
* @param serial_name
* @return
*
* @par Python函数原型
* serialSendString(self: pyaubo_sdk.Serial, arg0: str, arg1: str) -> int
*
* @par Lua函数原型
* serialSendString(str: string, serial_name: string) -> nil
* \endchinese
* \english
* Sends a string to the server
* Sends the string <str> through the serial in ASCII coding. Expects no
* response.
*
* @param str
* @param serial_name
* @return
*
* @par Python function prototype
* serialSendString(self: pyaubo_sdk.Serial, arg0: str, arg1: str) -> int
*
* @par Lua function prototype
* serialSendString(str: string, serial_name: string) -> nil
* \endenglish
*/
int serialSendString(const std::string &str,
const std::string &serial_name = "serial_0");
/**
* @ingroup Serial
* \chinese
*
* @param is_check
* @param str
* @param serial_name
* @return
*
* @par Python函数原型
* serialSendAllString(self: pyaubo_sdk.Serial, arg0: bool, arg1: List[str], arg2: str) -> int
*
* @par Lua函数原型
* serialSendAllString(is_check: boolean, str: table, serial_name: string) -> nil
* \endchinese
* \english
*
* @param is_check Whether to check
* @param str Array of strings
* @param serial_name Serial port name
* @return Return value
*
* @par Python function prototype
* serialSendAllString(self: pyaubo_sdk.Serial, arg0: bool, arg1: List[str], arg2: str) -> int
*
* @par Lua function prototype
* serialSendAllString(is_check: boolean, str: table, serial_name: string) -> nil
* \endenglish
*/
int serialSendAllString(bool is_check, const std::vector<char> &str,
const std::string &serial_name = "serial_0");
protected:
void *d_;
};
using SerialPtr = std::shared_ptr<Serial>;
} // namespace common_interface
} // namespace arcs
#endif

View File

@ -0,0 +1,667 @@
/** @file socket.h
* @brief socket通信
*/
#ifndef AUBO_SDK_SOCKET_INTERFACE_H
#define AUBO_SDK_SOCKET_INTERFACE_H
#include <vector>
#include <memory>
#include <aubo/type_def.h>
#include <aubo/global_config.h>
namespace arcs {
namespace common_interface {
/**
* \chinese
* @defgroup Socket Socket (socket网络通信)
*
* \endchinese
*
* \english
* @defgroup Socket Socket Network Communication
* Socket communication
* \endenglish
*/
class ARCS_ABI_EXPORT Socket
{
public:
Socket();
virtual ~Socket();
/**
* @ingroup Socket
* \english
* Open TCP/IP ethernet communication socket
*
* Instruction
*
* @param address
* @param port
* @param socket_name
* @return
*
* @par Python function prototype
* socketOpen(self: pyaubo_sdk.Socket, arg0: str, arg1: int, arg2: str) -> int
*
* @par Lua function prototype
* socketOpen(address: string, port: number, socket_name: string) -> nil
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"Socket.socketOpen","params":["172.16.26.248",8000,"socket_0"],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":0}
* \endenglish
* \chinese
* TCP/IP以太网通信socket
*
*
*
* @param address
* @param port
* @param socket_name
* @return
*
* @par Python函数原型
* socketOpen(self: pyaubo_sdk.Socket, arg0: str, arg1: int, arg2: str) -> int
*
* @par Lua函数原型
* socketOpen(address: string, port: number, socket_name: string) -> nil
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"Socket.socketOpen","params":["172.16.26.248",8000,"socket_0"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
* \endchinese
*/
int socketOpen(const std::string &address, int port,
const std::string &socket_name = "socket_0");
/**
* @ingroup Socket
* \english
* Closes TCP/IP socket communication
* Closes down the socket connection to the server.
*
* Instruction
*
* @param socket_name
* @return
*
* @par Python function prototype
* socketClose(self: pyaubo_sdk.Socket, arg0: str) -> int
*
* @par Lua function prototype
* socketClose(socket_name: string) -> nil
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"Socket.socketClose","params":["socket_0"],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":0}
* \endenglish
* \chinese
* TCP/IP socket
* socket
*
*
*
* @param socket_name
* @return
*
* @par Python函数原型
* socketClose(self: pyaubo_sdk.Socket, arg0: str) -> int
*
* @par Lua函数原型
* socketClose(socket_name: string) -> nil
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"Socket.socketClose","params":["socket_0"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
* \endchinese
*/
int socketClose(const std::string &socket_name = "socket_0");
/**
* @ingroup Socket
* \english
* Reads a number of ascii formatted floats from the socket. A maximum
* of 30 values can be read in one command.
* A list of numbers read (list of floats, length=number+1)
*
* Result will be stored in a register named reg_key. Use getFloatVec
* to retrieve data
*
* @param number
* @param variable
* @param socket_name
* @return
*
* @par Python function prototype
* socketReadAsciiFloat(self: pyaubo_sdk.Socket, arg0: int, arg1: str, arg2:
* str) -> int
*
* @par Lua function prototype
* socketReadAsciiFloat(number: number, variable: string, socket_name:
* string) -> number
* \endenglish
* \chinese
* socket读取指定数量的ASCII格式浮点数30
* =number+1
*
* reg_key的寄存器中使getFloatVec获取数据
*
* @param number
* @param variable
* @param socket_name
* @return
*
* @par Python函数原型
* socketReadAsciiFloat(self: pyaubo_sdk.Socket, arg0: int, arg1: str, arg2:
* str) -> int
*
* @par Lua函数原型
* socketReadAsciiFloat(number: number, variable: string, socket_name:
* string) -> number
* \endchinese
*/
int socketReadAsciiFloat(int number, const std::string &variable,
const std::string &socket_name = "socket_0");
/**
* @ingroup Socket
* \english
* Reads a number of 32 bit integers from the socket. Bytes are in
* network byte order. A maximum of 30 values can be read in one
* command.
* A list of numbers read (list of ints, length=number+1)
*
* Instruction
*
* std::vector<int>
*
* @param number
* @param variable
* @param socket_name
* @return
*
* @par Python function prototype
* socketReadBinaryInteger(self: pyaubo_sdk.Socket, arg0: int, arg1: str,
* arg2: str) -> int
*
* @par Lua function prototype
* socketReadBinaryInteger(number: number, variable: string, socket_name:
* string) -> number
* \endenglish
* \chinese
* socket读取指定数量的32位整数30
* =number+1
*
*
*
* std::vector<int>
*
* @param number
* @param variable
* @param socket_name
* @return
*
* @par Python函数原型
* socketReadBinaryInteger(self: pyaubo_sdk.Socket, arg0: int, arg1: str,
* arg2: str) -> int
*
* @par Lua函数原型
* socketReadBinaryInteger(number: number, variable: string, socket_name:
* string) -> number
* \endchinese
*/
int socketReadBinaryInteger(int number, const std::string &variable,
const std::string &socket_name = "socket_0");
/**
* @ingroup Socket
* \english
* Reads a number of bytes from the socket. Bytes are in network byte
* order. A maximum of 30 values can be read in one command.
* A list of numbers read (list of ints, length=number+1)
*
* Instruction
*
* std::vector<char>
*
* @param number
* @param variable
* @param socket_name
* @return
*
* @par Python function prototype
* socketReadByteList(self: pyaubo_sdk.Socket, arg0: int, arg1: str, arg2:
* str) -> int
*
* @par Lua function prototype
* socketReadByteList(number: number, variable: string, socket_name: string)
* -> number
* \endenglish
* \chinese
* socket读取指定数量的字节30
* =number+1
*
*
*
* std::vector<char>
*
* @param number
* @param variable
* @param socket_name
* @return
*
* @par Python函数原型
* socketReadByteList(self: pyaubo_sdk.Socket, arg0: int, arg1: str, arg2:
* str) -> int
*
* @par Lua函数原型
* socketReadByteList(number: number, variable: string, socket_name: string)
* -> number
* \endchinese
*/
int socketReadByteList(int number, const std::string &variable,
const std::string &socket_name = "socket_0");
/**
* @ingroup Socket
* \english
* Reads all data from the socket and returns the data as a string.
* Bytes are in network byte order.
*
* The optional parameters "prefix" and "suffix", can be used to express
* what is extracted from the socket. The "prefix" specifies the start
* of the substring (message) extracted from the socket. The data up to
* the end of the "prefix" will be ignored and removed from the socket.
* The "suffix" specifies the end of the substring (message) extracted
* from the socket. Any remaining data on the socket, after the "suffix",
* will be preserved. E.g. if the socket server sends a string
* "noise>hello<", the controller can receive the "hello" by calling this
* script function with the prefix=">" and suffix="<". By using the
* "prefix" and "suffix" it is also possible send multiple string to the
* controller at once, because the suffix defines where the message ends.
* E.g. sending ">hello<>world<"
*
* Instruction
*
* std::string
*
* @param variable
* @param socket_name
* @param prefix
* @param suffix
* @param interpret_escape
* @return
*
* @par Python function prototype
* socketReadString(self: pyaubo_sdk.Socket, arg0: str, arg1: str, arg2:
* str, arg3: str, arg4: bool) -> int
*
* @par Lua function prototype
* socketReadString(variable: string, socket_name: string, prefix: string,
* suffix: string, interpret_escape: boolean) -> number
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"Socket.socketReadString","params":["camera","socket_0","","",false],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":0}
* \endenglish
* \chinese
* socket读取所有数据并将其作为字符串返回
*
*
* "prefix""suffix"socket中提取的内容
* "prefix""prefix"socket中移除
* "suffix""suffix"socket中
* socket服务器发送字符串"noise>hello<"prefix=">"suffix="<""hello"
* 使"prefix""suffix""suffix"">hello<>world<"
*
*
*
* std::string
*
* @param variable
* @param socket_name
* @param prefix
* @param suffix
* @param interpret_escape
* @return
*
* @par Python函数原型
* socketReadString(self: pyaubo_sdk.Socket, arg0: str, arg1: str, arg2:
* str, arg3: str, arg4: bool) -> int
*
* @par Lua函数原型
* socketReadString(variable: string, socket_name: string, prefix: string,
* suffix: string, interpret_escape: boolean) -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"Socket.socketReadString","params":["camera","socket_0","","",false],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
* \endchinese
*/
int socketReadString(const std::string &variable,
const std::string &socket_name = "socket_0",
const std::string &prefix = "",
const std::string &suffix = "",
bool interpret_escape = false);
/**
* @ingroup Socket
* \english
* Reads all data from the socket and returns the data as a vector of chars.
*
* Instruction
* std::vector<char>
*
* @param variable
* @param socket_name
* @return
*
* @par Python function prototype
* socketReadAllString(self: pyaubo_sdk.Socket, arg0: str, arg1: str) -> int
*
* @par Lua function prototype
* socketReadAllString(variable: string, socket_name: string) -> number
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"Socket.socketReadAllString","params":["camera","socket_0"],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":0}
* \endenglish
* \chinese
* socket读取所有数据并将其作为char向量返回
*
*
* std::vector<char>
*
* @param variable
* @param socket_name
* @return
*
* @par Python函数原型
* socketReadAllString(self: pyaubo_sdk.Socket, arg0: str, arg1: str) -> int
*
* @par Lua函数原型
* socketReadAllString(variable: string, socket_name: string) -> number
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"Socket.socketReadAllString","params":["camera","socket_0"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
* \endchinese
*/
int socketReadAllString(const std::string &variable,
const std::string &socket_name = "socket_0");
/**
* @ingroup Socket
* \english
* Sends a byte to the server
* Sends the byte <value> through the socket. Expects no response. Can
* be used to send special ASCII characters; 10 is newline, 2 is start of
* text, 3 is end of text.
*
* Instruction
*
* @param value
* @param socket_name
* @return
*
* @par Python function prototype
* socketSendByte(self: pyaubo_sdk.Socket, arg0: str, arg1: str) -> int
*
* @par Lua function prototype
* socketSendByte(value: string, socket_name: string) -> nil
*
* \endenglish
* \chinese
*
* socket发送字节<value>ASCII字符1023
*
*
*
* @param value
* @param socket_name
* @return
*
* @par Python函数原型
* socketSendByte(self: pyaubo_sdk.Socket, arg0: str, arg1: str) -> int
*
* @par Lua函数原型
* socketSendByte(value: string, socket_name: string) -> nil
*
* \endchinese
*/
int socketSendByte(char value, const std::string &socket_name = "socket_0");
/**
* @ingroup Socket
* \english
* Sends an int (int32_t) to the server
* Sends the int <value> through the socket. Send in network byte order.
* Expects no response
*
* Instruction
*
* @param value
* @param socket_name
* @return
*
* @par Python function prototype
* socketSendInt(self: pyaubo_sdk.Socket, arg0: int, arg1: str) -> int
*
* @par Lua function prototype
* socketSendInt(value: number, socket_name: string) -> nil
*
* \endenglish
* \chinese
* intint32_t
* socket发送int <value>
*
*
*
* @param value
* @param socket_name
* @return
*
* @par Python函数原型
* socketSendInt(self: pyaubo_sdk.Socket, arg0: int, arg1: str) -> int
*
* @par Lua函数原型
* socketSendInt(value: number, socket_name: string) -> nil
*
* \endchinese
*/
int socketSendInt(int value, const std::string &socket_name = "socket_0");
/**
* @ingroup Socket
* \english
* Sends a string with a newline character to the server
* Sends the string <str> through the socket in ASCII coding. Expects no
* response.
*
* Instruction
*
* @param str
* @param socket_name
* @return
*
* @par Python function prototype
* socketSendLine(self: pyaubo_sdk.Socket, arg0: str, arg1: str) -> int
*
* @par Lua function prototype
* socketSendLine(str: string, socket_name: string) -> nil
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"Socket.socketSendLine","params":["abcd","socket_0"],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":0}
* \endenglish
* \chinese
* .
* socket以ASCII编码发送字符串<str>
*
*
*
* @param str
* @param socket_name
* @return
*
* @par Python函数原型
* socketSendLine(self: pyaubo_sdk.Socket, arg0: str, arg1: str) -> int
*
* @par Lua函数原型
* socketSendLine(str: string, socket_name: string) -> nil
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"Socket.socketSendLine","params":["abcd","socket_0"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
* \endchinese
*/
int socketSendLine(const std::string &str,
const std::string &socket_name = "socket_0");
/**
* @ingroup Socket
* \english
* Sends a string to the server
* Sends the string <str> through the socket in ASCII coding. Expects no
* response.
*
* Instruction
*
* @param str
* @param socket_name
* @return
*
* @par Python function prototype
* socketSendString(self: pyaubo_sdk.Socket, arg0: str, arg1: str) -> int
*
* @par Lua function prototype
* socketSendString(str: string, socket_name: string) -> nil
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"Socket.socketSendString","params":["abcd","socket_0"],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":0}
* \endenglish
* \chinese
*
* socket以ASCII编码发送字符串<str>
*
*
*
* @param str
* @param socket_name
* @return
*
* @par Python函数原型
* socketSendString(self: pyaubo_sdk.Socket, arg0: str, arg1: str) -> int
*
* @par Lua函数原型
* socketSendString(str: string, socket_name: string) -> nil
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"Socket.socketSendString","params":["abcd","socket_0"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
* \endchinese
*/
int socketSendString(const std::string &str,
const std::string &socket_name = "socket_0");
/**
* @ingroup Socket
* \english
* Sends all data in the given vector of chars to the server.
*
* @param is_check Whether to check the sending status
* @param str The data to send as a vector of chars
* @param socket_name The name of the socket
* @return Status code
*
* @par Python function prototype
* socketSendAllString(self: pyaubo_sdk.Socket, arg0: bool, arg1: List[str], arg2: str) -> int
*
* @par Lua function prototype
* socketSendAllString(is_check: boolean, str: table, socket_name: string) -> nil
* \endenglish
* \chinese
* char向量中的所有数据到服务器
*
* @param is_check
* @param str char向量
* @param socket_name
* @return
*
* @par Python函数原型
* socketSendAllString(self: pyaubo_sdk.Socket, arg0: bool, arg1: List[str], arg2: str) -> int
*
* @par Lua函数原型
* socketSendAllString(is_check: boolean, str: table, socket_name: string) -> nil
* \endchinese
*/
int socketSendAllString(bool is_check, const std::vector<char> &str,
const std::string &socket_name = "socket_0");
/**
* @ingroup Socket
* \english
* Check if the socket is connected
* @brief socketHasConnected
* @param socket_name
*
* @return
*
* @par Python function prototype
* socketHasConnected(self: pyaubo_sdk.Socket, arg0: str) -> bool
*
* @par Lua function prototype
* socketHasConnected(socket_name: string) -> boolean
* \endenglish
* \chinese
* socket
* @brief socketHasConnected
* @param socket_name
*
* @return
*
* @par Python函数原型
* socketHasConnected(self: pyaubo_sdk.Socket, arg0: str) -> bool
*
* @par Lua函数原型
* socketHasConnected(socket_name: string) -> boolean
* \endchinese
*/
bool socketHasConnected(const std::string &socket_name = "socket_0");
protected:
void *d_;
};
using SocketPtr = std::shared_ptr<Socket>;
} // namespace common_interface
} // namespace arcs
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,359 @@
/** @file system_info.h
* @brief
*/
#ifndef AUBO_SDK_SYSTEM_INFO_INTERFACE_H
#define AUBO_SDK_SYSTEM_INFO_INTERFACE_H
#include <stdint.h>
#include <string>
#include <memory>
#include <aubo/global_config.h>
namespace arcs {
namespace common_interface {
/**
* \chinese
* @defgroup SystemInfo SystemInfo ()
*
* \endchinese
*
* \english
* @defgroup SystemInfo System Information
* System Information
* \endenglish
*/
class ARCS_ABI_EXPORT SystemInfo
{
public:
SystemInfo();
virtual ~SystemInfo();
/**
* @ingroup SystemInfo
* \chinese
*
*
* @return
*
* @par Python函数原型
* getControlSoftwareVersionCode(self: pyaubo_sdk.SystemInfo) -> int
*
* @par Lua函数原型
* getControlSoftwareVersionCode() -> number
*
* @par C++
* @code
* int control_version =
* rpc_cli->getSystemInfo()->getControlSoftwareVersionCode();
* @endcode
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionCode","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":28003}
*
* \endchinese
* \english
* Get the controller software version code
*
* @return Returns the controller software version code
*
* @par Python prototype
* getControlSoftwareVersionCode(self: pyaubo_sdk.SystemInfo) -> int
*
* @par Lua prototype
* getControlSoftwareVersionCode() -> number
*
* @par C++ example
* @code
* int control_version =
* rpc_cli->getSystemInfo()->getControlSoftwareVersionCode();
* @endcode
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionCode","params":[],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":28003}
*
* \endenglish
*/
int getControlSoftwareVersionCode();
/**
* @ingroup SystemInfo
* \chinese
*
*
* @return
*
* @par Python函数原型
* getControlSoftwareFullVersion(self: pyaubo_sdk.SystemInfo) -> str
*
* @par Lua函数原型
* getControlSoftwareFullVersion() -> string
*
* @par C++
* @code
* std::string control_version =
* rpc_cli->getSystemInfo()->getControlSoftwareFullVersion();
* @endcode
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareFullVersion","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":"0.31.0-alpha.16+20alc76"}
*
* \endchinese
* \english
* Get the full controller software version
*
* @return Returns the full controller software version
*
* @par Python prototype
* getControlSoftwareFullVersion(self: pyaubo_sdk.SystemInfo) -> str
*
* @par Lua prototype
* getControlSoftwareFullVersion() -> string
*
* @par C++ example
* @code
* std::string control_version =
* rpc_cli->getSystemInfo()->getControlSoftwareFullVersion();
* @endcode
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareFullVersion","params":[],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":"0.31.0-alpha.16+20alc76"}
*
* \endenglish
*/
std::string getControlSoftwareFullVersion();
/**
* @ingroup SystemInfo
* \chinese
*
*
* @return
*
* @par Python函数原型
* getInterfaceVersionCode(self: pyaubo_sdk.SystemInfo) -> int
*
* @par Lua函数原型
* getInterfaceVersionCode() -> number
*
* @par C++
* @code
* int interface_version =
* rpc_cli->getSystemInfo()->getInterfaceVersionCode();
* @endcode
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"SystemInfo.getInterfaceVersionCode","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":22003}
*
* \endchinese
* \english
* Get the interface version code
*
* @return Returns the interface version code
*
* @par Python prototype
* getInterfaceVersionCode(self: pyaubo_sdk.SystemInfo) -> int
*
* @par Lua prototype
* getInterfaceVersionCode() -> number
*
* @par C++ example
* @code
* int interface_version =
* rpc_cli->getSystemInfo()->getInterfaceVersionCode();
* @endcode
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"SystemInfo.getInterfaceVersionCode","params":[],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":22003}
*
* \endenglish
*/
int getInterfaceVersionCode();
/**
* @ingroup SystemInfo
* \chinese
*
*
* @return
*
* @par Python函数原型
* getControlSoftwareBuildDate(self: pyaubo_sdk.SystemInfo) -> str
*
* @par Lua函数原型
* getControlSoftwareBuildDate() -> string
*
* @par C++
* @code
* std::string build_date =
* rpc_cli->getSystemInfo()->getControlSoftwareBuildDate();
* @endcode
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareBuildDate","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":"2024-3-5 07:03:20"}
*
* \endchinese
* \english
* Get the controller software build date
*
* @return Returns the controller software build date
*
* @par Python prototype
* getControlSoftwareBuildDate(self: pyaubo_sdk.SystemInfo) -> str
*
* @par Lua prototype
* getControlSoftwareBuildDate() -> string
*
* @par C++ example
* @code
* std::string build_date =
* rpc_cli->getSystemInfo()->getControlSoftwareBuildDate();
* @endcode
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareBuildDate","params":[],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":"2024-3-5 07:03:20"}
*
* \endenglish
*/
std::string getControlSoftwareBuildDate();
/**
* @ingroup SystemInfo
* \chinese
* git版本
*
* @return git版本
*
* @par Python函数原型
* getControlSoftwareVersionHash(self: pyaubo_sdk.SystemInfo) -> str
*
* @par Lua函数原型
* getControlSoftwareVersionHash() -> string
*
* @par C++
* @code
* std::string git_version =
* rpc_cli->getSystemInfo()->getControlSoftwareVersionHash();
* @endcode
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionHash","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":"fa4f64a"}
*
* \endchinese
* \english
* Get the controller software git version
*
* @return Returns the controller software git version
*
* @par Python prototype
* getControlSoftwareVersionHash(self: pyaubo_sdk.SystemInfo) -> str
*
* @par Lua prototype
* getControlSoftwareVersionHash() -> string
*
* @par C++ example
* @code
* std::string git_version =
* rpc_cli->getSystemInfo()->getControlSoftwareVersionHash();
* @endcode
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionHash","params":[],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":"fa4f64a"}
*
* \endenglish
*/
std::string getControlSoftwareVersionHash();
/**
* @ingroup SystemInfo
* \chinese
* ( ns )
*
* @return ( ns )
*
* @par Python函数原型
* getControlSystemTime(self: pyaubo_sdk.SystemInfo) -> int
*
* @par Lua函数原型
* getControlSystemTime() -> number
*
* @par C++
* @code
* std::string system_time =
* rpc_cli->getSystemInfo()->getControlSystemTime();
* @endcode
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSystemTime","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":9287799079682}
*
* \endchinese
* \english
* Get the system time (software start time in nanoseconds)
*
* @return Returns the system time (software start time in nanoseconds)
*
* @par Python prototype
* getControlSystemTime(self: pyaubo_sdk.SystemInfo) -> int
*
* @par Lua prototype
* getControlSystemTime() -> number
*
* @par C++ example
* @code
* std::string system_time =
* rpc_cli->getSystemInfo()->getControlSystemTime();
* @endcode
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"SystemInfo.getControlSystemTime","params":[],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":9287799079682}
*
* \endenglish
*/
uint64_t getControlSystemTime();
protected:
void *d_;
};
using SystemInfoPtr = std::shared_ptr<SystemInfo>;
} // namespace common_interface
} // namespace arcs
#endif

View File

@ -0,0 +1,243 @@
/** @file trace.h
* \~chinese @brief \~english @brief Interface for injecting logs into the controller's logging system
*/
#ifndef AUBO_SDK_TRACE_INTERFACE_H
#define AUBO_SDK_TRACE_INTERFACE_H
#include <string>
#include <vector>
#include <memory>
#include <sstream>
#include <aubo/global_config.h>
#include <aubo/type_def.h>
namespace arcs {
namespace common_interface {
/**
* \chinese
* @defgroup Trace Trace ()
*
* \endchinese
*
* \english
* @defgroup Trace Log and Pop-up
* Log recording system for controller extension programs
* \endenglish
*/
class ARCS_ABI_EXPORT Trace
{
public:
Trace();
virtual ~Trace();
/**
* @ingroup Trace
* \~chinese aubo_control \~english Injects alarm information into the aubo_control log
*
* TraceLevel: \n
* 0 - FATAL \n
* 1 - ERROR \n
* 2 - WARNING \n
* 3 - INFO \n
* 4 - DEBUG \n
*
* \~chinese code定义参考 error_stack \~english Code definitions refer to error_stack
*
* @param level
* @param code
* @param args
* @return
*
* \~chinese @par Python函数原型 \~english @par Python function prototype
* alarm(self: pyaubo_sdk.Trace, arg0: arcs::common_interface::TraceLevel,
* arg1: int, arg2: List[str]) -> int
*
* \~chinese @par Lua函数原型 \~english @par Lua function prototype
* alarm(level: number, code: number, args: table) -> nil
*
* \~chinese @par JSON-RPC请求示例 \~english @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"rob1.Trace.alarm","params":["",1,["Error","Trajectory
* planning failed!","1"]],"id":1}
*
* \~chinese @par JSON-RPC响应示例 \~engish @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":0}
*
*/
int alarm(TraceLevel level, int code,
const std::vector<std::string> &args = {});
/**
* @ingroup Trace
* \chinese
*
*
* @param msg
* @return
*
* @par Python函数原型
* textmsg(self: pyaubo_sdk.Trace, arg0: str) -> int
*
* @par Lua函数原型
* textmsg(msg: string) -> nil
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"rob1.Trace.textmsg","params":["test"],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
* \endchinese
* \english
* print message into log
*
* @param msg message information
* @return
*
* @par Python function prototype
* textmsg(self: pyaubo_sdk.Trace, arg0: str) -> int
*
* @par Lua function prototype
* textmsg(msg: string) -> nil
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"rob1.Trace.textmsg","params":["test"],"id":1}
*
* @par JSON-RPC responose example
* {"id":1,"jsonrpc":"2.0","result":0}
* \endenglish
*/
int textmsg(const std::string &msg);
/**
* \~chinese \~english Notify the system
*
* @param msg
* @return
*/
int notify(const std::string &msg);
/**
* @ingroup Trace
* \chinese
* RTDE
*
* @param level
* @param title
* @param msg
* @param mode \n
* 0: \n
* 1: \n
* 2: bool \n
* 3: int \n
* 4: double \n
* 5: string \n
* @return
*
* @par Python函数原型
* popup(self: pyaubo_sdk.Trace, arg0: arcs::common_interface::TraceLevel,
* arg1: str, arg2: str, arg3: int) -> int
*
* @par Lua函数原型
* popup(level: number, title: string, msg: string, mode: number) -> nil
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"rob1.Trace.popup","params":["","Error","Trajectory
* planning failed!",1],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":0}
* \endchinese
* \english
* Send a popup request to the connected RTDE client
*
* @param level
* @param title
* @param msg
* @param mode mode \n
* 0: normal mode \n
* 1: blocking mode \n
* 2: input mode bool \n
* 3: input mode int \n
* 4: input mode double \n
* 5: input mode string \n
* @return
*
* @par Python function prototype
* popup(self: pyaubo_sdk.Trace, arg0: arcs::common_interface::TraceLevel,
* arg1: str, arg2: str, arg3: int) -> int
*
* @par Lua function prototype
* popup(level: number, title: string, msg: string, mode: number) -> nil
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"rob1.Trace.popup","params":["","Error","Trajectory
* planning failed!",1],"id":1}
*
* @par JSON-RPC response example
* {"id":1,"jsonrpc":"2.0","result":0}
* \endenglish
*/
int popup(TraceLevel level, const std::string &title,
const std::string &msg, int mode);
/**
* @ingroup Trace
* \chinese
* peek最新的 AlarmInfo()
*
* last_time设置为0时AlarmInfo
*
* @param num
* @param last_time
* @return
*
* @par Python函数原型
* peek(self: pyaubo_sdk.Trace, arg0: int, arg1: int) ->
* List[arcs::common_interface::RobotMsg]
*
* @par Lua函数原型
* peek(num: number, last_time: number) -> table
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"rob1.Trace.peek","params":[1,0],"id":1}
*
* @par JSON-RPC响应示例
* {{"id":1,"jsonrpc":"2.0","result":[{"args":["RobotModeType.Running"],
* "code":30045,"level":"INFO","source":"rob1","timestamp":5102883064300}]}
* \endchinese
* \english
* peek the latest AlarmInfo (after the last retrieval)
*
* When last_time is set as 0, retrieve all AlarmInfo
*
* @param num
* @param last_time
* @return
*
* @par Python function prototype
* peek(self: pyaubo_sdk.Trace, arg0: int, arg1: int) ->
* List[arcs::common_interface::RobotMsg]
*
* @par Lua function prototype
* peek(num: number, last_time: number) -> table
*
* @par JSON-RPC request example
* {"jsonrpc":"2.0","method":"rob1.Trace.peek","params":[1,0],"id":1}
*
* @par JSON-RPC response example
* {{"id":1,"jsonrpc":"2.0","result":[{"args":["RobotModeType.Running"],
* "code":30045,"level":"INFO","source":"rob1","timestamp":5102883064300}]}
* \endenglish
*/
RobotMsgVector peek(size_t num, uint64_t last_time = 0);
protected:
void *d_;
};
using TracePtr = std::shared_ptr<Trace>;
} // namespace common_interface
} // namespace arcs
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,53 @@
#ifndef AUBO_SDK_Math_C_H
#define AUBO_SDK_Math_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI int poseAdd(MATH_HANDLER h, const double *p1, const double *p2,
double *result);
ARCS_ABI int poseSub(MATH_HANDLER h, const double *p1, const double *p2,
double *result);
ARCS_ABI int interpolatePose(MATH_HANDLER h, const double *p1, const double *p2,
double alpha, double *result);
ARCS_ABI int poseTrans(MATH_HANDLER h, const double *pose_from,
const double *pose_from_to, double *result);
ARCS_ABI int poseTransInv(MATH_HANDLER h, const double *pose_from,
const double *pose_to_from, double *result);
ARCS_ABI int poseInverse(MATH_HANDLER h, const double *pose, double *result);
ARCS_ABI double poseDistance(MATH_HANDLER h, const double *p1,
const double *p2);
ARCS_ABI double poseAngleDistance(MATH_HANDLER h, const double *p1,
const double *p2);
ARCS_ABI BOOL poseEqual(MATH_HANDLER h, const double *p1, const double *p2,
double eps);
ARCS_ABI int transferRefFrame(MATH_HANDLER h, const double *F_b_a_old,
Vector3d_C V_in_a, int type, double *result);
ARCS_ABI int poseRotation(MATH_HANDLER h, const double *pose,
const double *rotv, double *result);
ARCS_ABI int rpyToQuaternion(MATH_HANDLER h, const double *rpy, double *result);
ARCS_ABI int quaternionToRpy(MATH_HANDLER h, const double *quant,
double *result);
ARCS_ABI int tcpOffsetIdentify(MATH_HANDLER h, const double *poses, int rows,
double *result);
ARCS_ABI int calibrateCoordinate(MATH_HANDLER h, const double *poses, int rows,
int type, double *result);
ARCS_ABI int calculateCircleFourthPoint(MATH_HANDLER h, const double *p1,
const double *p2, const double *p3,
int mode, double *result);
ARCS_ABI int forceTrans(MATH_HANDLER h, const double *pose_a_in_b,
const double *force_in_a, double *result);
ARCS_ABI int getDeltaPoseBySensorDistance(MATH_HANDLER h,
const double *distances,
double position, double radius,
double track_scale, double *result);
ARCS_ABI int deltaPoseTrans(MATH_HANDLER h, const double *pose_a_in_b,
const double *ft_in_a, double *result);
ARCS_ABI int deltaPoseAdd(MATH_HANDLER h, const double *pose_a_in_b,
const double *v_in_b, double *result);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,120 @@
#ifndef AUBO_SDK_RegisterControl_C_H
#define AUBO_SDK_RegisterControl_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI BOOL getBoolInput(REGISTER_CONTROL_HANDLER h, uint32_t address);
ARCS_ABI int setBoolInput(REGISTER_CONTROL_HANDLER h, uint32_t address,
BOOL value);
ARCS_ABI int getInt32Input(REGISTER_CONTROL_HANDLER h, uint32_t address);
ARCS_ABI int setInt32Input(REGISTER_CONTROL_HANDLER h, uint32_t address,
int value);
ARCS_ABI float getFloatInput(REGISTER_CONTROL_HANDLER h, uint32_t address);
ARCS_ABI int setFloatInput(REGISTER_CONTROL_HANDLER h, uint32_t address,
float value);
ARCS_ABI double getDoubleInput(REGISTER_CONTROL_HANDLER h, uint32_t address);
ARCS_ABI int setDoubleInput(REGISTER_CONTROL_HANDLER h, uint32_t address,
double value);
ARCS_ABI BOOL getBoolOutput(REGISTER_CONTROL_HANDLER h, uint32_t address);
ARCS_ABI int setBoolOutput(REGISTER_CONTROL_HANDLER h, uint32_t address,
BOOL value);
ARCS_ABI int getInt32Output(REGISTER_CONTROL_HANDLER h, uint32_t address);
ARCS_ABI int setInt32Output(REGISTER_CONTROL_HANDLER h, uint32_t address,
int value);
ARCS_ABI float getFloatOutput(REGISTER_CONTROL_HANDLER h, uint32_t address);
ARCS_ABI int setFloatOutput(REGISTER_CONTROL_HANDLER h, uint32_t address,
float value);
ARCS_ABI double getDoubleOutput(REGISTER_CONTROL_HANDLER h, uint32_t address);
ARCS_ABI int setDoubleOutput(REGISTER_CONTROL_HANDLER h, uint32_t address,
double value);
ARCS_ABI int16_t getInt16Register(REGISTER_CONTROL_HANDLER h, uint32_t address);
ARCS_ABI int setInt16Register(REGISTER_CONTROL_HANDLER h, uint32_t address,
int16_t value);
ARCS_ABI BOOL variableUpdated(REGISTER_CONTROL_HANDLER h, const char *key,
uint64_t since);
ARCS_ABI BOOL hasNamedVariable(REGISTER_CONTROL_HANDLER h, const char *key);
ARCS_ABI int getNamedVariableType(REGISTER_CONTROL_HANDLER h, const char *key,
char *result);
ARCS_ABI BOOL getBool(REGISTER_CONTROL_HANDLER h, const char *key,
BOOL default_value);
ARCS_ABI int setBool(REGISTER_CONTROL_HANDLER h, const char *key, BOOL value);
ARCS_ABI int getVecChar(REGISTER_CONTROL_HANDLER h, const char *key,
const char *default_value, char *result, int sz);
ARCS_ABI int setVecChar(REGISTER_CONTROL_HANDLER h, const char *key,
const char *value, int sz);
ARCS_ABI int getInt32(REGISTER_CONTROL_HANDLER h, const char *key,
int default_value);
ARCS_ABI int setInt32(REGISTER_CONTROL_HANDLER h, const char *key, int value);
ARCS_ABI int getVecInt32(REGISTER_CONTROL_HANDLER h, const char *key,
int32_t *default_value, int *result);
ARCS_ABI int setVecInt32(REGISTER_CONTROL_HANDLER h, const char *key,
int32_t *value);
ARCS_ABI float getFloat(REGISTER_CONTROL_HANDLER h, const char *key,
float default_value);
ARCS_ABI int setFloat(REGISTER_CONTROL_HANDLER h, const char *key, float value);
ARCS_ABI int getVecFloat(REGISTER_CONTROL_HANDLER h, const char *key,
const float *default_value, float *result);
ARCS_ABI int setVecFloat(REGISTER_CONTROL_HANDLER h, const char *key,
const float *value);
ARCS_ABI double getDouble(REGISTER_CONTROL_HANDLER h, const char *key,
double default_value);
ARCS_ABI int setDouble(REGISTER_CONTROL_HANDLER h, const char *key,
double value);
ARCS_ABI int getVecDouble(REGISTER_CONTROL_HANDLER h, const char *key,
const double *default_value, double *result);
ARCS_ABI int setVecDouble(REGISTER_CONTROL_HANDLER h, const char *key,
const double *value);
ARCS_ABI int getString(REGISTER_CONTROL_HANDLER h, const char *key,
const char *default_value, char *result);
ARCS_ABI int setString(REGISTER_CONTROL_HANDLER h, const char *key,
const char *value);
ARCS_ABI int clearNamedVariable(REGISTER_CONTROL_HANDLER h, const char *key);
ARCS_ABI int setWatchDog(REGISTER_CONTROL_HANDLER h, const char *key,
double timeout, int action);
ARCS_ABI int getWatchDogAction(REGISTER_CONTROL_HANDLER h, const char *key);
ARCS_ABI int getWatchDogTimeout(REGISTER_CONTROL_HANDLER h, const char *key);
ARCS_ABI int modbusAddSignal(REGISTER_CONTROL_HANDLER h,
const char *device_info, int slave_number,
int signal_address, int signal_type,
const char *signal_name, BOOL sequential_mode);
ARCS_ABI int modbusDeleteSignal(REGISTER_CONTROL_HANDLER h,
const char *signal_name);
ARCS_ABI int modbusDeleteAllSignals(REGISTER_CONTROL_HANDLER h);
ARCS_ABI int modbusGetSignalStatus(REGISTER_CONTROL_HANDLER h,
const char *signal_name);
ARCS_ABI int modbusGetSignalNames(REGISTER_CONTROL_HANDLER h, char **result);
ARCS_ABI int modbusGetSignalTypes(REGISTER_CONTROL_HANDLER h, int *result);
ARCS_ABI int modbusGetSignalValues(REGISTER_CONTROL_HANDLER h, int *result);
ARCS_ABI int modbusGetSignalErrors(REGISTER_CONTROL_HANDLER h, int *result);
ARCS_ABI int modbusSendCustomCommand(REGISTER_CONTROL_HANDLER h, const char *IP,
int slave_number, int function_code,
uint8_t *data, int sz);
ARCS_ABI int modbusSetDigitalInputAction(REGISTER_CONTROL_HANDLER h,
const char *robot_name,
const char *signal_name,
StandardInputAction_C action);
ARCS_ABI int modbusSetOutputRunstate(REGISTER_CONTROL_HANDLER h,
const char *robot_name,
const char *signal_name,
StandardOutputRunState_C runstate);
ARCS_ABI int modbusSetOutputSignal(REGISTER_CONTROL_HANDLER h,
const char *signal_name, uint16_t value);
ARCS_ABI int modbusSetOutputSignalPulse(REGISTER_CONTROL_HANDLER h,
const char *signal_name, uint16_t value,
double duration);
ARCS_ABI int modbusSetSignalUpdateFrequency(REGISTER_CONTROL_HANDLER h,
const char *signal_name,
int update_frequency);
ARCS_ABI int modbusGetSignalIndex(REGISTER_CONTROL_HANDLER h,
const char *signal_name);
ARCS_ABI int modbusGetSignalError(REGISTER_CONTROL_HANDLER h,
const char *signal_name);
ARCS_ABI int getModbusDeviceStatus(REGISTER_CONTROL_HANDLER h,
const char *device_name);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,78 @@
#ifndef AUBO_SDK_ForceControl_C_H
#define AUBO_SDK_ForceControl_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI int fcEnable(FORCE_CONTROL_HANDLER h);
ARCS_ABI int fcDisable(FORCE_CONTROL_HANDLER h);
ARCS_ABI BOOL isFcEnabled(FORCE_CONTROL_HANDLER h);
ARCS_ABI int setTargetForce(FORCE_CONTROL_HANDLER h, const double *feature,
const uint8_t *compliance, const double *wrench,
const double *limits, TaskFrameType_C type);
ARCS_ABI int setDynamicModel(FORCE_CONTROL_HANDLER h, const double *m,
const double *d, const double *k);
ARCS_ABI DynamicsModel_C getDynamicModel(FORCE_CONTROL_HANDLER h);
ARCS_ABI int setDynamicModelContact(FORCE_CONTROL_HANDLER h,
const double *env_stiff,
const double *damp_scale,
const double *stiff_scale);
ARCS_ABI int setCondForce(FORCE_CONTROL_HANDLER h, const double *min,
const double *max, BOOL outside, double timeout);
ARCS_ABI int setCondOrient(FORCE_CONTROL_HANDLER h, const double *frame,
double max_angle, double max_rot, BOOL outside,
double timeout);
ARCS_ABI int setCondPlane(FORCE_CONTROL_HANDLER h, const double *plane,
double timeout);
ARCS_ABI int setCondCylinder(FORCE_CONTROL_HANDLER h, const double *axis,
double radius, BOOL outside, double timeout);
ARCS_ABI int setCondSphere(FORCE_CONTROL_HANDLER h, const double *center,
double radius, BOOL outside, double timeout);
ARCS_ABI int setCondTcpSpeed(FORCE_CONTROL_HANDLER h, const double *min,
const double *max, BOOL outside, double timeout);
ARCS_ABI int setCondActive(FORCE_CONTROL_HANDLER h);
ARCS_ABI int setCondDistance(FORCE_CONTROL_HANDLER h, double distance,
double timeout);
ARCS_ABI int setCondAdvanced(FORCE_CONTROL_HANDLER h, const char *type,
const double *args, double timeout);
ARCS_ABI BOOL isCondFullfiled(FORCE_CONTROL_HANDLER h);
ARCS_ABI int setSupvForce(FORCE_CONTROL_HANDLER h, const double *min,
const double *max);
ARCS_ABI int setSupvOrient(FORCE_CONTROL_HANDLER h, const double *frame,
double max_angle, double max_rot, BOOL outside);
ARCS_ABI int setSupvPosBox(FORCE_CONTROL_HANDLER h, const double *frame,
const double *box);
ARCS_ABI int setSupvPosCylinder(FORCE_CONTROL_HANDLER h, const double *frame,
const double *cylinder);
ARCS_ABI int setSupvPosSphere(FORCE_CONTROL_HANDLER h, const double *frame,
const double *sphere);
ARCS_ABI int setSupvReoriSpeed(FORCE_CONTROL_HANDLER h,
const double *speed_limit, BOOL outside,
double timeout);
ARCS_ABI int setSupvTcpSpeed(FORCE_CONTROL_HANDLER h, const double *speed_limit,
BOOL outside, double timeout);
ARCS_ABI int setLpFilter(FORCE_CONTROL_HANDLER h, const double *cutoff_freq);
ARCS_ABI int resetLpFilter(FORCE_CONTROL_HANDLER h);
ARCS_ABI int speedChangeTune(FORCE_CONTROL_HANDLER h, int speed_levels,
double speed_ratio_min);
ARCS_ABI int speedChangeEnable(FORCE_CONTROL_HANDLER h, double ref_force);
ARCS_ABI int speedChangeDisable(FORCE_CONTROL_HANDLER h);
ARCS_ABI int setDamping(FORCE_CONTROL_HANDLER h, const double *damping,
double ramp_time);
ARCS_ABI int resetDamping(FORCE_CONTROL_HANDLER h);
ARCS_ABI int softFloatEnable(FORCE_CONTROL_HANDLER h);
ARCS_ABI int softFloatDisable(FORCE_CONTROL_HANDLER h);
ARCS_ABI BOOL isSoftFloatEnabled(FORCE_CONTROL_HANDLER h);
ARCS_ABI int setSoftFloatParams(FORCE_CONTROL_HANDLER h, BOOL joint_space,
const uint8_t *select,
const double *stiff_percent,
const double *stiff_damp_ratio,
const double *force_threshold,
const double *force_limit);
ARCS_ABI int toolContact(FORCE_CONTROL_HANDLER h, const uint8_t *direction);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,113 @@
#ifndef AUBO_SDK_IoControl_C_H
#define AUBO_SDK_IoControl_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI int getStandardDigitalInputNum(IO_CONTROL_HANDLER h);
ARCS_ABI int getToolDigitalInputNum(IO_CONTROL_HANDLER h);
ARCS_ABI int getConfigurableDigitalInputNum(IO_CONTROL_HANDLER h);
ARCS_ABI int getStandardDigitalOutputNum(IO_CONTROL_HANDLER h);
ARCS_ABI int getToolDigitalOutputNum(IO_CONTROL_HANDLER h);
ARCS_ABI int setToolIoInput(IO_CONTROL_HANDLER h, int index, BOOL input);
ARCS_ABI BOOL isToolIoInput(IO_CONTROL_HANDLER h, int index);
ARCS_ABI int getConfigurableDigitalOutputNum(IO_CONTROL_HANDLER h);
ARCS_ABI int getStandardAnalogInputNum(IO_CONTROL_HANDLER h);
ARCS_ABI int getToolAnalogInputNum(IO_CONTROL_HANDLER h);
ARCS_ABI int getStandardAnalogOutputNum(IO_CONTROL_HANDLER h);
ARCS_ABI int getToolAnalogOutputNum(IO_CONTROL_HANDLER h);
ARCS_ABI int setDigitalInputActionDefault(IO_CONTROL_HANDLER h);
ARCS_ABI int setStandardDigitalInputAction(IO_CONTROL_HANDLER h, int index,
StandardInputAction_C action);
ARCS_ABI int setToolDigitalInputAction(IO_CONTROL_HANDLER h, int index,
StandardInputAction_C action);
ARCS_ABI int setConfigurableDigitalInputAction(IO_CONTROL_HANDLER h, int index,
StandardInputAction_C action);
ARCS_ABI StandardInputAction_C
getStandardDigitalInputAction(IO_CONTROL_HANDLER h, int index);
ARCS_ABI StandardInputAction_C getToolDigitalInputAction(IO_CONTROL_HANDLER h,
int index);
ARCS_ABI StandardInputAction_C
getConfigurableDigitalInputAction(IO_CONTROL_HANDLER h, int index);
ARCS_ABI int setDigitalOutputRunstateDefault(IO_CONTROL_HANDLER h);
ARCS_ABI int setStandardDigitalOutputRunstate(
IO_CONTROL_HANDLER h, int index, StandardOutputRunState_C runstate);
ARCS_ABI int setToolDigitalOutputRunstate(IO_CONTROL_HANDLER h, int index,
StandardOutputRunState_C runstate);
ARCS_ABI int setConfigurableDigitalOutputRunstate(
IO_CONTROL_HANDLER h, int index, StandardOutputRunState_C runstate);
ARCS_ABI StandardOutputRunState_C
getStandardDigitalOutputRunstate(IO_CONTROL_HANDLER h, int index);
ARCS_ABI StandardOutputRunState_C
getToolDigitalOutputRunstate(IO_CONTROL_HANDLER h, int index);
ARCS_ABI StandardOutputRunState_C
getConfigurableDigitalOutputRunstate(IO_CONTROL_HANDLER h, int index);
ARCS_ABI int setStandardAnalogOutputRunstate(IO_CONTROL_HANDLER h, int index,
StandardOutputRunState_C runstate);
ARCS_ABI int setToolAnalogOutputRunstate(IO_CONTROL_HANDLER h, int index,
StandardOutputRunState_C runstate);
ARCS_ABI StandardOutputRunState_C
getStandardAnalogOutputRunstate(IO_CONTROL_HANDLER h, int index);
ARCS_ABI StandardOutputRunState_C
getToolAnalogOutputRunstate(IO_CONTROL_HANDLER h, int index);
ARCS_ABI int setStandardAnalogInputDomain(IO_CONTROL_HANDLER h, int index,
int domain);
ARCS_ABI int setToolAnalogInputDomain(IO_CONTROL_HANDLER h, int index,
int domain);
ARCS_ABI int getStandardAnalogInputDomain(IO_CONTROL_HANDLER h, int index);
ARCS_ABI int getToolAnalogInputDomain(IO_CONTROL_HANDLER h, int index);
ARCS_ABI int setStandardAnalogOutputDomain(IO_CONTROL_HANDLER h, int index,
int domain);
ARCS_ABI int setToolAnalogOutputDomain(IO_CONTROL_HANDLER h, int index,
int domain);
ARCS_ABI int setToolVoltageOutputDomain(IO_CONTROL_HANDLER h, int domain);
ARCS_ABI int getToolVoltageOutputDomain(IO_CONTROL_HANDLER h);
ARCS_ABI int getStandardAnalogOutputDomain(IO_CONTROL_HANDLER h, int index);
ARCS_ABI int getToolAnalogOutputDomain(IO_CONTROL_HANDLER h, int index);
ARCS_ABI int setStandardDigitalOutput(IO_CONTROL_HANDLER h, int index,
BOOL value);
ARCS_ABI int setStandardDigitalOutputPulse(IO_CONTROL_HANDLER h, int index,
BOOL value, double duration);
ARCS_ABI int setToolDigitalOutput(IO_CONTROL_HANDLER h, int index, BOOL value);
ARCS_ABI int setToolDigitalOutputPulse(IO_CONTROL_HANDLER h, int index,
BOOL value, double duration);
ARCS_ABI int setConfigurableDigitalOutput(IO_CONTROL_HANDLER h, int index,
BOOL value);
ARCS_ABI int setConfigurableDigitalOutputPulse(IO_CONTROL_HANDLER h, int index,
BOOL value, double duration);
ARCS_ABI int setStandardAnalogOutput(IO_CONTROL_HANDLER h, int index,
double value);
ARCS_ABI int setToolAnalogOutput(IO_CONTROL_HANDLER h, int index, double value);
ARCS_ABI BOOL getStandardDigitalInput(IO_CONTROL_HANDLER h, int index);
ARCS_ABI uint32_t getStandardDigitalInputs(IO_CONTROL_HANDLER h);
ARCS_ABI BOOL getToolDigitalInput(IO_CONTROL_HANDLER h, int index);
ARCS_ABI uint32_t getToolDigitalInputs(IO_CONTROL_HANDLER h);
ARCS_ABI BOOL getConfigurableDigitalInput(IO_CONTROL_HANDLER h, int index);
ARCS_ABI uint32_t getConfigurableDigitalInputs(IO_CONTROL_HANDLER h);
ARCS_ABI double getStandardAnalogInput(IO_CONTROL_HANDLER h, int index);
ARCS_ABI double getToolAnalogInput(IO_CONTROL_HANDLER h, int index);
ARCS_ABI BOOL getStandardDigitalOutput(IO_CONTROL_HANDLER h, int index);
ARCS_ABI uint32_t getStandardDigitalOutputs(IO_CONTROL_HANDLER h);
ARCS_ABI BOOL getToolDigitalOutput(IO_CONTROL_HANDLER h, int index);
ARCS_ABI uint32_t getToolDigitalOutputs(IO_CONTROL_HANDLER h);
ARCS_ABI BOOL getConfigurableDigitalOutput(IO_CONTROL_HANDLER h, int index);
ARCS_ABI uint32_t getConfigurableDigitalOutputs(IO_CONTROL_HANDLER h);
ARCS_ABI double getStandardAnalogOutput(IO_CONTROL_HANDLER h, int index);
ARCS_ABI double getToolAnalogOutput(IO_CONTROL_HANDLER h, int index);
ARCS_ABI int getStaticLinkInputNum(IO_CONTROL_HANDLER h);
ARCS_ABI int getStaticLinkOutputNum(IO_CONTROL_HANDLER h);
ARCS_ABI uint32_t getStaticLinkInputs(IO_CONTROL_HANDLER h);
ARCS_ABI uint32_t getStaticLinkOutputs(IO_CONTROL_HANDLER h);
ARCS_ABI BOOL hasEncoderSensor(IO_CONTROL_HANDLER h);
ARCS_ABI int setEncDecoderType(IO_CONTROL_HANDLER h, int type, int range_id);
ARCS_ABI int setEncTickCount(IO_CONTROL_HANDLER h, int tick);
ARCS_ABI int getEncDecoderType(IO_CONTROL_HANDLER h);
ARCS_ABI int getEncTickCount(IO_CONTROL_HANDLER h);
ARCS_ABI int unwindEncDeltaTickCount(IO_CONTROL_HANDLER h, int delta_count);
ARCS_ABI BOOL getToolButtonStatus(IO_CONTROL_HANDLER h);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,157 @@
#ifndef AUBO_SDK_MotionControl_C_H
#define AUBO_SDK_MotionControl_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI double getEqradius(MOTION_CONTROL_HANDLER h);
ARCS_ABI int setEqradius(MOTION_CONTROL_HANDLER h, double eqradius);
ARCS_ABI double getSpeedFraction(MOTION_CONTROL_HANDLER h);
ARCS_ABI int setSpeedFraction(MOTION_CONTROL_HANDLER h, double fraction);
ARCS_ABI int speedFractionCritical(MOTION_CONTROL_HANDLER h, BOOL enable);
ARCS_ABI BOOL isSpeedFractionCritical(MOTION_CONTROL_HANDLER h);
ARCS_ABI BOOL isBlending(MOTION_CONTROL_HANDLER h);
ARCS_ABI int pathOffsetEnable(MOTION_CONTROL_HANDLER h);
ARCS_ABI int pathOffsetSet(MOTION_CONTROL_HANDLER h, const double *offset,
int type);
ARCS_ABI int pathOffsetDisable(MOTION_CONTROL_HANDLER h);
ARCS_ABI int jointOffsetEnable(MOTION_CONTROL_HANDLER h);
ARCS_ABI int jointOffsetSet(MOTION_CONTROL_HANDLER h, const double *offset,
int type);
ARCS_ABI int jointOffsetDisable(MOTION_CONTROL_HANDLER h);
ARCS_ABI int getTrajectoryQueueSize(MOTION_CONTROL_HANDLER h);
ARCS_ABI int getQueueSize(MOTION_CONTROL_HANDLER h);
ARCS_ABI int getExecId(MOTION_CONTROL_HANDLER h);
ARCS_ABI double getDuration(MOTION_CONTROL_HANDLER h, int id);
ARCS_ABI double getMotionLeftTime(MOTION_CONTROL_HANDLER h, int id);
ARCS_ABI double getProgress(MOTION_CONTROL_HANDLER h);
ARCS_ABI int setWorkObjectHold(MOTION_CONTROL_HANDLER h,
const char *module_name,
const double *mounting_pose);
ARCS_ABI char *getWorkObjectHold(MOTION_CONTROL_HANDLER h);
ARCS_ABI int getPauseJointPositions(MOTION_CONTROL_HANDLER h, double *result);
ARCS_ABI int setServoMode(MOTION_CONTROL_HANDLER h, BOOL enable);
ARCS_ABI BOOL isServoModeEnabled(MOTION_CONTROL_HANDLER h);
ARCS_ABI int setServoModeSelect(MOTION_CONTROL_HANDLER h, int mode);
ARCS_ABI int getServoModeSelect(MOTION_CONTROL_HANDLER h);
ARCS_ABI int servoJoint(MOTION_CONTROL_HANDLER h, const double *q, double a,
double v, double t, double lookahead_time, double gain);
ARCS_ABI int servoCartesian(MOTION_CONTROL_HANDLER h, const double *pose,
double a, double v, double t, double lookahead_time,
double gain);
ARCS_ABI int servoJointWithAxes(MOTION_CONTROL_HANDLER h, const double *q,
const double *extq, double a, double v,
double t, double lookahead_time, double gain);
ARCS_ABI int servoCartesianWithAxes(MOTION_CONTROL_HANDLER h,
const double *pose, const double *extq,
double a, double v, double t,
double lookahead_time, double gain);
ARCS_ABI int trackJoint(MOTION_CONTROL_HANDLER h, const double *q, double t,
double smooth_scale, double delay_sacle);
ARCS_ABI int trackCartesian(MOTION_CONTROL_HANDLER h, const double *pose,
double t, double smooth_scale, double delay_sacle);
ARCS_ABI int followJoint(MOTION_CONTROL_HANDLER h, const double *q);
ARCS_ABI int followLine(MOTION_CONTROL_HANDLER h, const double *pose);
ARCS_ABI int speedJoint(MOTION_CONTROL_HANDLER h, const double *qd, double a,
double t);
ARCS_ABI int resumeSpeedJoint(MOTION_CONTROL_HANDLER h, const double *qd,
double a, double t);
ARCS_ABI int speedLine(MOTION_CONTROL_HANDLER h, const double *xd, double a,
double t);
ARCS_ABI int resumeSpeedLine(MOTION_CONTROL_HANDLER h, const double *xd,
double a, double t);
ARCS_ABI int moveSpline(MOTION_CONTROL_HANDLER h, const double *q, double a,
double v, double duration);
ARCS_ABI int moveJoint(MOTION_CONTROL_HANDLER h, const double *q, double a,
double v, double blend_radius, double duration);
ARCS_ABI int resumeMoveJoint(MOTION_CONTROL_HANDLER h, const double *q,
double a, double v, double duration);
ARCS_ABI int moveLine(MOTION_CONTROL_HANDLER h, const double *pose, double a,
double v, double blend_radius, double duration);
ARCS_ABI int moveProcess(MOTION_CONTROL_HANDLER h, const double *pose, double a,
double v, double blend_radius);
ARCS_ABI int resumeMoveLine(MOTION_CONTROL_HANDLER h, const double *pose,
double a, double v, double duration);
ARCS_ABI int moveCircle(MOTION_CONTROL_HANDLER h, const double *via_pose,
const double *end_pose, double a, double v,
double blend_radius, double duration);
ARCS_ABI int setCirclePathMode(MOTION_CONTROL_HANDLER h, int mode);
ARCS_ABI int moveCircle2(MOTION_CONTROL_HANDLER h,
const CircleParameters_C *param);
ARCS_ABI int pathBufferAlloc(MOTION_CONTROL_HANDLER h, const char *name,
int type, int size);
ARCS_ABI int pathBufferAppend(MOTION_CONTROL_HANDLER h, const char *name,
const double *waypoints, int rows);
ARCS_ABI int pathBufferEval(MOTION_CONTROL_HANDLER h, const char *name,
const double *a, const double *v, double t);
ARCS_ABI BOOL pathBufferValid(MOTION_CONTROL_HANDLER h, const char *name);
ARCS_ABI int pathBufferFree(MOTION_CONTROL_HANDLER h, const char *name);
ARCS_ABI int pathBufferList(MOTION_CONTROL_HANDLER h, char **result);
ARCS_ABI int movePathBuffer(MOTION_CONTROL_HANDLER h, const char *name);
ARCS_ABI int moveIntersection(MOTION_CONTROL_HANDLER h, const double *poses,
int rows, double a, double v,
double main_pipe_radius, double sub_pipe_radius,
double normal_distance, double normal_alpha);
ARCS_ABI int stopJoint(MOTION_CONTROL_HANDLER h, double acc);
ARCS_ABI int resumeStopJoint(MOTION_CONTROL_HANDLER h, double acc);
ARCS_ABI int stopLine(MOTION_CONTROL_HANDLER h, double acc, double acc_rot);
ARCS_ABI int resumeStopLine(MOTION_CONTROL_HANDLER h, double acc,
double acc_rot);
ARCS_ABI int weaveStart(MOTION_CONTROL_HANDLER h, const char *params);
ARCS_ABI int weaveEnd(MOTION_CONTROL_HANDLER h);
ARCS_ABI int storePath(MOTION_CONTROL_HANDLER h, BOOL keep_sync);
ARCS_ABI int stopMove(MOTION_CONTROL_HANDLER h, BOOL quick, BOOL all_tasks);
ARCS_ABI int startMove(MOTION_CONTROL_HANDLER h);
ARCS_ABI int clearPath(MOTION_CONTROL_HANDLER h);
ARCS_ABI int restoPath(MOTION_CONTROL_HANDLER h);
ARCS_ABI int setFuturePointSamplePeriod(MOTION_CONTROL_HANDLER h,
double sample_time);
ARCS_ABI int getFuturePathPointsJoint(MOTION_CONTROL_HANDLER h,
double **result);
ARCS_ABI int conveyorTrackCircle(MOTION_CONTROL_HANDLER h, int encoder_id,
const double *center, BOOL rotate_tool);
ARCS_ABI int conveyorTrackLine(MOTION_CONTROL_HANDLER h, int encoder_id,
const double *direction);
ARCS_ABI int conveyorTrackStop(MOTION_CONTROL_HANDLER h, int encoder_id,
double a);
ARCS_ABI int setConveyorTrackEncoder(MOTION_CONTROL_HANDLER h, int encoder_id,
int tick_per_meter);
ARCS_ABI int setConveyorTrackLimit(MOTION_CONTROL_HANDLER h, int encoder_id,
double limit);
ARCS_ABI int setConveyorTrackStartWindow(MOTION_CONTROL_HANDLER h,
int encoder_id, double window_min,
double window_max);
ARCS_ABI int setConveyorTrackSensorOffset(MOTION_CONTROL_HANDLER h,
int encoder_id, double offset);
ARCS_ABI int setConveyorTrackSyncSeparation(MOTION_CONTROL_HANDLER h,
int encoder_id, double distance,
double time);
ARCS_ABI int setConveyorTrackCompensate(MOTION_CONTROL_HANDLER h,
int encoder_id, double comp);
ARCS_ABI BOOL isConveyorTrackSync(MOTION_CONTROL_HANDLER h, int encoder_id);
ARCS_ABI BOOL isConveyorTrackExceed(MOTION_CONTROL_HANDLER h, int encoder_id);
ARCS_ABI int getConveyorTrackQueue(MOTION_CONTROL_HANDLER h, int encoder_id,
double *result);
ARCS_ABI int getConveyorTrackNextItem(MOTION_CONTROL_HANDLER h, int encoder_id);
ARCS_ABI int conveyorTrackCreatItem(MOTION_CONTROL_HANDLER h, int encoder_id,
int item_id, const double *offset);
ARCS_ABI BOOL hasItemOnConveyorToTrack(MOTION_CONTROL_HANDLER h,
int encoder_id);
ARCS_ABI BOOL conveyorTrackSwitch(MOTION_CONTROL_HANDLER h, int encoder_id);
ARCS_ABI int conveyorTrackClearItems(MOTION_CONTROL_HANDLER h, int encoder_id);
ARCS_ABI int setConveyorItemTrigIO(MOTION_CONTROL_HANDLER h, int encoder_id,
RobotIOType_C io_type, int io_index,
BOOL trig_edge);
ARCS_ABI int moveSpiral(MOTION_CONTROL_HANDLER h,
const SpiralParameters_C *param, double blend_radius,
double v, double a, double t);
ARCS_ABI int pathOffsetLimits(MOTION_CONTROL_HANDLER h, double v, double a);
ARCS_ABI int pathOffsetCoordinate(MOTION_CONTROL_HANDLER h, int ref_coord);
ARCS_ABI int getLookAheadSize(MOTION_CONTROL_HANDLER h);
ARCS_ABI int setLookAheadSize(MOTION_CONTROL_HANDLER h, int size);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,73 @@
#ifndef AUBO_SDK_RobotAlgorithm_C_H
#define AUBO_SDK_RobotAlgorithm_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI ForceSensorCalibResult_C
calibrateTcpForceSensor(ROBOT_ALGORITHM_HANDLER h, const double *forces,
int forces_rows, const double *poses, int poses_rows);
ARCS_ABI ForceSensorCalibResult_C
calibrateTcpForceSensor2(ROBOT_ALGORITHM_HANDLER h, const double *forces,
int forces_rows, const double *poses, int poses_rows);
ARCS_ABI int payloadIdentify(ROBOT_ALGORITHM_HANDLER h,
const char *data_no_payload,
const char *data_with_payload);
ARCS_ABI int payloadIdentify1(ROBOT_ALGORITHM_HANDLER h, const char *file_name);
ARCS_ABI int payloadCalculateFinished(ROBOT_ALGORITHM_HANDLER h);
ARCS_ABI Payload_C getPayloadIdentifyResult(ROBOT_ALGORITHM_HANDLER h);
ARCS_ABI int generatePayloadIdentifyTraj(ROBOT_ALGORITHM_HANDLER h,
const char *name,
const TrajConfig_C *traj_config);
ARCS_ABI int payloadIdentifyTrajGenFinished(ROBOT_ALGORITHM_HANDLER h);
ARCS_ABI BOOL frictionModelIdentify(ROBOT_ALGORITHM_HANDLER h, const double *q,
int q_rows, const double *qd, int qd_rows,
const double *qdd, int qdd_rows,
const double *temp, int temp_rows);
ARCS_ABI int calibWorkpieceCoordinatePara(ROBOT_ALGORITHM_HANDLER h,
const double *q, int q_rows, int type,
double *result);
ARCS_ABI int forwardDynamics(ROBOT_ALGORITHM_HANDLER h, const double *q,
const double *torqs, double *result);
ARCS_ABI int forwardKinematics(ROBOT_ALGORITHM_HANDLER h, const double *q,
double *result);
ARCS_ABI int forwardToolKinematics(ROBOT_ALGORITHM_HANDLER h, const double *q,
double *result);
ARCS_ABI int forwardDynamics1(ROBOT_ALGORITHM_HANDLER h, const double *q,
const double *torqs, const double *tcp_offset,
double *result);
ARCS_ABI int forwardKinematics1(ROBOT_ALGORITHM_HANDLER h, const double *q,
const double *tcp_offset, double *result);
ARCS_ABI int inverseKinematics(ROBOT_ALGORITHM_HANDLER h, const double *qnear,
const double *pose, double *result);
ARCS_ABI int inverseKinematicsAll(ROBOT_ALGORITHM_HANDLER h, const double *pose,
double **result);
ARCS_ABI int inverseKinematics1(ROBOT_ALGORITHM_HANDLER h, const double *qnear,
const double *pose, const double *tcp_offset,
double *result);
ARCS_ABI int inverseKinematicsAll1(ROBOT_ALGORITHM_HANDLER h,
const double *pose, const double *tcp_offset,
double **result);
ARCS_ABI int inverseToolKinematics(ROBOT_ALGORITHM_HANDLER h,
const double *qnear, const double *pose,
double *result);
ARCS_ABI int inverseToolKinematicsAll(ROBOT_ALGORITHM_HANDLER h,
const double *pose, double **result);
ARCS_ABI int pathMovej(ROBOT_ALGORITHM_HANDLER h, const double *q1, double r1,
const double *q2, double r2, double d, double **result);
ARCS_ABI int pathBlend3Points(ROBOT_ALGORITHM_HANDLER h, int type,
const double *q_start, const double *q_via,
const double *q_to, double r, double d,
double **result);
ARCS_ABI int pathBlend3Points1(ROBOT_ALGORITHM_HANDLER h, int type,
const double *q_start, const double *q_via,
const double *q_to, double r, double d,
double **result);
ARCS_ABI int calcJacobian(ROBOT_ALGORITHM_HANDLER h, const double *q,
BOOL base_or_end, double *result);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,92 @@
#ifndef AUBO_SDK_RobotConfig_C_H
#define AUBO_SDK_RobotConfig_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI int getDof(ROBOT_CONFIG_HANDLER h);
ARCS_ABI int getName(ROBOT_CONFIG_HANDLER h, char *result);
ARCS_ABI double getCycletime(ROBOT_CONFIG_HANDLER h);
ARCS_ABI int setSlowDownFraction(ROBOT_CONFIG_HANDLER h, int level,
double fraction);
ARCS_ABI double getSlowDownFraction(ROBOT_CONFIG_HANDLER h, int level);
ARCS_ABI int getRobotType(ROBOT_CONFIG_HANDLER h, char *result);
ARCS_ABI int getRobotSubType(ROBOT_CONFIG_HANDLER h, char *result);
ARCS_ABI int getControlBoxType(ROBOT_CONFIG_HANDLER h, char *result);
ARCS_ABI double getDefaultToolAcc(ROBOT_CONFIG_HANDLER h);
ARCS_ABI double getDefaultToolSpeed(ROBOT_CONFIG_HANDLER h);
ARCS_ABI double getDefaultJointAcc(ROBOT_CONFIG_HANDLER h);
ARCS_ABI double getDefaultJointSpeed(ROBOT_CONFIG_HANDLER h);
ARCS_ABI int setMountingPose(ROBOT_CONFIG_HANDLER h, const double *pose);
ARCS_ABI int getMountingPose(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int setCollisionLevel(ROBOT_CONFIG_HANDLER h, int level);
ARCS_ABI int getCollisionLevel(ROBOT_CONFIG_HANDLER h);
ARCS_ABI int setCollisionStopType(ROBOT_CONFIG_HANDLER h, int type);
ARCS_ABI int getCollisionStopType(ROBOT_CONFIG_HANDLER h);
ARCS_ABI int setHomePosition(ROBOT_CONFIG_HANDLER h, const double *positions);
ARCS_ABI int getHomePosition(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int setFreedriveDamp(ROBOT_CONFIG_HANDLER h, const double *damp);
ARCS_ABI int getFreedriveDamp(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getTcpForceSensorNames(ROBOT_CONFIG_HANDLER h, char **result);
ARCS_ABI int selectTcpForceSensor(ROBOT_CONFIG_HANDLER h, const char *name);
ARCS_ABI BOOL hasTcpForceSensor(ROBOT_CONFIG_HANDLER h);
ARCS_ABI int setTcpForceOffset(ROBOT_CONFIG_HANDLER h,
const double *force_offset);
ARCS_ABI int getTcpForceOffset(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getBaseForceSensorNames(ROBOT_CONFIG_HANDLER h, char **result);
ARCS_ABI int selectBaseForceSensor(ROBOT_CONFIG_HANDLER h, const char *name);
ARCS_ABI BOOL hasBaseForceSensor(ROBOT_CONFIG_HANDLER h);
ARCS_ABI int setBaseForceOffset(ROBOT_CONFIG_HANDLER h,
const double *force_offset);
ARCS_ABI int getBaseForceOffset(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int setPersistentParameters(ROBOT_CONFIG_HANDLER h, const char *param);
ARCS_ABI int setKinematicsCompensate(ROBOT_CONFIG_HANDLER h,
const DHParam_C *param);
ARCS_ABI int setHardwareCustomParameters(ROBOT_CONFIG_HANDLER h,
const char *param);
ARCS_ABI int getHardwareCustomParameters(ROBOT_CONFIG_HANDLER h,
const char *param, char *result);
ARCS_ABI int setRobotZero(ROBOT_CONFIG_HANDLER h);
ARCS_ABI DHParam_C *getKinematicsParam(ROBOT_CONFIG_HANDLER h, BOOL real);
ARCS_ABI DHComp_C *getKinematicsCompensate(ROBOT_CONFIG_HANDLER h,
double ref_temperature);
ARCS_ABI uint32_t getSafetyParametersCheckSum(ROBOT_CONFIG_HANDLER h);
ARCS_ABI int confirmSafetyParameters(
ROBOT_CONFIG_HANDLER h, const RobotSafetyParameterRange_C *parameters);
ARCS_ABI uint32_t calcSafetyParametersCheckSum(
ROBOT_CONFIG_HANDLER h, const RobotSafetyParameterRange_C *parameters);
ARCS_ABI int getJointMaxPositions(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getJointMinPositions(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getJointMaxSpeeds(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getJointMaxAccelerations(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getTcpMaxSpeeds(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getTcpMaxAccelerations(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI BOOL toolSpaceInRange(ROBOT_CONFIG_HANDLER h, const double *pose);
ARCS_ABI int setPayload(ROBOT_CONFIG_HANDLER h, double m, const double *cog,
const double *aom, const double *inertia);
ARCS_ABI Payload_C getPayload(ROBOT_CONFIG_HANDLER h);
ARCS_ABI int getTcpOffset(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getGravity(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int setGravity(ROBOT_CONFIG_HANDLER h, const double *gravity);
ARCS_ABI int setTcpOffset(ROBOT_CONFIG_HANDLER h, const double *offset);
ARCS_ABI int setToolInertial(ROBOT_CONFIG_HANDLER h, double m,
const double *com, const double *inertial);
ARCS_ABI int firmwareUpdate(ROBOT_CONFIG_HANDLER h, const char *fw);
ARCS_ABI double getFirmwareUpdateProcess(ROBOT_CONFIG_HANDLER h);
ARCS_ABI int setTcpForceSensorPose(ROBOT_CONFIG_HANDLER h,
const double *sensor_pose);
ARCS_ABI int getTcpForceSensorPose(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getLimitJointMaxPositions(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getLimitJointMinPositions(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getLimitJointMaxSpeeds(ROBOT_CONFIG_HANDLER h, double *result);
ARCS_ABI int getLimitJointMaxAccelerations(ROBOT_CONFIG_HANDLER h,
double *result);
ARCS_ABI double getLimitTcpMaxSpeed(ROBOT_CONFIG_HANDLER h);
ARCS_ABI SafeguedStopType_C getSafeguardStopType(ROBOT_CONFIG_HANDLER h);
ARCS_ABI int getSafeguardStopSource(ROBOT_CONFIG_HANDLER h);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,22 @@
#ifndef AUBO_SDK_RobotInterface_C_H
#define AUBO_SDK_RobotInterface_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI ROBOT_CONFIG_HANDLER robot_getRobotConfig(ROBOT_HANDLER robot);
ARCS_ABI MOTION_CONTROL_HANDLER robot_getMotionControl(ROBOT_HANDLER robot);
ARCS_ABI FORCE_CONTROL_HANDLER robot_getForceControl(ROBOT_HANDLER robot);
ARCS_ABI IO_CONTROL_HANDLER robot_getIoControl(ROBOT_HANDLER robot);
ARCS_ABI SYNC_MOVE_HANDLER robot_getSyncMove(ROBOT_HANDLER robot);
ARCS_ABI ROBOT_ALGORITHM_HANDLER robot_getRobotAlgorithm(ROBOT_HANDLER robot);
ARCS_ABI ROBOT_MANAGE_HANDLER robot_getRobotManage(ROBOT_HANDLER robot);
ARCS_ABI ROBOT_STATE_HANDLER robot_getRobotState(ROBOT_HANDLER robot);
ARCS_ABI TRACE_HANDLER robot_getTrace(ROBOT_HANDLER robot);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,38 @@
#ifndef AUBO_SDK_RobotManage_C_H
#define AUBO_SDK_RobotManage_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI int poweron(ROBOT_MANAGE_HANDLER h);
ARCS_ABI int startup(ROBOT_MANAGE_HANDLER h);
ARCS_ABI int poweroff(ROBOT_MANAGE_HANDLER h);
ARCS_ABI int backdrive(ROBOT_MANAGE_HANDLER h, BOOL enable);
ARCS_ABI int freedrive(ROBOT_MANAGE_HANDLER h, BOOL enable);
ARCS_ABI int handguideMode(ROBOT_MANAGE_HANDLER h, int32_t *freeAxes,
const double *feature);
ARCS_ABI int exitHandguideMode(ROBOT_MANAGE_HANDLER h);
ARCS_ABI int getHandguideStatus(ROBOT_MANAGE_HANDLER h);
ARCS_ABI int getHandguideTrigger(ROBOT_MANAGE_HANDLER h);
ARCS_ABI BOOL isHandguideEnabled(ROBOT_MANAGE_HANDLER h);
ARCS_ABI int setSim(ROBOT_MANAGE_HANDLER h, BOOL enable);
ARCS_ABI int setOperationalMode(ROBOT_MANAGE_HANDLER h,
OperationalModeType_C mode);
ARCS_ABI OperationalModeType_C getOperationalMode(ROBOT_MANAGE_HANDLER h);
ARCS_ABI RobotControlModeType_C getRobotControlMode(ROBOT_MANAGE_HANDLER h);
ARCS_ABI BOOL isSimulationEnabled(ROBOT_MANAGE_HANDLER h);
ARCS_ABI BOOL isFreedriveEnabled(ROBOT_MANAGE_HANDLER h);
ARCS_ABI BOOL isBackdriveEnabled(ROBOT_MANAGE_HANDLER h);
ARCS_ABI int setUnlockProtectiveStop(ROBOT_MANAGE_HANDLER h);
ARCS_ABI int startRecord(ROBOT_MANAGE_HANDLER h, const char *file_name);
ARCS_ABI int stopRecord(ROBOT_MANAGE_HANDLER h);
ARCS_ABI int pauseRecord(ROBOT_MANAGE_HANDLER h, BOOL pause);
ARCS_ABI int restartInterfaceBoard(ROBOT_MANAGE_HANDLER h);
ARCS_ABI int setLinkModeEnable(ROBOT_MANAGE_HANDLER h, BOOL enable);
ARCS_ABI BOOL isLinkModeEnabled(ROBOT_MANAGE_HANDLER h);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,78 @@
#ifndef AUBO_SDK_RobotState_C_H
#define AUBO_SDK_RobotState_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI RobotModeType_C getRobotModeType(ROBOT_STATE_HANDLER h);
ARCS_ABI SafetyModeType_C getSafetyModeType(ROBOT_STATE_HANDLER h);
ARCS_ABI BOOL isPowerOn(ROBOT_STATE_HANDLER h);
ARCS_ABI BOOL isSteady(ROBOT_STATE_HANDLER h);
ARCS_ABI BOOL isCollisionOccurred(ROBOT_STATE_HANDLER h);
ARCS_ABI BOOL isWithinSafetyLimits(ROBOT_STATE_HANDLER h);
ARCS_ABI int getTcpPose(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getActualTcpOffset(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getTargetTcpPose(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getToolPose(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getTcpSpeed(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getTcpForce(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getElbowPosistion(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getElbowVelocity(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getBaseForce(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getTcpTargetPose(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getTcpTargetSpeed(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getTcpTargetForce(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointState(ROBOT_STATE_HANDLER h, JointStateType_C *result);
ARCS_ABI int getJointServoMode(ROBOT_STATE_HANDLER h,
JointServoModeType_C *result);
ARCS_ABI int getJointPositions(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointPositionsHistory(ROBOT_STATE_HANDLER h, int steps,
double *result);
ARCS_ABI int getJointSpeeds(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointAccelerations(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointTorqueSensors(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointContactTorques(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getBaseForceSensor(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getTcpForceSensors(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointCurrents(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointVoltages(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointTemperatures(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointUniqueIds(ROBOT_STATE_HANDLER h, char **result);
ARCS_ABI int getJointFirmwareVersions(ROBOT_STATE_HANDLER h, int *result);
ARCS_ABI int getJointHardwareVersions(ROBOT_STATE_HANDLER h, int *result);
ARCS_ABI int getMasterBoardUniqueId(ROBOT_STATE_HANDLER h, char *result);
ARCS_ABI int getMasterBoardFirmwareVersion(ROBOT_STATE_HANDLER h);
ARCS_ABI int getMasterBoardHardwareVersion(ROBOT_STATE_HANDLER h);
ARCS_ABI int getSlaveBoardUniqueId(ROBOT_STATE_HANDLER h, char *result);
ARCS_ABI int getSlaveBoardFirmwareVersion(ROBOT_STATE_HANDLER h);
ARCS_ABI int getSlaveBoardHardwareVersion(ROBOT_STATE_HANDLER h);
ARCS_ABI int getToolUniqueId(ROBOT_STATE_HANDLER h, char *result);
ARCS_ABI int getToolFirmwareVersion(ROBOT_STATE_HANDLER h);
ARCS_ABI int getToolHardwareVersion(ROBOT_STATE_HANDLER h);
ARCS_ABI int getToolCommMode(ROBOT_STATE_HANDLER h);
ARCS_ABI int getPedestalUniqueId(ROBOT_STATE_HANDLER h, char *result);
ARCS_ABI int getPedestalFirmwareVersion(ROBOT_STATE_HANDLER h);
ARCS_ABI int getPedestalHardwareVersion(ROBOT_STATE_HANDLER h);
ARCS_ABI int getJointTargetPositions(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointTargetSpeeds(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointTargetAccelerations(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointTargetTorques(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI int getJointTargetCurrents(ROBOT_STATE_HANDLER h, double *result);
ARCS_ABI double getControlBoxTemperature(ROBOT_STATE_HANDLER h);
ARCS_ABI double getControlBoxHumidity(ROBOT_STATE_HANDLER h);
ARCS_ABI double getMainVoltage(ROBOT_STATE_HANDLER h);
ARCS_ABI double getMainCurrent(ROBOT_STATE_HANDLER h);
ARCS_ABI double getRobotVoltage(ROBOT_STATE_HANDLER h);
ARCS_ABI double getRobotCurrent(ROBOT_STATE_HANDLER h);
ARCS_ABI int getSlowDownLevel(ROBOT_STATE_HANDLER h);
ARCS_ABI HandleStateType_C getHandleState(ROBOT_STATE_HANDLER h);
ARCS_ABI HandleModeType_C getHandleMode(ROBOT_STATE_HANDLER h);
ARCS_ABI int getHandleUniqueId(ROBOT_STATE_HANDLER h, char *result);
ARCS_ABI int getHandleFirmwareVersion(ROBOT_STATE_HANDLER h);
ARCS_ABI int getHandleHardwareVersion(ROBOT_STATE_HANDLER h);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,179 @@
/** @file rpc.h
* @brief RPC模块的交互
*/
#ifndef AUBO_SDK_RPC_H
#define AUBO_SDK_RPC_H
#include <memory>
#include <aubo/aubo_api.h>
#include <aubo/global_config.h>
namespace arcs {
namespace aubo_sdk {
using namespace arcs::common_interface;
/// RPC客户端
class ARCS_ABI RpcClient : public AuboApi
{
public:
enum Event
{
Connected = 0,
Disconnected = 1,
};
/**
* @brief RpcClient
* @param mode 0-TCP 1-UDS
*/
RpcClient(int mode = 0);
~RpcClient();
/**
*
*
* \n
* Aubo SDK
*
* Aubo SDK
*
* @note setLogHandler函数要放在即将触发的日志之前
*
*
* @param handler \n
* : \n
* void handler(int level, const char* filename, int line, const
* std::string& message) \n
* level \n
* &nbsp; 0: LOGLEVEL_FATAL \n
* &nbsp; 1: LOGLEVEL_ERROR \n
* &nbsp; 2: LOGLEVEL_WARNING \n
* &nbsp; 3: LOGLEVEL_INFO \n
* &nbsp; 4: LOGLEVEL_DEBUG \n
* &nbsp; 5: LOGLEVEL_BACKTRACE \n
* filename \n
* line \n
* message \n
* @return
*/
void setLogHandler(
std::function<void(int /*level*/, const char * /*filename*/,
int /*line*/, const std::string & /*message*/)>
handler);
/**
* RPC服务
*
* @param ip IP地址
* @param port RPC的端口号是30004
* @param ip和port为空时unix domain sockets通讯方式
* @retval 0 RPC连接成功
* @retval -8 RPC连接失败RPC连接被拒绝
* @retval -15 RPC连接失败SDK版本与Server版本不兼容
*/
int connect(const std::string &ip = "", int port = 0);
/**
* RPC连接
*
* @retval 0
* @retval -1
*/
int disconnect();
/**
* RPC
*
* @retval true RPC
* @retval false RPC
*/
bool hasConnected() const;
/**
*
*
* @param usrname
* @param passwd
* @return 0
*/
int login(const std::string &usrname, const std::string &passwd);
/**
*
*
* @return 0
*/
int logout();
/**
*
*
* @retval true
* @retval false
*/
bool hasLogined();
/**
* RPC请求超时时间
*
* @param timeout ms
* @return 0
*/
int setRequestTimeout(int timeout = 100);
/**
*
*
* @param cb
* @return
*/
int setEventHandler(std::function<void(int /*event*/)> cb);
/**
*
*
* @param enable
* @return
*/
int setExceptionFree(bool enable);
/**
*
*
* @return
*/
int errorCode() const;
/**
*
*
* @return
*/
int shutdown();
/**
* RPC日志打印
*
* @param enable true false
* @return 0
*/
int enableServerRpcLogging(bool enable);
};
using RpcClientPtr = std::shared_ptr<RpcClient>;
} // namespace aubo_sdk
} // namespace arcs
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI arcs::aubo_sdk::RpcClient *createRpcClient(int mode = 0);
ARCS_ABI void destroyRpcClient(arcs::aubo_sdk::RpcClient *cli);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,321 @@
/** @file rpc_c.h
* @brief RPC模块的交互
*/
#ifndef AUBO_SDK_RPC_C_H
#define AUBO_SDK_RPC_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
enum Event
{
Event_Connected = 0,
Event_Disconnected = 1,
};
ARCS_ABI RPC_HANDLER rpc_create_client(int mode = 0);
ARCS_ABI void rpc_destroy_client(RPC_HANDLER cli);
/**
*
*
* \n
* Aubo SDK
*
* Aubo SDK
*
* @note setLogHandler函数要放在即将触发的日志之前
*
*
* @param handler \n
* : \n
* void handler(int level, const char* filename, int line, const
* std::string& message) \n
* level \n
* &nbsp; 0: LOGLEVEL_FATAL \n
* &nbsp; 1: LOGLEVEL_ERROR \n
* &nbsp; 2: LOGLEVEL_WARNING \n
* &nbsp; 3: LOGLEVEL_INFO \n
* &nbsp; 4: LOGLEVEL_DEBUG \n
* &nbsp; 5: LOGLEVEL_BACKTRACE \n
* filename \n
* line \n
* message \n
* @return
*/
ARCS_ABI void rpc_setLogHandler(RPC_HANDLER cli, LOG_HANDLER handler);
/**
* RPC服务
*
* @param ip IP地址
* @param port RPC的端口号是30004
* @param ip和port为空时unix domain sockets通讯方式
* @retval 0 RPC连接成功
* @retval -8 RPC连接失败RPC连接被拒绝
* @retval -15 RPC连接失败SDK版本与Server版本不兼容
*/
ARCS_ABI int rpc_connect(RPC_HANDLER cli, const char *ip = "", int port = 0);
/**
* RPC连接
*
* @retval 0
* @retval -1
*/
ARCS_ABI int rpc_disconnect(RPC_HANDLER cli);
/**
* RPC
*
* @retval true RPC
* @retval false RPC
*/
ARCS_ABI bool rpc_hasConnected(RPC_HANDLER cli);
/**
*
*
* @param usrname
* @param passwd
* @return 0
*/
ARCS_ABI int rpc_login(RPC_HANDLER cli, const char *usrname,
const char *passwd);
/**
*
*
* @return 0
*/
ARCS_ABI int rpc_logout(RPC_HANDLER cli);
/**
*
*
* @retval true
* @retval false
*/
ARCS_ABI bool rpc_hasLogined(RPC_HANDLER cli);
/**
* RPC请求超时时间
*
* @param timeout ms
* @return 0
*/
ARCS_ABI int rpc_setRequestTimeout(RPC_HANDLER cli, int timeout = 10);
/**
*
*
* @param cb
* @return
*/
ARCS_ABI int rpc_setEventHandler(RPC_HANDLER cli, EVENT_CALLBACK cb);
/**
*
*
* @param enable
* @return
*/
ARCS_ABI int rpc_set_exception_free(RPC_HANDLER cli, bool enable);
/**
*
*
* @return
*/
ARCS_ABI int rpc_errorCode(RPC_HANDLER cli);
/**
*
*
* @return
*/
ARCS_ABI int rpc_shutdown(RPC_HANDLER cli);
/**
*
*
* @return MathPtr对象的指针
*
* @par Python函数原型
* getMath(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.Math
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* MathPtr ptr = rpc_cli->getMath();
* @endcode
*
*/
ARCS_ABI MATH_HANDLER rpc_getMath(RPC_HANDLER cli);
/**
*
*
* @return SystemInfoPtr对象的指针
*
* @par Python函数原型
* getSystemInfo(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.SystemInfo
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* SystemInfoPtr ptr = rpc_cli->getSystemInfo();
* @endcode
*
*/
ARCS_ABI SYSTEM_INFO_HANDLER rpc_getSystemInfo(RPC_HANDLER cli);
/**
*
*
* @return RuntimeMachinePtr对象的指针
*
* @par Python函数原型
* getRuntimeMachine(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.RuntimeMachine
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* RuntimeMachinePtr ptr = rpc_cli->getRuntimeMachine();
* @endcode
*
*/
ARCS_ABI RUNTIME_MACHINE_HANDLER rpc_getRuntimeMachine(RPC_HANDLER cli);
/**
*
*
* @return RegisterControlPtr对象的指针
*
* @par Python函数原型
* getRegisterControl(self: pyaubo_sdk.AuboApi) ->
* pyaubo_sdk.RegisterControl
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* RegisterControlPtr ptr = rpc_cli->getRegisterControl();
* @endcode
*
*/
ARCS_ABI REGISTER_CONTROL_HANDLER rpc_getRegisterControl(RPC_HANDLER cli);
/**
*
*
* @return
*
* @par Python函数原型
* getRobotNames(self: pyaubo_sdk.AuboApi) -> List[str]
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* @endcode
*
* @par JSON-RPC请求示例
* {"jsonrpc":"2.0","method":"getRobotNames","params":[],"id":1}
*
* @par JSON-RPC响应示例
* {"id":1,"jsonrpc":"2.0","result":["rob1"]}
*
*/
ARCS_ABI int rpc_getRobotNames(RPC_HANDLER cli, char **names);
/**
* RobotInterfacePtr
*
* @param name
* @return RobotInterfacePtr对象的指针
*
* @par Python函数原型
* getRobotInterface(self: pyaubo_sdk.AuboApi, arg0: str) ->
* pyaubo_sdk.RobotInterface
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* auto robot_name = rpc_cli->getRobotNames().front();
* RobotInterfacePtr ptr = rpc_cli->getRobotInterface(robot_name);
* @endcode
*
*/
ARCS_ABI ROBOT_HANDLER rpc_getRobotInterface(RPC_HANDLER cli, const char *name);
/**
*
*
* @return
*/
ARCS_ABI int rpc_getAxisNames(RPC_HANDLER cli, char **names);
/**
*
*
* @param name
* @return
*/
ARCS_ABI AXIS_HANDLER rpc_getAxisInterface(RPC_HANDLER cli, const char *name);
/// 获取独立 IO 模块接口
/**
* socket
* @return SocketPtr对象的指针
*
* @par Python函数原型
* getSocket(self: pyaubo_sdk.AuboApi) -> arcs::common_interface::Socket
* @endcode
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* SocketPtr ptr = rpc_cli->getSocket();
* @endcode
*
*/
ARCS_ABI SOCKET_HANDLER rpc_getSocket(RPC_HANDLER cli);
/**
*
* @return SerialPtr对象的指针
*
* @par Python函数原型
* getSerial(self: pyaubo_sdk.AuboApi) -> arcs::common_interface::Serial
*
* @par C++
* @code
* auto rpc_cli = std::make_shared<RpcClient>();
* SerialPtr ptr = rpc_cli->getSerial();
* @endcode
*/
ARCS_ABI SERIAL_HANDLER rpc_getSerial(RPC_HANDLER cli);
/**
*
*
* @return SyncMovePtr对象的指针
*/
ARCS_ABI SYNC_MOVE_HANDLER rpc_getSyncMove(RPC_HANDLER cli, const char *name);
/**
*
*
* @return TracePtr对象的指针
*/
ARCS_ABI TRACE_HANDLER rpc_getTrace(RPC_HANDLER cli, const char *name);
#ifdef __cplusplus
}
#endif
#endif // #define AUBO_SDK_RPC_C_H

View File

@ -0,0 +1,305 @@
/** @file rtde.h
* @brief RPC模块的交互
*/
#ifndef AUBO_SDK_RTDE_H
#define AUBO_SDK_RTDE_H
#include <string>
#include <vector>
#include <functional>
#include <memory>
#include <map>
#include <unordered_map>
#include <aubo/type_def.h>
#include <aubo/global_config.h>
namespace arcs {
namespace aubo_sdk {
class RtdeClient;
/// 向输出数据中增加
class ARCS_ABI OutputBuilder
{
public:
OutputBuilder();
~OutputBuilder();
OutputBuilder &push(int val);
OutputBuilder &push(double val);
OutputBuilder &push(const std::vector<double> &val);
OutputBuilder &push(const std::tuple<int, bool> &val);
OutputBuilder &push(int16_t &val);
OutputBuilder &push(const std::vector<int16_t> &val);
OutputBuilder &push(const std::vector<int> &val);
OutputBuilder &push(const std::string &val);
OutputBuilder &push(char val);
OutputBuilder &push(const common_interface::RtdeRecipe &val);
private:
friend RtdeClient;
class Impl;
Impl *impl;
};
/// 解析输入
class ARCS_ABI InputParser
{
public:
InputParser();
~InputParser();
bool popBool();
int popInt32();
int64_t popInt64();
int16_t popInt16();
double popDouble();
char popChar();
std::vector<int> popVectorInt();
std::vector<int16_t> popVectorInt16();
std::vector<double> popVectorDouble();
std::vector<std::vector<double>> popVectorVectorDouble();
std::vector<common_interface::JointStateType> popVectorJointStateType();
common_interface::RobotModeType popRobotModeType();
common_interface::OperationalModeType popOperationalModeType();
common_interface::SafetyModeType popSafetyModeType();
common_interface::RuntimeState popRuntimeState();
common_interface::RobotMsgVector popRobotMsgVector();
common_interface::Payload popPayload();
common_interface::GripperStatusVector popGripperStatusVector();
common_interface::HandleStateType popHandleStateType();
common_interface::HandleModeType popHandleModeType();
private:
friend RtdeClient;
class Impl;
Impl *impl;
};
/// RTDE客户端
class ARCS_ABI RtdeClient
{
public:
enum Event
{
Connected,
Disconnected,
};
/**
* RTDE客户端初始化
*
* @param mode 0 tcp通讯 1 uds通讯
*/
RtdeClient(int mode = 0);
~RtdeClient();
/**
*
*
* \n
* Aubo SDK
*
* Aubo SDK
*
* @note setLogHandler函数要放在即将触发的日志之前
*
*
* @param handler \n
* : \n
* void handler(int level, const char* filename, int line, const
* std::string& message) \n
* level \n
* &nbsp; 0: LOGLEVEL_FATAL \n
* &nbsp; 1: LOGLEVEL_ERROR \n
* &nbsp; 2: LOGLEVEL_WARNING \n
* &nbsp; 3: LOGLEVEL_INFO \n
* &nbsp; 4: LOGLEVEL_DEBUG \n
* &nbsp; 5: LOGLEVEL_BACKTRACE \n
* filename \n
* line \n
* message \n
* @return
*/
void setLogHandler(
std::function<void(int /*level*/, const char * /*filename*/,
int /*line*/, const std::string & /*message*/)>
handler);
/**
*
*
* @param ip IP地址
* @param port RTDE 30010
* @retval 0
* @retval 1
* @retval -1
*/
int connect(const std::string &ip = "", int port = 0);
/**
* socket
*
* @retval true socket
* @retval false socket
*/
bool hasConnected() const;
/**
* socket
*
* @param callback
* @retval true socket
* @retval false socket
*/
bool hasConnected1(std::function<void(bool)> callback);
/**
*
*
* @param usrname
* @param passwd
* @retval 0
* @retval -1
*/
int login(const std::string &usrname, const std::string &passwd);
/**
*
*
* @retval true
* @retval false
*/
bool hasLogined();
/**
*
*
* @return 0
*/
int logout();
/**
*
*
* @retval 0
* @retval -1
*/
int disconnect();
/**
*
*
* @return
*/
int getProtocolVersion();
/**
*
*
* @return
*/
std::map<std::string, int> getInputMaps();
/**
*
*
* @return
*/
std::map<std::string, int> getOutputMaps();
/**
*
*
* @param to_server
* true false
* @param names
* @param freq
* @param expected_chanel
* 0~99
*
* @retval expected_chanel参数的值
* @retval -1
*/
int setTopic(bool to_server, const std::vector<std::string> &names,
double freq, int expected_chanel);
/**
*
*
* @param to_server
* true false
* @param chanel
* @retval 0
* @retval 1
*/
int removeTopic(bool to_server, int chanel);
/**
*
*
* @return
*/
std::unordered_map<int, common_interface::RtdeRecipe>
getRegisteredInputRecipe();
/**
*
*
* @return
*/
std::unordered_map<int, common_interface::RtdeRecipe>
getRegisteredOutputRecipe();
/**
* subscribe from output
*
* @param chanel
* @param callback \n
*
* void callback(InputParser &parser)
* @return 0
*/
int subscribe(int chanel, std::function<void(InputParser &)> callback);
/**
* publish to input
*
* @param chanel
* @param callback \n
*
* void callback(OutputBuilder &builder)
* @retval 0
* @retval -1
*/
int publish(int chanel, std::function<void(OutputBuilder &)> callback);
/**
*
*
* @param cb
* @return
*/
int setEventHandler(std::function<void(int /*event*/)> cb);
private:
class Impl;
Impl *impl;
};
using RtdeClientPtr = std::shared_ptr<RtdeClient>;
} // namespace aubo_sdk
} // namespace arcs
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI arcs::aubo_sdk::RtdeClient *createRtdeClient(int mode = 0);
ARCS_ABI void destroyRtdeClient(arcs::aubo_sdk::RtdeClient *cli);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,180 @@
#ifndef AUBO_SDK_RTDE_C_H
#define AUBO_SDK_RTDE_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief RTDE
*
* @param mode 0 TCP 1 UDS
* @return RTDE NULL
*/
ARCS_ABI RTDE_HANDLE rtde_create_client(int mode);
/**
* @brief RTDE
*
* @param cli RTDE
*/
ARCS_ABI void rtde_destroy_client(RTDE_HANDLE cli);
/**
* @brief
*
* @param cli RTDE
* @param handler
*/
ARCS_ABI void rtde_setLogHandler(RTDE_HANDLE cli,
void (*handler)(int level,
const char *filename, int line,
const char *message));
/**
* @brief
*
* @param cli RTDE
* @param ip IP NULL 使
* @param port 0 使
* @return 0 -1
*/
ARCS_ABI int rtde_connect(RTDE_HANDLE cli, const char *ip, int port);
/**
* @brief
*
* @param cli RTDE
* @return true false
*/
ARCS_ABI bool rtde_hasConnected(RTDE_HANDLE cli);
/**
* @brief
*
* @param cli RTDE
* @param username
* @param password
* @return 0 -1
*/
ARCS_ABI int rtde_login(RTDE_HANDLE cli, const char *username,
const char *password);
/**
* @brief
*
* @param cli RTDE
* @return true false
*/
ARCS_ABI bool rtde_hasLogined(RTDE_HANDLE cli);
/**
* @brief
*
* @param cli RTDE
* @return 0
*/
ARCS_ABI int rtde_logout(RTDE_HANDLE cli);
/**
* @brief
*
* @param cli RTDE
* @return 0 -1
*/
ARCS_ABI int rtde_disconnect(RTDE_HANDLE cli);
/**
* @brief
*
* @param cli RTDE
* @return
*/
ARCS_ABI int rtde_getProtocolVersion(RTDE_HANDLE cli);
/**
* @brief
*
* @param cli RTDE
* @param to_server true false
*
* @param names
* @param freq
* @param expected_chanel
* @return -1
*/
ARCS_ABI int rtde_setTopic(RTDE_HANDLE cli, bool to_server, const char *names,
double freq, int expected_chanel);
/**
* @brief
*
* @param cli RTDE
* @param to_server
* @param chanel
* @return 0 -1
*/
ARCS_ABI int rtde_removeTopic(RTDE_HANDLE cli, bool to_server, int chanel);
/**
* @brief
*
* @param cli RTDE
* @param chanel
* @param callback
* @return 0 -1
*/
ARCS_ABI int rtde_subscribe(RTDE_HANDLE cli, int chanel,
void (*callback)(void *parser));
/**
* @brief
*
* @param cli RTDE
* @param chanel
* @param callback
* @return 0 -1
*/
ARCS_ABI int rtde_publish(RTDE_HANDLE cli, int chanel,
void (*callback)(void *builder));
// OutputBuilder
ARCS_ABI int rtde_pushInt(OUTPUT_BUILDER_HANDLE builder, int val);
ARCS_ABI int rtde_pushDouble(OUTPUT_BUILDER_HANDLE builder, double val);
ARCS_ABI int rtde_pushVectorDouble(OUTPUT_BUILDER_HANDLE builder, const double* val, int size);
ARCS_ABI int rtde_pushTupleIntBool(OUTPUT_BUILDER_HANDLE builder, int first, bool second);
ARCS_ABI int rtde_pushInt16(OUTPUT_BUILDER_HANDLE builder, int16_t val);
ARCS_ABI int rtde_pushVectorInt16(OUTPUT_BUILDER_HANDLE builder, const int16_t* val, int size);
ARCS_ABI int rtde_pushVectorInt(OUTPUT_BUILDER_HANDLE builder, const int* val, int size);
ARCS_ABI int rtde_pushString(OUTPUT_BUILDER_HANDLE builder, const char* val);
ARCS_ABI int rtde_pushChar(OUTPUT_BUILDER_HANDLE builder, char val);
ARCS_ABI int rtde_pushRtdeRecipe(OUTPUT_BUILDER_HANDLE builder, const struct RtdeRecipe_C* val);
// InputParser
ARCS_ABI bool rtde_popBool(INPUT_PARSER_HANDLE parser);
ARCS_ABI int32_t rtde_popInt32(INPUT_PARSER_HANDLE parser);
ARCS_ABI int64_t rtde_popInt64(INPUT_PARSER_HANDLE parser);
ARCS_ABI int16_t rtde_popInt16(INPUT_PARSER_HANDLE parser);
ARCS_ABI double rtde_popDouble(INPUT_PARSER_HANDLE parser);
ARCS_ABI char rtde_popChar(INPUT_PARSER_HANDLE parser);
ARCS_ABI int rtde_popVectorInt(INPUT_PARSER_HANDLE* parser, int* data, int size);
ARCS_ABI int rtde_popVectorInt16(INPUT_PARSER_HANDLE parser, int16_t* data, int size);
ARCS_ABI int rtde_popVectorDouble(INPUT_PARSER_HANDLE parser, double* data, int size);
ARCS_ABI int rtde_popVectorVectorDouble(INPUT_PARSER_HANDLE parser, double*** data, int rows, int cols);
ARCS_ABI JointStateType_C rtde_popVectorJointStateType(INPUT_PARSER_HANDLE parser);
ARCS_ABI RobotModeType_C rtde_popRobotModeType(INPUT_PARSER_HANDLE parser);
ARCS_ABI OperationalModeType_C rtde_popOperationalModeType(INPUT_PARSER_HANDLE parser);
ARCS_ABI SafetyModeType_C rtde_popSafetyModeType(INPUT_PARSER_HANDLE parser);
ARCS_ABI RuntimeState_C rtde_popRuntimeState(INPUT_PARSER_HANDLE parser);
ARCS_ABI int rtde_popRobotMsgVector(INPUT_PARSER_HANDLE parser, struct RobotMsgVector_C* robot_msg_vec);
ARCS_ABI int rtde_popPayload(INPUT_PARSER_HANDLE parser, struct Payload_C* payload);
#ifdef __cplusplus
}
#endif
#endif // AUBO_SDK_RTDE_C_H

View File

@ -0,0 +1,60 @@
#ifndef AUBO_SDK_RuntimeMachine_C_H
#define AUBO_SDK_RuntimeMachine_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI int newTask(RUNTIME_MACHINE_HADNLER h, BOOL daemon);
ARCS_ABI int deleteTask(RUNTIME_MACHINE_HADNLER h, int tid);
ARCS_ABI int detachTask(RUNTIME_MACHINE_HADNLER h, int tid);
ARCS_ABI BOOL isTaskAlive(RUNTIME_MACHINE_HADNLER h, int tid);
ARCS_ABI int nop(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI int switchTask(RUNTIME_MACHINE_HADNLER h, int tid);
ARCS_ABI int setLabel(RUNTIME_MACHINE_HADNLER h, int tid, const char *lineno);
ARCS_ABI int setPlanContext(RUNTIME_MACHINE_HADNLER h, int tid, int lineno,
const char *comment);
ARCS_ABI int gotoLine(RUNTIME_MACHINE_HADNLER h, int lineno);
ARCS_ABI int getAdvancePlanContext(RUNTIME_MACHINE_HADNLER h, int tid,
struct PlanContext_C *result);
ARCS_ABI int getAdvancePtr(RUNTIME_MACHINE_HADNLER h, int tid);
ARCS_ABI int getMainPtr(RUNTIME_MACHINE_HADNLER h, int tid);
ARCS_ABI int getInterpPtr(RUNTIME_MACHINE_HADNLER h, int tid);
ARCS_ABI int getPlanContext(RUNTIME_MACHINE_HADNLER h, int tid,
struct PlanContext_C *result);
ARCS_ABI int getExecutionStatus(RUNTIME_MACHINE_HADNLER h,
struct ExecutionStatus_C *result);
ARCS_ABI int getExecutionStatus1(RUNTIME_MACHINE_HADNLER h,
struct ExecutionStatus1_C *result);
ARCS_ABI int loadProgram(RUNTIME_MACHINE_HADNLER h, const char *program);
ARCS_ABI int runProgram(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI int start(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI int stop(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI int abort1(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI int pause(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI int step(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI int setResumeWait(RUNTIME_MACHINE_HADNLER h, BOOL wait);
ARCS_ABI int resume(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI RuntimeState_C getStatus(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI RuntimeState_C getRuntimeState(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI int setBreakPoint(RUNTIME_MACHINE_HADNLER h, int lineno);
ARCS_ABI int removeBreakPoint(RUNTIME_MACHINE_HADNLER h, int lineno);
ARCS_ABI int clearBreakPoints(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI int timerStart(RUNTIME_MACHINE_HADNLER h, const char *name);
ARCS_ABI int timerStop(RUNTIME_MACHINE_HADNLER h, const char *name);
ARCS_ABI int timerReset(RUNTIME_MACHINE_HADNLER h, const char *name);
ARCS_ABI int timerDelete(RUNTIME_MACHINE_HADNLER h, const char *name);
ARCS_ABI double getTimer(RUNTIME_MACHINE_HADNLER h, const char *name);
ARCS_ABI int triggBegin(RUNTIME_MACHINE_HADNLER h, double distance,
double delay);
ARCS_ABI int triggEnd(RUNTIME_MACHINE_HADNLER h);
ARCS_ABI int triggInterrupt(RUNTIME_MACHINE_HADNLER h, double distance,
double delay);
ARCS_ABI int getTriggInterrupts(RUNTIME_MACHINE_HADNLER h, int *result);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,209 @@
/** @file script.h
* @brief SCRIPT模块的交互
*/
#ifndef AUBO_SDK_SCRIPT_H
#define AUBO_SDK_SCRIPT_H
#include <string>
#include <memory>
#include <functional>
#include <aubo/global_config.h>
namespace arcs {
namespace aubo_sdk {
class ScriptWriter
{
public:
virtual ~ScriptWriter() = default;
virtual ScriptWriter &append(const std::string &line) = 0;
virtual ScriptWriter &append(const char *buf, size_t len) = 0;
virtual ScriptWriter &moveJoint() = 0;
virtual ScriptWriter &moveLine() = 0;
virtual ScriptWriter &ifCondition() = 0;
virtual ScriptWriter &elseCondition() = 0;
virtual ScriptWriter &elseIfCondition() = 0;
virtual ScriptWriter &whileCondition() = 0;
virtual ScriptWriter &end() = 0;
};
/// SCRIPT客户端
class ARCS_ABI ScriptClient
{
public:
enum Event
{
Connected,
Disconnected,
};
ScriptClient(int mode = 0);
~ScriptClient();
/**
*
*
* \n
* Aubo SDK
*
* Aubo SDK
*
* @note setLogHandler函数要放在即将触发的日志之前
*
*
* @param handler \n
* : \n
* void handler(int level, const char* filename, int line, const
* std::string& message) \n
* level \n
* &nbsp; 0: LOGLEVEL_FATAL \n
* &nbsp; 1: LOGLEVEL_ERROR \n
* &nbsp; 2: LOGLEVEL_WARNING \n
* &nbsp; 3: LOGLEVEL_INFO \n
* &nbsp; 4: LOGLEVEL_DEBUG \n
* &nbsp; 5: LOGLEVEL_BACKTRACE \n
* filename \n
* line \n
* message \n
* @return
*/
void setLogHandler(
std::function<void(int /*level*/, const char * /*filename*/,
int /*line*/, const std::string & /*message*/)>
handler);
/**
*
*
* @param ip IP地址
* @param port SCRIPT端口号为30004
* @retval 0
* @retval 1
* @retval -1
*/
int connect(const std::string &ip = "", int port = 0);
/**
*
*
* @retval true
* @retval false
*/
bool hasConnected() const;
/**
*
*
* @param usrname
* @param passwd
* @retval 0
* @retval -1
*/
int login(const std::string &usrname, const std::string &passwd);
/**
*
*
* @retval true
* @retval false
*/
bool hasLogined();
/**
*
*
* @return 0
*/
int logout();
/**
*
*
* @retval 0
* @retval -1
*/
int disconnect();
/**
*
*
*
*
* @param path
* @retval 0
* @retval -1
*/
int sendFile(const std::string &path);
/**
*
*
*
*
* @param script
* @retval 0
* @retval -1
*/
int sendString(const std::string &script);
/**
* 使ScriptWriter构建服务器脚本
*
* @param chunck_name
* @param cb
* @retval 0
* @retval -1
*/
int send(const std::string &chunck_name,
std::function<int(ScriptWriter &)> cb);
/**
*
*
* @param cb
* @return 0
*/
int subscribeVariableUpdate(
std::function<void(const std::string &, const std::string &)> cb);
/**
*
*
* @param cb
* @return 0
*/
ARCS_DEPRECATED int subscribeScriptError(
std::function<void(const std::string &)> cb);
int subscribeScriptError2(
std::function<void(const std::string &, const std::string &)> cb);
/**
*
*
* @param cb
* @return
*/
int setEventHandler(std::function<void(int /*event*/)> cb);
private:
class Impl;
Impl *impl;
};
using ScriptClientPtr = std::shared_ptr<ScriptClient>;
} // namespace aubo_sdk
} // namespace arcs
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI arcs::aubo_sdk::ScriptClient *createScriptClient(int mode = 0);
ARCS_ABI void destroyScriptClient(arcs::aubo_sdk::ScriptClient *cli);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,32 @@
#ifndef AUBO_SDK_Serial_C_H
#define AUBO_SDK_Serial_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI int serialOpen(SERIAL_HANDLER h, const char *device, int baud,
float stop_bits, int even, const char *serial_name);
ARCS_ABI int serialClose(SERIAL_HANDLER h, const char *serial_name);
ARCS_ABI int serialReadByte(SERIAL_HANDLER h, const char *variable,
const char *serial_name);
ARCS_ABI int serialReadByteList(SERIAL_HANDLER h, int number,
const char *variable, const char *serial_name);
ARCS_ABI int serialReadString(SERIAL_HANDLER h, const char *variable,
const char *serial_name, const char *prefix,
const char *suffix, BOOL interpret_escape);
ARCS_ABI int serialSendByte(SERIAL_HANDLER h, char value,
const char *serial_name);
ARCS_ABI int serialSendInt(SERIAL_HANDLER h, int value,
const char *serial_name);
ARCS_ABI int serialSendLine(SERIAL_HANDLER h, const char *str,
const char *serial_name);
ARCS_ABI int serialSendString(SERIAL_HANDLER h, const char *str,
const char *serial_name);
ARCS_ABI int serialSendAllString(SERIAL_HANDLER h, BOOL is_check,
const char *str, const char *serial_name);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,38 @@
#ifndef AUBO_SDK_Socket_C_H
#define AUBO_SDK_Socket_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI int socketOpen(SOCKET_HANDLER h, const char *address, int port,
const char *socket_name);
ARCS_ABI int socketClose(SOCKET_HANDLER h, const char *socket_name);
ARCS_ABI int socketReadAsciiFloat(SOCKET_HANDLER h, int number,
const char *variable,
const char *socket_name);
ARCS_ABI int socketReadBinaryInteger(SOCKET_HANDLER h, int number,
const char *variable,
const char *socket_name);
ARCS_ABI int socketReadByteList(SOCKET_HANDLER h, int number,
const char *variable, const char *socket_name);
ARCS_ABI int socketReadString(SOCKET_HANDLER h, const char *variable,
const char *socket_name, const char *prefix,
const char *suffix, BOOL interpret_escape);
ARCS_ABI int socketReadAllString(SOCKET_HANDLER h, const char *variable,
const char *socket_name);
ARCS_ABI int socketSendByte(SOCKET_HANDLER h, char value,
const char *socket_name);
ARCS_ABI int socketSendInt(SOCKET_HANDLER h, int value,
const char *socket_name);
ARCS_ABI int socketSendLine(SOCKET_HANDLER h, const char *str,
const char *socket_name);
ARCS_ABI int socketSendString(SOCKET_HANDLER h, const char *str,
const char *socket_name);
ARCS_ABI int socketSendAllString(SOCKET_HANDLER h, BOOL is_check,
const char *str, const char *socket_name);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,22 @@
#ifndef AUBO_SDK_SyncMove_C_H
#define AUBO_SDK_SyncMove_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI int syncMoveOn(SYNC_MOVE_HANDLER h, const char *syncident,
const char **taskset);
ARCS_ABI BOOL syncMoveSegment(SYNC_MOVE_HANDLER h, int id);
ARCS_ABI int syncMoveOff(SYNC_MOVE_HANDLER h, const char *syncident);
ARCS_ABI int syncMoveUndo(SYNC_MOVE_HANDLER h);
ARCS_ABI int waitSyncTasks(SYNC_MOVE_HANDLER h, const char *syncident,
const char **taskset);
ARCS_ABI BOOL isSyncMoveOn(SYNC_MOVE_HANDLER h);
ARCS_ABI int syncMoveSuspend(SYNC_MOVE_HANDLER h);
ARCS_ABI int syncMoveResume(SYNC_MOVE_HANDLER h);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,18 @@
#ifndef AUBO_SDK_SystemInfo_C_H
#define AUBO_SDK_SystemInfo_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI int getControlSoftwareVersionCode(SYSTEM_INFO_HANDLER h);
ARCS_ABI int getControlSoftwareFullVersion(SYSTEM_INFO_HANDLER h, char *result);
ARCS_ABI int getInterfaceVersionCode(SYSTEM_INFO_HANDLER h);
ARCS_ABI int getControlSoftwareBuildDate(SYSTEM_INFO_HANDLER h, char *result);
ARCS_ABI int getControlSoftwareVersionHash(SYSTEM_INFO_HANDLER h, char *result);
ARCS_ABI uint64_t getControlSystemTime(SYSTEM_INFO_HANDLER h);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,20 @@
#ifndef AUBO_SDK_Trace_C_H
#define AUBO_SDK_Trace_C_H
#include <aubo_sdk/type_def_c.h>
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI int alarm(TRACE_HANDLER h, TraceLevel_C level, int code,
const char **args);
ARCS_ABI int popup(TRACE_HANDLER h, TraceLevel_C level, const char *title,
const char *msg, int mode);
ARCS_ABI int textmsg(TRACE_HANDLER h, const char *msg);
ARCS_ABI int notify(TRACE_HANDLER h, const char *msg);
ARCS_ABI int peek(TRACE_HANDLER h, uint64_t num, uint64_t last_time,
struct RobotMsg_C *result);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,800 @@
#ifndef AUBO_SDK_TYPE_DEF_C_H
#define AUBO_SDK_TYPE_DEF_C_H
#include <stdint.h>
#include <string.h>
#include <aubo/global_config.h>
#ifdef _MSC_VER
// MSVC /utf-8 or /execution-charset is set by the project;
// #pragma execution_character_set is not supported in that mode.
// (See MSVC error C3437)
//#pragma execution_character_set("utf-8")
#endif
/// Cartesion degree of freedom, 6 for x,y,z,rx,ry,rz
#define CARTESIAN_DOF 6
#define SAFETY_PARAM_SELECT_NUM 2 /// normal + reduced
#define SAFETY_PLANES_NUM 8 /// 安全平面的数量
#define SAFETY_CUBIC_NUM 10 /// 安全立方体的数量
#define TOOL_CONFIGURATION_NUM 3 /// 工具配置数量
#define MAX_DOF 7 /// 工具配置数量
#define TRUE 1
#define FALSE 0
typedef uint8_t BOOL;
typedef double Vector3d_C[3];
typedef double Vector4d_C[4];
typedef float Vector3f_C[3];
typedef float Vector4f_C[4];
typedef float Vector6f_C[6];
typedef void *RPC_HANDLER;
typedef void *RTDE_HANDLE;
typedef void *INPUT_PARSER_HANDLE;
typedef void *OUTPUT_BUILDER_HANDLE;
typedef void *MATH_HANDLER;
typedef void *SYSTEM_INFO_HANDLER;
typedef void *RUNTIME_MACHINE_HANDLER;
typedef void *REGISTER_CONTROL_HANDLER;
typedef void *RUNTIME_MACHINE_HADNLER;
typedef void *ROBOT_HANDLER;
typedef void *AXIS_HANDLER;
typedef void *SOCKET_HANDLER;
typedef void *SERIAL_HANDLER;
typedef void *SYNC_MOVE_HANDLER;
typedef void *TRACE_HANDLER;
typedef void *FORCE_CONTROL_HANDLER;
typedef void *IO_CONTROL_HANDLER;
typedef void *MOTION_CONTROL_HANDLER;
typedef void *ROBOT_ALGORITHM_HANDLER;
typedef void *ROBOT_MANAGE_HANDLER;
typedef void *ROBOT_CONFIG_HANDLER;
typedef void *ROBOT_STATE_HANDLER;
typedef void (*LOG_HANDLER)(int /*level*/, const char * /*filename*/,
int /*line*/, const char * /*message*/);
typedef void (*EVENT_CALLBACK)(int /*event*/);
struct RobotSafetyParameterRange_C
{
uint32_t crc32{ 0 };
/// 最多可以保存2套参数, 默认使用第 0 套参数
struct
{
float power; ///< sum of joint torques times joint angular speeds
float momentum; ///< 机器人动量限制
float stop_time; ///< 停机时间 ms
float stop_distance; ///< 停机距离 m
float reduced_entry_time; ///< 进入缩减模式的最大时间
float
reduced_entry_distance; ///< 进入缩减模式的最大距离(可由安全平面触发)
float tcp_speed;
float elbow_speed;
float tcp_force;
float elbow_force;
float qmin[MAX_DOF];
float qmax[MAX_DOF];
float qdmax[MAX_DOF];
float joint_torque[MAX_DOF];
Vector3f_C tool_orientation; ///<
float tool_deviation;
Vector4f_C planes[SAFETY_PLANES_NUM]; /// x,y,z,displacement
int restrict_elbow[SAFETY_PLANES_NUM];
} params[SAFETY_PARAM_SELECT_NUM];
/// 8个触发平面
struct
{
Vector4f_C plane; /// x,y,z,displacement
int restrict_elbow;
} trigger_planes[SAFETY_PLANES_NUM];
struct
{
Vector6f_C orig; ///< 立方块的原点 (x,y,z,rx,ry,rz)
Vector3f_C size; ///< 立方块的尺寸 (x,y,z)
int restrict_elbow;
} cubic[SAFETY_CUBIC_NUM]; ///< 10个安全空间
/// 3个工具
Vector4f_C tools[TOOL_CONFIGURATION_NUM]; /// x,y,z,radius
float tool_inclination{ 0. }; ///< 倾角
float tool_azimuth{ 0. }; ///< 方位角
float safety_home[MAX_DOF];
/// 可配置IO的输入输出安全功能配置
uint32_t safety_input_emergency_stop;
uint32_t safety_input_safeguard_stop;
uint32_t safety_input_safeguard_reset;
uint32_t safety_input_auto_safeguard_stop;
uint32_t safety_input_auto_safeguard_reset;
uint32_t safety_input_three_position_switch;
uint32_t safety_input_operational_mode;
uint32_t safety_input_reduced_mode;
uint32_t safety_input_handguide;
uint32_t safety_output_emergency_stop;
uint32_t safety_output_not_emergency_stop;
uint32_t safety_output_robot_moving;
uint32_t safety_output_robot_steady;
uint32_t safety_output_reduced_mode;
uint32_t safety_output_not_reduced_mode;
uint32_t safety_output_safe_home;
uint32_t safety_output_robot_not_stopping;
uint32_t safety_output_safetyguard_stop;
int tp_3pe_for_handguide; ///< 是否将示教器三档位开关作为拖动功能开关
int allow_manual_high_speed; ///< 手动模式下允许高速运行
};
inline void RobotSafetyParameterRange_init(
struct RobotSafetyParameterRange_C *range)
{
memset(range, 0, sizeof(struct RobotSafetyParameterRange_C));
range->tp_3pe_for_handguide = 1;
}
struct WObjectData_C
{
/// 是否为外部工具
bool remote_tool;
/// 工件坐标系耦合的
char attach_frame[100];
/// 用户坐标系
/// 如果 robhold 为 false, 那 uframe 的数值是基于 world
/// 否则uframe 的数值是基于 flange
double user_coord[6];
/// 工件坐标系,基于 uframe
double obj_coord[6];
};
/// 接口函数返回值定义
///
/// 整数为警告负数为错误0为没有错误也没有警告
#define ENUM_AuboErrorCodes_DECLARES \
ENUM_ITEM(AUBO_OK, 0, "Success") \
ENUM_ITEM(AUBO_BAD_STATE, 1, "State error") \
ENUM_ITEM(AUBO_QUEUE_FULL, 2, "Planning queue full") \
ENUM_ITEM(AUBO_BUSY, 3, "The previous command is executing") \
ENUM_ITEM(AUBO_TIMEOUT, 4, "Timeout") \
ENUM_ITEM(AUBO_INVL_ARGUMENT, 5, "Invalid parameters") \
ENUM_ITEM(AUBO_NOT_IMPLETEMENT, 6, "Interface not implemented") \
ENUM_ITEM(AUBO_NO_ACCESS, 7, "Cannot access") \
ENUM_ITEM(AUBO_CONN_REFUSED, 8, "Connection refused") \
ENUM_ITEM(AUBO_CONN_RESET, 9, "Connection is reset") \
ENUM_ITEM(AUBO_INPROGRESS, 10, "Execution in progress") \
ENUM_ITEM(AUBO_EIO, 11, "Input/Output error") \
ENUM_ITEM(AUBO_NOBUFFS, 12, "") \
ENUM_ITEM(AUBO_REQUEST_IGNORE, 13, "Request was ignored") \
ENUM_ITEM(AUBO_ALGORITHM_PLAN_FAILED, 14, \
"Motion planning algorithm error") \
ENUM_ITEM(AUBO_VERSION_INCOMPAT, 15, "Interface version unmatch") \
ENUM_ITEM(AUBO_DIMENSION_ERR, 16, \
"Input parameter dimension is incorrect") \
ENUM_ITEM(AUBO_SINGULAR_ERR, 17, "Input configuration may be singular") \
ENUM_ITEM(AUBO_POS_BOUND_ERR, 18, \
"Input position boundary exceeds the limit range") \
ENUM_ITEM(AUBO_INIT_POS_ERR, 19, "Initial position input is unreasonable") \
ENUM_ITEM(AUBO_ELP_SETTING_ERR, 20, "Envelope body setting error") \
ENUM_ITEM(AUBO_TRAJ_GEN_FAIL, 21, "Trajectory generation failed") \
ENUM_ITEM(AUBO_TRAJ_SELF_COLLISION, 22, "Trajectory self collision") \
ENUM_ITEM( \
AUBO_IK_NO_CONVERGE, 23, \
"Inverse kinematics computation did not converge; computation failed") \
ENUM_ITEM(AUBO_IK_OUT_OF_RANGE, 24, \
"Inverse kinematics result out of robot range") \
ENUM_ITEM(AUBO_IK_CONFIG_DISMATCH, 25, \
"Inverse kinematics input configuration contains errors") \
ENUM_ITEM(AUBO_IK_JACOBIAN_FAILED, 26, \
"The calculation of the inverse Jacobian matrix failed") \
ENUM_ITEM(AUBO_IK_NO_SOLU, 27, \
"The target point has solutions, but it has exceeded the joint " \
"limit conditions") \
ENUM_ITEM(AUBO_IK_UNKOWN_ERROR, 28, "Inverse kinematics unkown error") \
ENUM_ITEM(AUBO_ERR_UNKOWN, 99999, "Unkown error occurred.")
// clang-format off
/**
* The RuntimeState enum
*
*/
#define ENUM_RuntimeState_DECLARES \
ENUM_ITEM(Running, 0, "正在运行中") \
ENUM_ITEM(Retracting, 1, "倒退") \
ENUM_ITEM(Pausing, 2, "暂停中") \
ENUM_ITEM(Paused, 3, "暂停状态") \
ENUM_ITEM(Stepping, 4, "单步执行中") \
ENUM_ITEM(Stopping, 5, "受控停止中(保持原有轨迹)") \
ENUM_ITEM(Stopped, 6, "已停止") \
ENUM_ITEM(Aborting, 7, "停止(最大速度关节运动停机)")
/**
* @brief The RobotModeType enum
*
*
*/
#define ENUM_RobotModeType_DECLARES \
ENUM_ITEM(NoController, -1, "提供给示教器使用的, 如果aubo_control进程崩溃则会显示为NoController") \
ENUM_ITEM(Disconnected, 0, "没有连接到机械臂本体(控制器与接口板断开连接或是 EtherCAT 等总线断开)") \
ENUM_ITEM(ConfirmSafety, 1, "正在进行安全配置, 断电状态下进行") \
ENUM_ITEM(Booting, 2, "机械臂本体正在上电初始化") \
ENUM_ITEM(PowerOff, 3, "机械臂本体处于断电状态") \
ENUM_ITEM(PowerOn, 4, "机械臂本体上电成功, 刹车暂未松开(抱死), 关节初始状态未获取") \
ENUM_ITEM(Idle, 5, "机械臂上电成功, 刹车暂未松开(抱死), 电机不通电, 关节初始状态获取完成") \
ENUM_ITEM(BrakeReleasing, 6, "机械臂上电成功, 刹车正在松开") \
ENUM_ITEM(BackDrive, 7, "反向驱动:刹车松开, 电机不通电") \
ENUM_ITEM(Running, 8, "机械臂刹车松开, 运行模式, 控制权由硬件移交给软件") \
ENUM_ITEM(Maintaince, 9, "维护模式: 包括固件升级、参数写入等") \
ENUM_ITEM(Error, 10, "") \
ENUM_ITEM(PowerOffing, 11, "机械臂本体处于断电过程中")
#define ENUM_SafetyModeType_DECLARES \
ENUM_ITEM(Undefined, 0, "安全状态待定") \
ENUM_ITEM(Normal, 1, "正常运行模式") \
ENUM_ITEM(ReducedMode, 2, "缩减运行模式") \
ENUM_ITEM(Recovery, 3, "启动时如果在安全限制之外, 机器人将进入recovery模式") \
ENUM_ITEM(Violation, 4, "超出安全限制(根据安全配置, 例如速度超限等)") \
ENUM_ITEM(ProtectiveStop, 5, "软件触发的停机(保持轨迹, 不抱闸, 不断电)") \
ENUM_ITEM(SafeguardStop, 6, "IO触发的防护停机不保持轨迹, 抱闸, 不断电)") \
ENUM_ITEM(SystemEmergencyStop,7, "系统急停:急停信号由外部输入(可配置输入), 不对外输出急停信号") \
ENUM_ITEM(RobotEmergencyStop, 8, "机器人急停:控制柜急停输入或者示教器急停按键触发, 对外输出急停信号") \
ENUM_ITEM(Fault, 9, "机械臂硬件故障或者系统故障")
//ValidateJointId
/**
* ISO 10218-1:2011(E) 5.7
* Automatic: In automatic mode, the robot shall execute the task programme and
* the safeguarding measures shall be functioning. Automatic operation shall be
* prevented if any stop condition is detected. Switching from this mode shall
* result in a stop.
*/
#define ENUM_OperationalModeType_DECLARES \
ENUM_ITEM(Disabled, 0, "禁用模式: 不使用Operational Mode") \
ENUM_ITEM(Automatic, 1, "自动模式: 机器人正常工作模式, 运行速度不会被限制") \
ENUM_ITEM(Manual, 2, "手动模式: 机器人编程示教模式(T1), 机器人运行速度将会被限制或者机器人程序校验模式(T2)")
/**
* ,
*/
#define ENUM_RobotControlModeType_DECLARES \
ENUM_ITEM(Unknown, 0, "未知的控制模式") \
ENUM_ITEM(Position, 1, "位置控制 movej") \
ENUM_ITEM(Speed, 2, "速度控制 speedj/speedl") \
ENUM_ITEM(Servo, 3, "位置控制 servoj") \
ENUM_ITEM(Freedrive, 4, "拖动示教 freedrive_mode") \
ENUM_ITEM(Force, 5, "末端力控 force_mode") \
ENUM_ITEM(Torque, 6, "关节力矩控制") \
ENUM_ITEM(Collision, 7, "碰撞模式")
#define ENUM_JointServoModeType_DECLARES \
ENUM_ITEM(Unknown, -1, "未知") \
ENUM_ITEM(Open, 0, "开环模式") \
ENUM_ITEM(Current, 1, "电流伺服模式") \
ENUM_ITEM(Velocity, 2, "速度伺服模式") \
ENUM_ITEM(Position, 3, "位置伺服模式") \
ENUM_ITEM(Torque, 4, "力矩伺服模式")
#define ENUM_JointStateType_DECLARES \
ENUM_ITEM(Poweroff, 0, "节点未连接到接口板或者已经断电") \
ENUM_ITEM(Idle, 2, "节点空闲") \
ENUM_ITEM(Fault, 3, "节点错误, 节点停止伺服运动, 刹车抱死") \
ENUM_ITEM(Running, 4, "节点伺服") \
ENUM_ITEM(Bootload, 5, "节点bootloader状态, 暂停一切通讯")
#define ENUM_StandardInputAction_DECLARES \
ENUM_ITEM(Default, 0, "无触发") \
ENUM_ITEM(Handguide, 1, "拖动示教,高电平触发") \
ENUM_ITEM(GoHome, 2, "运动到工程初始位姿,高电平触发") \
ENUM_ITEM(StartProgram, 3, "开始工程,上升沿触发") \
ENUM_ITEM(StopProgram, 4, "停止工程,上升沿触发") \
ENUM_ITEM(PauseProgram, 5, "暂停工程,上升沿触发") \
ENUM_ITEM(PopupDismiss, 6, "消除弹窗,上升沿触发") \
ENUM_ITEM(PowerOn, 7, "机器人上电/松刹车,上升沿触发") \
ENUM_ITEM(PowerOff, 8, "机器人抱死刹车/断电,上升沿触发") \
ENUM_ITEM(ResumeProgram, 9, "恢复工程,上升沿触发") \
ENUM_ITEM(SlowDown1, 10, "机器人减速触发1高电平触发") \
ENUM_ITEM(SlowDown2, 11, "机器人减速触发2高电平触发") \
ENUM_ITEM(SafeStop, 12, "安全停止,高电平触发") \
ENUM_ITEM(RunningGuard, 13, "信号,高电平有效") \
ENUM_ITEM(MoveToFirstPoint, 14, "运动到工程初始位姿,高电平触发") \
ENUM_ITEM(xSlowDown1, 15, "机器人减速触发1低电平触发") \
ENUM_ITEM(xSlowDown2, 16, "机器人减速触发2低电平触发") \
ENUM_ITEM(ConveyorTrack, 17, "传送带检测到物品触发,高电平触发") \
ENUM_ITEM(xConveyorTrack, 18, "传送带检测到物品触发,低电平触发")
#define ENUM_StandardOutputRunState_DECLARES \
ENUM_ITEM(None, 0, "标准输出状态未定义") \
ENUM_ITEM(StopLow, 1, "低电平指示工程停止") \
ENUM_ITEM(StopHigh, 2, "高电平指示机器人停止") \
ENUM_ITEM(RunningHigh, 3, "指示工程正在运行") \
ENUM_ITEM(PausedHigh, 4, "指示工程已经暂停") \
ENUM_ITEM(AtHome, 5, "高电平指示机器人正在拖动") \
ENUM_ITEM(Handguiding, 6, "高电平指示机器人正在拖动") \
ENUM_ITEM(PowerOn, 7, "高电平指示机器人已经上电") \
ENUM_ITEM(RobotEmergencyStop, 8, "高电平指示机器人急停按下") \
ENUM_ITEM(SystemEmergencyStop, 9, "高电平指示外部输入系统急停按下") \
ENUM_ITEM(InternalEmergencyStop, 8, "高电平指示机器人急停按下") \
ENUM_ITEM(ExternalEmergencyStop, 9, "高电平指示外部输入系统急停按下") \
ENUM_ITEM(SystemError, 10, "系统错误,包括故障、超限、急停、安全停止、防护停止 ") \
ENUM_ITEM(NotSystemError, 11, "无系统错误,包括普通模式、缩减模式和恢复模式 ") \
ENUM_ITEM(RobotOperable, 12, "机器人可操作,机器人上电且松刹车了 ")
#define ENUM_SafetyInputAction_DECLARES \
ENUM_ITEM(Unassigned, 0, "安全输入未分配动作") \
ENUM_ITEM(EmergencyStop, 1, "安全输入触发急停") \
ENUM_ITEM(SafeguardStop, 2, "安全输入触发防护停止, 边沿触发") \
ENUM_ITEM(SafeguardReset, 3, "安全输入触发防护重置, 边沿触发") \
ENUM_ITEM(ThreePositionSwitch, 4, "3档位使能开关") \
ENUM_ITEM(OperationalMode, 5, "切换自动模式和手动模式") \
ENUM_ITEM(HandGuide, 6, "拖动示教") \
ENUM_ITEM(ReducedMode, 7, "安全参数切换1(缩减模式)序号越低优先级越高三路输出都无效时选用第0组安全参数") \
ENUM_ITEM(AutomaticModeSafeguardStop, 8, "自动模式下防护停机输入(需要配置三档位使能设备)") \
ENUM_ITEM(AutomaticModeSafeguardReset, 9, "自动模式下上升沿触发防护重置(需要配置三档位使能设备)")
#define ENUM_SafetyOutputRunState_DECLARES \
ENUM_ITEM(Unassigned, 0, "安全输出未定义") \
ENUM_ITEM(SystemEmergencyStop, 1, "输出高当有机器人急停输入或者急停按键被按下") \
ENUM_ITEM(NotSystemEmergencyStop, 2, "输出低当有机器人急停输入或者急停按键被按下") \
ENUM_ITEM(RobotMoving, 3, "输出高当有关节运动速度超过 0.1rad/s") \
ENUM_ITEM(RobotNotMoving, 4, "输出高当所有的关节运动速度不超过 0.1rad/s") \
ENUM_ITEM(ReducedMode, 5, "输出高当机器人处于缩减模式") \
ENUM_ITEM(NotReducedMode, 6, "输出高当机器人不处于缩减模式") \
ENUM_ITEM(SafeHome, 7, "输出高当机器人已经处于安全Home位姿") \
ENUM_ITEM(RobotNotStopping, 8, "输出低当机器人正在急停或者安全停止中")
#define ENUM_PayloadIdentifyMoveAxis_DECLARES \
ENUM_ITEM(Joint_2_6, 0,"第2和6关节运动") \
ENUM_ITEM(Joint_3_6, 1,"第3和6关节运动") \
ENUM_ITEM(Joint_4_6, 2,"第4和6关节运动") \
ENUM_ITEM(Joint_4_5_6, 3,"第4、5、6关节运动") \
#define ENUM_EnvelopingShape_DECLARES \
ENUM_ITEM(Cube, 1,"立方体") \
ENUM_ITEM(Column, 2,"柱状体") \
ENUM_ITEM(Stl, 3,"以STL文件的形式描述负载碰撞集合体")
#define ENUM_TaskFrameType_DECLARES \
ENUM_ITEM(NONE, 0,"") \
ENUM_ITEM(POINT_FORCE, 1, "力控坐标系发生变换, 使得力控参考坐标系的y轴沿着机器人TCP指向力控所选特征的原点, x和z轴取决于所选特征的原始方向" \
"力控坐标系发生变换, 使得力控参考坐标系的y轴沿着机器人TCP指向力控所选特征的原点, x和z轴取决于所选特征的原始方向" \
"机器人TCP与所选特征的起点之间的距离至少为10mm" \
"优先选择X轴, 为所选特征的X轴在力控坐标系Y轴垂直平面上的投影, 如果所选特征的X轴与力控坐标系的Y轴平行, " \
"通过类似方法确定力控坐标系Z轴, Y-X或者Y-Z轴确定之后, 通过右手法则确定剩下的轴") \
ENUM_ITEM(FRAME_FORCE, 2,"力控坐标系不发生变换 SIMPLE_FORC") \
ENUM_ITEM(MOTION_FORCE, 3,"力控坐标系发生变换, 使得力控参考坐标系的x轴为机器人TCP速度在所选特征x-y平面上的投影y轴将垂直于机械臂运动, 并在所选特征的x-y平面内")\
ENUM_ITEM(TOOL_FORCE, 4,"以工具末端坐标系作为力控参考坐标系")
#ifdef ERROR
#undef ERROR
#endif
#define ENUM_TraceLevel_DECLARES \
ENUM_ITEM(FATAL, 0, "") \
ENUM_ITEM(ERROR, 1, "") \
ENUM_ITEM(WARNING, 2, "") \
ENUM_ITEM(INFO, 3, "") \
ENUM_ITEM(DEBUG, 4, "")
#define ENUM_AxisModeType_DECLARES \
ENUM_ITEM(NoController, -1, "提供给示教器使用的, 如果aubo_control进程崩溃则会显示为NoController") \
ENUM_ITEM(Disconnected, 0, "未连接") \
ENUM_ITEM(PowerOff, 1, "断电") \
ENUM_ITEM(BrakeReleasing, 2, "刹车松开中") \
ENUM_ITEM(Idle, 3, "空闲") \
ENUM_ITEM(Running, 4, "运行中") \
ENUM_ITEM(Fault, 5, "错误状态")
#define ENUM_SafeguedStopType_DECLARES \
ENUM_ITEM(None, 0, "无安全停止") \
ENUM_ITEM(SafeguedStopIOInput, 1, "安全停止(IO输入)") \
ENUM_ITEM(SafeguedStop3PE, 2, "安全停止(三态开关)") \
ENUM_ITEM(SafeguedStopOperational, 3, "安全停止(操作模式)")
#define ENUM_HandleStateType_DECLARES \
ENUM_ITEM(Disconnected, 0, "未连接") \
ENUM_ITEM(Init, 1, "初始化中") \
ENUM_ITEM(Connected, 2, "已连接") \
ENUM_ITEM(Lock, 3, "锁定") \
ENUM_ITEM(Fault, 4, "错误状态")
#define ENUM_HandleModeType_DECLARES \
ENUM_ITEM(None, 0, "不支持手柄") \
ENUM_ITEM(Default, 1, "S等系列默认手柄") \
ENUM_ITEM(MultiFuncG1, 2, "G系列第一代多功能手柄")
#define ENUM_RobotIOType_DECLARES \
ENUM_ITEM(IONone, 0, "无IO") \
ENUM_ITEM(StandardDigitalOutput, 1, "标准数字输出IO") \
ENUM_ITEM(ToolDigitalOutput, 2, "工具端数字输出IO") \
ENUM_ITEM(ConfigurableDigitalOutput, 3, "可配置数字输出IO") \
ENUM_ITEM(StandardDigitalInput, 4, "标准数字输入IO") \
ENUM_ITEM(ToolDigitalInput, 5, "工具端数字输入IO") \
ENUM_ITEM(ConfigurableDigitalInput, 6, "可配置数字输入IO") \
ENUM_ITEM(StandardAnalogOutput, 7, "标准模拟输出IO") \
ENUM_ITEM(ToolAnalogOutput, 8, "工具端模拟输出IO") \
ENUM_ITEM(StandardAnalogInput, 9, "标准模拟输入IO") \
ENUM_ITEM(ToolAnalogInput, 10, "工具端模拟输入IO")
// clang-format on
#define ENUM_ITEM(c, n, ...) c = n,
enum AuboErrorCodes_C : int
{
ENUM_AuboErrorCodes_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) RuntimeState_##c = n,
enum RuntimeState_C : int
{
ENUM_RuntimeState_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) RobotModeType_##c = n,
enum RobotModeType_C : int
{
ENUM_RobotModeType_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) AxisModeType_##c = n,
enum AxisModeType_C : int
{
ENUM_AxisModeType_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) SafetyModeType_##c = n,
enum SafetyModeType_C : int
{
ENUM_SafetyModeType_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) OperationalModeType_##c = n,
enum OperationalModeType_C : int
{
ENUM_OperationalModeType_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) RobotControlModeType_##c = n,
enum RobotControlModeType_C : int
{
ENUM_RobotControlModeType_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) JointServoModeType_##c = n,
enum JointServoModeType_C : int
{
ENUM_JointServoModeType_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) JointStateType_##c = n,
enum JointStateType_C : int
{
ENUM_JointStateType_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) StandardOutputRunState_##c = n,
enum StandardOutputRunState_C : int
{
ENUM_StandardOutputRunState_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) StandardInputAction_##c = n,
enum StandardInputAction_C : int
{
ENUM_StandardInputAction_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) SafetyInputAction_##c = n,
enum SafetyInputAction_C : int
{
ENUM_SafetyInputAction_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) SafetyOutputRunState_##c = n,
enum SafetyOutputRunState_C : int
{
ENUM_SafetyOutputRunState_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) TaskFrameType_##c = n,
enum TaskFrameType_C
{
ENUM_TaskFrameType_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) EnvelopingShape_##c = n,
enum EnvelopingShape_C : int
{
ENUM_EnvelopingShape_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) PayloadIdentifyMoveAxis_##c = n,
enum PayloadIdentifyMoveAxis_C : int
{
ENUM_PayloadIdentifyMoveAxis_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) TraceLevel_##c = n,
enum TraceLevel_C
{
ENUM_TraceLevel_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) SafeguedStopType_##c = n,
enum SafeguedStopType_C : int
{
ENUM_SafeguedStopType_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) HandleStateType_##c = n,
enum class HandleStateType_C : int
{
ENUM_HandleStateType_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) HandleModeType_##c = n,
enum class HandleModeType_C : int
{
ENUM_HandleModeType_DECLARES
};
#undef ENUM_ITEM
#define ENUM_ITEM(c, n, ...) RobotIOType_##c = n,
enum class RobotIOType_C : int
{
ENUM_RobotIOType_DECLARES
};
#undef ENUM_ITEM
enum ForceControlState_C
{
ForceControlState_Stopped,
ForceControlState_Starting,
ForceControlState_Stropping,
ForceControlState_Running
};
enum RefFrameType_C
{
RefFrameType_None, ///
RefFrameType_Tool, ///< 工具坐标系
RefFrameType_Path, ///< 轨迹坐标系
RefFrameType_Base ///< 基坐标系
};
/// 圆周运动参数定义
struct CircleParameters_C
{
double pose_via[6]; ///< 圆周运动途中点的位姿
double pose_to[6]; ///< 圆周运动结束点的位姿
double a; ///< 加速度, 单位: m/s^2
double v; ///< 速度,单位: m/s
double blend_radius; ///< 交融半径,单位: m
double duration; ///< 运行时间,单位: s
double helix;
double spiral;
double direction;
int loop_times; ///< 暂不支持
};
struct SpiralParameters_C
{
double frame[6]; ///< 参考点,螺旋线的中心点和参考坐标系
int plane; ///< 参考平面选择 0-XY 1-YZ 2-ZX
double angle; ///< 转动的角度,如果为正数,机器人逆时针旋转
double spiral; ///< 正数外扩
double helix; ///< 正数上升
};
struct Enveloping_C
{
EnvelopingShape_C shape; // 包络体形状
double ep_args
[6]; // 包络体组合shape为None或Stl时无需对ep_args赋值;
// shape为Cube时ep_args有9个元素分别为xmin,xmax,ymin,ymax,zmin,zmax,rx,ry,rz;
// shape为Column时ep_args有5个元素分别为radius,height,rx,ry,rz;
char stl_path[100]; // stl的路径(绝对路径)stl文件需为二进制文件,
// shape设置为Stl时此项生效
};
/// 用于负载辨识的轨迹配置
struct TrajConfig_C
{
Enveloping_C *envelopings; // 包络体组合
PayloadIdentifyMoveAxis_C move_axis; // 运动的轴(ID), 下标从0开始
double init_joint[MAX_DOF]; // 关节初始位置
double upper_joint_bound[MAX_DOF]; // 运动轴上限
double lower_joint_bound[MAX_DOF]; // 运动轴下限
double max_velocity; // 关节运动的最大速度默认值为 3.0
double max_acceleration; // 关节运动的最大加速度默认值为 5.0
};
struct DHParam_C
{
double theta[6];
double beta[6];
double d[6];
double a[6];
double alpha[6];
};
struct DHComp_C
{
double theta_comp[6];
double beta_comp[6];
double d_comp[6];
double a_comp[6];
double alpha_comp[6];
};
struct Payload_C
{
double mass;
double cog[3];
double aom[3];
double inertia[6];
};
struct PlanContext_C
{
int tid;
int lineno;
char comment[100];
};
struct ExecutionStatus_C
{
char name[100];
char status[100];
};
struct ExecutionStatus1_C
{
char name[100];
char status[100];
int retval;
};
struct UpdateProcess_C
{
char name[100];
int process;
};
struct WorkObjectHold_C
{
char module_name[100];
double mounting_pose[][6];
};
struct ForceSensorCalibResult_C
{
double force_offset[6];
double com[3];
double mass;
double angle[6];
};
// 动力学模型m,d,k
struct DynamicsModel_C
{
double m[6];
double d[6];
double k[6];
};
struct RobotMsg_C
{
uint64_t timestamp; ///< 时间戳,即系统时间
TraceLevel_C level; ///< 日志等级
int code; ///< 错误码
char source[100]; ///< 发送消息的机器人别名 alias
///< 可在 /root/arcs_ws/config/aubo_control.conf
///< 配置文件中查到机器人的alias
char **args; ///< 机器人参数(指针数组)
int args_count; ///< 参数数量
};
struct RobotMsgVector_C
{
struct RobotMsg_C *data; // 数组指针
int size; // 数组元素个数
};
/// RTDE菜单
struct RtdeRecipe_C
{
bool to_server; ///< 输入/输出
int chanel; ///< 通道
double frequency; ///< 更新频率
int trigger; ///< 触发方式(该功能暂未实现): 0 - 周期; 1 - 变化
char **segments; ///< 字段列表
int segments_count; ///< 字段数量
};
/// 异常类型
enum error_type_C
{
parse_error = -32700, ///< 解析错误
invalid_request = -32600, ///< 无效请求
method_not_found = -32601, ///< 方法未找到
invalid_params = -32602, ///< 无效参数
internal_error = -32603, ///< 内部错误
server_error = -32500, ///< 服务器错误
invalid = -32400 ///< 无效
};
/// 异常码
enum ExceptionCode_C
{
EC_DISCONNECTED = -1, ///< 断开连接
EC_NOT_LOGINED = -2, ///< 未登录
EC_INVAL_SOCKET = -3, ///< 无效套接字
EC_REQUEST_BUSY = -4, ///< 请求繁忙
EC_SEND_FAILED = -5, ///< 发送失败
EC_RECV_TIMEOUT = -6, ///< 接收超时
EC_RECV_ERROR = -7, ///< 接收错误
EC_PARSE_ERROR = -8, ///< 解析错误
EC_INVALID_REQUEST = -9, ///< 无效请求
EC_METHOD_NOT_FOUND = -10, ///< 方法未找到
EC_INVALID_PARAMS = -11, ///< 无效参数
EC_INTERNAL_ERROR = -12, ///< 内部错误
EC_SERVER_ERROR = -13, ///< 服务器错误
EC_INVALID = -14 ///< 无效
};
inline const char *returnValue2Str(int retval)
{
static const char *retval_str[] = {
#define ENUM_ITEM(n, v, s) s,
ENUM_AuboErrorCodes_DECLARES
#undef ENUM_ITEM
};
enum arcs_index_C
{
#define ENUM_ITEM(n, v, s) n##_INDEX,
ENUM_AuboErrorCodes_DECLARES
#undef ENUM_ITEM
};
int index = -1;
#define ENUM_ITEM(n, v, s) \
if (retval == v) \
index = n##_INDEX;
ENUM_AuboErrorCodes_DECLARES
#undef ENUM_ITEM
if (index == -1)
{
index = AUBO_ERR_UNKOWN;
}
return retval_str[(unsigned)index];
}
#endif // AUBO_SDK_TYPE_DEF_C_H

View File

@ -0,0 +1,72 @@
#include <array>
namespace arcs {
namespace research_interface {
#pragma pack(push, 1)
/// 机器人状态
struct RobotState
{
uint64_t message_id;
int dof;
/// 机器人状态
int robot_mode;
/// 安全状态
int safety_mode;
/// 错误代码(针对这个科研接口)
int error_code;
uint32_t tool_io;
uint32_t standard_di;
uint32_t standard_do;
uint32_t config_di;
uint32_t config_do;
std::array<double, 4> analog_in;
std::array<double, 4> analog_out;
std::array<double, 4> tool_analog_in;
/// 关节的实际状态
std::array<double, 7> q, qd, qdd, current, friction, voltage;
/// 关节的目标状态
std::array<double, 7> target_q, target_qd, target_qdd, target_current;
std::array<double, 6> pose, target_pose;
std::array<double, 6> tcp_offset;
std::array<double, 7> temperature;
/// 基于法兰坐标系的力
std::array<double, 6> tcp_force;
/// 负载参数
struct
{
double mass;
std::array<double, 3> cog;
} payload;
};
/// 机器人指令
struct RobotCommand
{
uint64_t message_id;
/// 目标模式
int target_mode;
/// 指令关节角度
std::array<double, 7> cmd_q, cmd_qd, cmd_current;
/// 指令位姿
std::array<double, 6> cmd_pose;
bool finished;
};
#pragma pack(pop)
} // namespace research_interface
} // namespace arcs

View File

@ -0,0 +1,71 @@
#ifndef ARCS_RESEARCH_INTERFACE_ROBOT_H
#define ARCS_RESEARCH_INTERFACE_ROBOT_H
#include <functional>
#include <atomic>
#include <aubo/global_config.h>
#include <research_interface/rci_types.h>
#include <stdexcept>
#include "aubo_sdk/rpc.h"
namespace arcs {
namespace research_interface {
struct JointPositions
{
JointPositions() {}
JointPositions(const std::array<double, 7> &joint_positions)
: q(joint_positions)
{
}
JointPositions(std::initializer_list<double> joint_positions)
{
if (joint_positions.size() != q.size()) {
throw std::invalid_argument(
"Invalid number of elements in joint_positions.");
}
std::copy(joint_positions.begin(), joint_positions.end(), q.begin());
}
std::array<double, 7> q{};
bool finished{ false };
};
class ARCS_ABI Robot
{
public:
Robot(const std::string &ip, int port = 30030);
~Robot();
// 启动机器人
int startup();
int setControlPeriod(int period = 5000);
int movej(const JointPositions &jnt_pos);
// 位置控制
void control(
std::function<JointPositions(const RobotState &, double duration)>
control_callback,
bool limit_rate = false, double cutoff_frequency = 100,
bool loop = false);
// 实时读取机器人的状态
void read(std::function<bool(const RobotState &)> read_callback);
// 开始轨迹记录
int startRecord(std::string csv_file);
// 停止轨迹记录
int stopRecord();
protected:
void *d_{ nullptr };
bool init_{ false };
};
} // namespace research_interface
} // namespace arcs
#endif

View File

@ -0,0 +1,504 @@
#ifndef AUBO_SCOPE_REALTIME_ROBOT_STATE_H
#define AUBO_SCOPE_REALTIME_ROBOT_STATE_H
#include <QObject>
#include <mutex>
#include <aubo_sdk/rpc.h>
#include <aubo_sdk/rtde.h>
namespace arcs {
namespace aubo_sdk {
using namespace common_interface;
struct RobotInfo
{
std::string robot_type_;
std::string robot_subtype_;
std::string cb_type_;
int dof_{ 6 };
Payload actual_payload_{ 0., std::vector<double>(3, 0.),
std::vector<double>(3, 0.),
std::vector<double>(9, 0.) };
std::vector<double> actual_q_{ std::vector<double>(6, 0.) };
std::vector<double> actual_current_{ std::vector<double>(6, 0.) };
std::vector<double> actual_TCP_pose_{ std::vector<double>(6, 0.) };
std::vector<double> actual_TCP_speed_{ std::vector<double>(6, 0.) };
std::vector<double> actual_tool_pose_{ std::vector<double>(6, 0.) };
std::vector<double> actual_tcp_force_{ std::vector<double>(6, 0.) };
std::vector<double> actual_tcp_force_sensor_{ std::vector<double>(6, 0.) };
std::vector<double> joint_voltages_{ std::vector<double>(6, 0.) };
std::vector<double> joint_temperatures_{ std::vector<double>(6, 0.) };
std::vector<JointStateType> joint_mode_{ std::vector<JointStateType>(
6, JointStateType::Idle) };
RobotModeType robot_mode_{ RobotModeType::NoController };
SafetyModeType safety_mode_{ SafetyModeType::Normal };
OperationalModeType operational_mode_{ OperationalModeType::Disabled };
HandleStateType handle_state_{ HandleStateType::Disconnected };
HandleModeType handle_mode_{ HandleModeType::None };
bool link_mode_{ false };
bool freedrive_enabled_{ false };
double actual_main_voltage_{ 0 };
double actual_robot_voltage_{ 0 };
double actual_robot_current_{ 0 };
double cb_temperature_{ 0 };
double cb_humidity_{ 0 };
int collision_level_{ 0 };
int slow_down_level_{ 0 };
std::string tool_uuid_;
std::string mb_uuid_;
std::string sb_uuid_;
std::string pedestal_uuid_;
std::vector<std::string> joint_uuids_;
std::string handle_uuid_;
std::string hardware_interface_verion_{ "" };
std::vector<int> joint_fw_;
std::vector<int> joint_hw_;
int tool_fw_;
int tool_hw_;
int m_ifb_fw_;
int m_ifb_hw_;
int s_ifb_fw_;
int s_ifb_hw_;
int pedestal_fw_;
int pedestal_hw_;
int handle_fw_;
int handle_hw_;
int standardDigitalInputNum_{ 0 };
int toolDigitalInputNum_{ 0 };
int configurableDigitalInputNum_{ 0 };
int standardDigitalOutputNum_{ 0 };
int toolDigitalOutputNum_{ 0 };
int configurableDigitalOutputNum_{ 0 };
int standardAnalogInputNum_{ 0 };
int toolAnalogInputNum_{ 0 };
int standardAnalogOutputNum_{ 0 };
int toolAnalogOutputNum_{ 0 };
int staticLinkInputNum_{ 0 };
int staticLinkOutputNum_{ 0 };
std::unordered_map<std::string, std::vector<double>> dh_;
std::unordered_map<std::string, std::vector<double>> threory_dh_;
std::vector<bool> standard_digital_input_data_{ std::vector<bool>(64,
false) };
std::vector<bool> tool_digital_input_data_{ std::vector<bool>(64, false) };
std::vector<bool> configurable_digital_input_data_{ std::vector<bool>(
64, false) };
std::vector<bool> link_digital_input_data_{ std::vector<bool>(64, false) };
std::vector<bool> standard_digital_output_data_{ std::vector<bool>(64,
false) };
std::vector<bool> tool_digital_output_data_{ std::vector<bool>(64, false) };
std::vector<bool> configurable_digital_output_data_{ std::vector<bool>(
64, false) };
std::vector<bool> link_digital_output_data_{ std::vector<bool>(64, false) };
std::vector<double> standard_analog_input_data_;
std::vector<double> tool_analog_input_data_;
std::vector<double> standard_analog_output_data_;
std::vector<double> tool_analog_output_data_;
std::vector<std::string> joints_model_type_;
std::vector<double> joint_max_positions_{ std::vector<double>(6, 0.) };
std::vector<double> joint_min_positions_{ std::vector<double>(6, 0.) };
std::vector<double> joint_max_speeds_{ std::vector<double>(6, 0.) };
std::vector<double> joint_max_accelerations_{ std::vector<double>(6, 0.) };
std::vector<double> tcp_max_speeds_{ std::vector<double>(6, 0.) };
std::vector<double> tcp_max_accelerations_{ std::vector<double>(6, 0.) };
std::vector<double> gravity_{ std::vector<double>{ 0, 0, -9.81 } };
bool simulation_enabled_{ false };
double speed_fraction_{ 0 };
quint32 handle_io_status_{ 0 };
std::vector<int> enc_tick_count_;
};
class ARCS_ABI RealtimeRobotState : public QObject
{
Q_OBJECT
friend class RobotProxy;
public:
RealtimeRobotState(RpcClientPtr client, RtdeClientPtr rtde);
~RealtimeRobotState();
int updateRobotInformationOnLogin();
int updateRobotInformationOnPoweron(int robot_index = -1);
int updateHDParamOnRobotTypeChanged(int robot_index = -1);
std::vector<std::string> getRobotNames() const;
int getLineNumber();
/// 弃用,只能返回主线程号
ARCS_DEPRECATED int getThreadID();
RuntimeState getRuntimeState();
int getDof();
bool isSimulationEnabled();
double getSpeedFraction();
std::string getRobotType() const;
std::string getRobotSubType() const;
std::string getControlBoxType() const;
OperationalModeType getOperationalMode() const;
bool isLinkModeEnabled() const;
bool isFreedriveEnabled() const;
int getSlowDownLevel() const;
int updateOperationMode(int robot_index);
int updateIsLinkModeEnabled(int robot_index);
// 获取机器人的模式状态
RobotModeType getRobotModeType();
// 获取安全模式
SafetyModeType getSafetyModeType();
// 获取手柄类型
HandleModeType getHandleModeType();
// 获取手柄状态
HandleStateType getHandleStateType();
// 获取TCP的位姿
std::vector<double> getTcpPose();
// 获取工具端的位姿不带TCP偏移
std::vector<double> getToolPose();
// 获取TCP速度
std::vector<double> getTcpSpeed();
// 获取TCP的力/力矩
std::vector<double> getTcpForce();
std::vector<double> getTcpForce(const std::vector<double> &pose);
std::vector<double> getTcpForceSensor();
// 获取肘部的位置
std::vector<double> getElbowPosistion();
// 获取肘部速度
std::vector<double> getElbowVelocity();
// 获取基座力/力矩
std::vector<double> getBaseForce();
// 获取TCP目标位姿
std::vector<double> getTcpTargetPose();
// 获取TCP目标速度
std::vector<double> getTcpTargetSpeed();
// 获取TCP目标力/力矩
std::vector<double> getTcpTargetForce();
// 获取机械臂关节标志接口
std::vector<JointStateType> getJointState();
// 获取关节的伺服状态
std::vector<JointServoModeType> getJointServoMode();
// 获取实际负载
Payload getPayload();
// 获取机械臂关节角度接口
std::vector<double> getJointPositions();
// 获取机械臂关节速度接口
std::vector<double> getJointSpeeds();
// 获取机械臂关节加速度接口
std::vector<double> getJointAccelerations();
// 获取机械臂关节力矩接口
std::vector<double> getJointTorqueSensors();
// 获取底座力传感器读数
std::vector<double> getBaseForceSensor();
// 获取TCP力传感器读数
std::vector<double> getTcpForceSensors();
// 获取机械臂关节电流接口
std::vector<double> getJointCurrents();
// 获取机械臂关节电压接口
std::vector<double> getJointVoltages();
// 获取机械臂关节温度接口
std::vector<double> getJointTemperatures();
// 获取关节固件版本
std::vector<int> getJointFirmwareVersions();
// 获取关节硬件版本
std::vector<int> getJointHardwareVersions();
std::string getToolUniqueId();
std::string getMasterBoardUniqueId();
std::string getSlaveBoardUniqueId();
std::string getPedestalUniqueId();
std::string getHandleUniqueId();
std::vector<std::string> getJointUniqueIds();
int getEncTickCount(int index);
// 获取新老协议区分
std::string getHardwareInterfaceVersion();
// 获取 MasterBoard 固件版本
int getMasterBoardFirmwareVersion();
// 获取 MasterBoard 硬件版本
int getMasterBoardHardwareVersion();
// 获取 SlaveBoard 固件版本
int getSlaveBoardFirmwareVersion();
// 获取 SlaveBoard 硬件版本
int getSlaveBoardHardwareVersion();
// 获取工具端固件版本
int getToolFirmwareVersion();
// 获取工具端硬件版本
int getToolHardwareVersion();
// 获取 Pedestal 固件版本
int getPedestalFirmwareVersion();
// 获取 Pedestal 硬件版本
int getPedestalHardwareVersion();
// 获取 Handle 固件版本
int getHandleFirmwareVersion();
// 获取 Handle 硬件版本
int getHandleHardwareVersion();
// 获取机械臂关节目标位置角度接口
std::vector<double> getJointTargetPositions();
// 获取机械臂关节目标速度
std::vector<double> getJointTargetSpeeds();
// 获取机械臂关节目标加速度
std::vector<double> getJointTargetAccelerations();
// 获取机械臂关节目标力矩
std::vector<double> getJointTargetTorques();
// 获取机械臂关节目标电流
std::vector<double> getJointTargetCurrents();
// 获取关节最大位置(物理极限)
std::vector<double> getJointMaxPositions();
// 获取关节最小位置(物理极限)
std::vector<double> getJointMinPositions();
// 获取关节最大速度(物理极限)
std::vector<double> getJointMaxSpeeds();
// 获取关节最大加速度(物理极限)
std::vector<double> getJointMaxAccelerations();
// 获取TCP最大速度物理极限
std::vector<double> getTcpMaxSpeeds();
// 获取TCP最大加速度物理极限
std::vector<double> getTcpMaxAccelerations();
// 获取控制柜温度
double getControlBoxTemperature();
// 获取控制柜湿度
double getControlBoxHumidity();
// 获取母线电压
double getMainVoltage();
// 获取母线电流
double getMainCurrent();
int getCollisionLevel();
// 获取机器人电压
double getRobotVoltage();
// 获取机器人电流
double getRobotCurrent();
// 获取手柄 IO 状态
uint32_t getHandleIoStatus();
int getStandardDigitalInputNum();
int getToolDigitalInputNum();
int getConfigurableDigitalInputNum();
int getStandardDigitalOutputNum();
int getToolDigitalOutputNum();
int getConfigurableDigitalOutputNum();
int getStandardAnalogInputNum();
int getToolAnalogInputNum();
int getStandardAnalogOutputNum();
int getToolAnalogOutputNum();
SafetyInputAction getConfigurableInputAction(int index);
SafetyOutputRunState getConfigurableOutputRunstate(int index);
int setStandardDigitalInputAction(int index, StandardInputAction action);
int setToolDigitalInputAction(int index, StandardInputAction action);
int setConfigurableDigitalInputAction(int index,
StandardInputAction action);
StandardInputAction getStandardDigitalInputAction(int index);
StandardInputAction getToolDigitalInputAction(int index);
StandardInputAction getConfigurableDigitalInputAction(int index);
int setStandardDigitalOutputRunstate(int index,
StandardOutputRunState runstate);
int setToolDigitalOutputRunstate(int index,
StandardOutputRunState runstate);
int setConfigurableDigitalOutputRunstate(int index,
StandardOutputRunState runstate);
StandardOutputRunState getStandardDigitalOutputRunstate(int index);
StandardOutputRunState getToolDigitalOutputRunstate(int index);
StandardOutputRunState getConfigurableDigitalOutputRunstate(int index);
int setStandardAnalogOutputRunstate(int index,
StandardOutputRunState runstate);
int setToolAnalogOutputRunstate(int index, StandardOutputRunState runstate);
StandardOutputRunState getStandardAnalogOutputRunstate(int index);
StandardOutputRunState getToolAnalogOutputRunstate(int index);
int setStandardAnalogInputDomain(int index, int domain);
int setToolAnalogInputDomain(int index, int domain);
int getStandardAnalogInputDomain(int index);
int getToolAnalogInputDomain(int index);
int setStandardAnalogOutputDomain(int index, int domain);
int setToolAnalogOutputDomain(int index, int domain);
int getStandardAnalogOutputDomain(int index);
int getToolAnalogOutputDomain(int index);
int setStandardDigitalOutput(int index, bool value);
int setToolDigitalOutput(int index, bool value);
int setConfigurableDigitalOutput(int index, bool value);
int setStandardAnalogOutput(int index, double value);
int setToolAnalogOutput(int index, double value);
bool getStandardDigitalInput(int index);
bool getToolDigitalInput(int index);
bool getConfigurableDigitalInput(int index);
bool getStandardDigitalOutput(int index);
bool getToolDigitalOutput(int index);
bool getConfigurableDigitalOutput(int index);
double getStandardAnalogInput(int index);
double getToolAnalogInput(int index);
double getStandardAnalogOutput(int index);
double getToolAnalogOutput(int index);
int getStaticLinkInputNum();
int getStaticLinkOutputNum();
bool getStaticLinkInput(int index);
bool getStaticLinkOutput(int index);
int configSubscribe();
int selectRobot(int index);
void reset();
void updateModbusSignalNames();
void addModbusSignalName(const std::string &name);
void removeModbusSignalName(const std::string &name);
std::vector<std::string> getModbusSignalNames() const;
std::vector<int> getModbusSignalValues() const;
std::vector<int> getModbusSignalErrors() const;
std::vector<double> getGravity();
std::unordered_map<std::string, std::vector<double>> getRealDHParam();
std::unordered_map<std::string, std::vector<double>> getTheoryDHParam();
int updateGravity(int robot_index);
int startTrackRecord(
const std::function<void(const std::vector<double> & /*q*/,
const std::vector<double> & /*pose*/)> &cb,
double interval = 0.1);
int stopTrackRecord();
// 获取关节类型
std::vector<std::string> getJointsModelType();
GripperStatus getGripperStatusDataByName(const std::string &name_id);
common_interface::GripperStatusVector getAllGripperStatusData();
signals:
void interfaceBoardVersionInfoUpdated(int robot_index);
void jointVersionInfoUpdated(int robot_index);
void runtimeStateChanged(arcs::common_interface::RuntimeState state);
void safetyModeChanged(int robot_index,
arcs::common_interface::SafetyModeType mode);
void robotModeChanged(int robot_index,
arcs::common_interface::RobotModeType mode);
private:
RpcClientPtr rpc_client_{ nullptr };
RtdeClientPtr rtde_client_{ nullptr };
mutable std::mutex rtde_mtx_;
std::vector<std::string> names_;
std::string name_;
int robot_index_{ -1 };
int tid_{ -1 };
int line_{ -1 };
RuntimeState runtime_state_{ RuntimeState::Stopped };
std::vector<int> modbus_signals_;
std::vector<int> modbus_signals_errors_;
std::vector<std::string> modbus_names_;
RobotInfo info_[4];
common_interface::GripperStatusVector gripper_status_;
std::function<void(const std::vector<double> &,
const std::vector<double> &)>
track_record_callback_;
int track_record_sample_cnt_{ 0 };
int track_record_sample_index_{ 0 };
};
using RealtimeRobotStatePtr = std::shared_ptr<RealtimeRobotState>;
} // namespace aubo_sdk
} // namespace arcs
#endif

View File

@ -0,0 +1,302 @@
#ifndef AUBO_SCOPE_ROBOT_PROXY_H
#define AUBO_SCOPE_ROBOT_PROXY_H
#include <memory>
#include <vector>
#include <string>
#include <shared_mutex>
#include <QObject>
#include <QMutex>
#include <QMap>
#include <aubo/aubo_api.h>
#include <robot_proxy/realtime_robot_state.h>
namespace arcs {
namespace aubo_sdk {
class RtdeClient;
class ScriptClient;
class RpcClient;
using RtdeClientPtr = std::shared_ptr<RtdeClient>;
using ScriptClientPtr = std::shared_ptr<ScriptClient>;
using RpcClientPtr = std::shared_ptr<RpcClient>;
using arcs::common_interface::ForceControlPtr;
using arcs::common_interface::IoControlPtr;
using arcs::common_interface::MotionControlPtr;
using arcs::common_interface::RegisterControlPtr;
using arcs::common_interface::RobotAlgorithmPtr;
using arcs::common_interface::RobotConfigPtr;
using arcs::common_interface::RobotInterfacePtr;
using arcs::common_interface::RobotManagePtr;
using arcs::common_interface::RobotStatePtr;
using arcs::common_interface::RuntimeMachinePtr;
using arcs::common_interface::SyncMovePtr;
using arcs::common_interface::SystemInfoPtr;
using arcs::common_interface::TracePtr;
using RobotInterface = common_interface::RobotInterface;
/**
*
*/
class ARCS_ABI RobotProxy : public QObject
{
Q_OBJECT
public:
RobotProxy(QObject *parent = NULL);
~RobotProxy();
/// 获取当前机器人的名称
QString getRobotName() const;
/// 获取当前机器人在所有机器人中的索引
int getRobotIndex() const;
/// 获取所有机器人的名字
std::vector<std::string> getRobotNames();
/// 连接到当前机器人
int connect(const QString &ip, int port);
/// 连接到当前机器人
int nonblock_connect(const QString &ip, int port,
std::function<void(bool)> cb);
int nonblock_connect2(const QString &ip, int port,
std::function<void(int)> cb);
/// 登录到当前机器人
int login(const QString &usrname, const QString &passwd);
/// 断开与机器人的连接,如果不指定名称,则断开当前选中的机器人
int disconnectFromServer();
/// 机器人是否已经连接,如果不指定名称,则断开当前选中的机器人
bool hasConnected();
/// 机器人是否已经登录,如果不指定名称,则断开当前选中的机器人
bool hasLogined();
/// 发送脚本程序到当前机器人
int sendScript(const std::string &script);
/// 获取当前机器人的脚本程序
std::string getScript() const;
/// 使用 RealtimeRobotState 中的 getRealDHParam getTheoryDHParam 替代
ARCS_DEPRECATED std::unordered_map<std::string, std::vector<double>> getDH(
bool real = true);
SystemInfoPtr getSystemInfo();
RuntimeMachinePtr getRuntimeMachine();
RegisterControlPtr getRegisterControl();
GripperInterfacePtr getGripperInterface();
/// 获取RobotConfig接口
RobotConfigPtr getRobotConfig();
/// 获取运动规划接口
MotionControlPtr getMotionControl();
/// 获取力控接口
ForceControlPtr getForceControl();
/// 获取IO控制的接口
IoControlPtr getIoControl();
/// 获取同步运动接口
SyncMovePtr getSyncMove();
/// 获取机器人实用算法接口
RobotAlgorithmPtr getRobotAlgorithm();
/// 获取机器人管理接口(上电、启动、停止等)
RobotManagePtr getRobotManage();
/// 获取机器人状态接口
RobotStatePtr getRobotState();
RealtimeRobotStatePtr getRealTimeState();
/// 获取告警信息接口
TracePtr getTrace();
/// 根据机器人名字获取机器人接口
RobotInterfacePtr getRobotInterface(const std::string &name);
/// 切换机器人
int selectRobot(int index);
aubo_sdk::RpcClientPtr getRpcClient();
aubo_sdk::RtdeClientPtr getRtdeClient();
aubo_sdk::ScriptClientPtr getScriptClient();
/// 通过错误码获取消息文本
QString getErrorCodeMsg(int code);
/// 获取 ICM 连接状态
bool icmIsConnected();
/// 获取 Profinet 地址表数据
std::vector<std::vector<uint8_t>> getPnAddressData();
// EIP
/// 获取 EIP 连接状态
int getEipConnected();
/// 获取 EtherNet/IP 地址表数据
std::vector<std::vector<uint8_t>> getEipAddressData();
/// 外部轴
std::vector<std::string> getAxisNames();
AxisInterfacePtr getAxisInterface(const std::string &name);
signals:
// FIXME: 断开连接和登出的信号需要从 RobotProxy 类主动发出
/// 建立连接的信号
void connected(const QString &ip, int port);
/// 断开连接的信号
void disconnected();
/// 登录或者登出
void logined(bool has_login);
/// 弹窗信号
void popup(int robot_index, int level, const QString &title,
const QString &msg, int mode);
/// 解除弹窗信号
void popupDismiss(const QString &src);
/// 从控制器层上传的系统关机信号
void systemHalt(const QString &src);
/// 已弃用,推荐使用下面的重载函数
ARCS_DEPRECATED void scriptError(const QString &);
/// aubo_control 报错
void scriptError(int lineno, const QString &error);
/// 脚本运行报错
void scriptError2(const QString &, const QString &);
/// 脚本运行时里面的变量发生变化
void variableUpdate(const QString &, const QString &);
/// 运行时状态发生变化
void runtimeStateChanged(arcs::common_interface::RuntimeState state);
/// 拖动示教器使能状态切换
void freedriveEnabled(int robot_index, bool enabled);
/// 接收到机器人控制端消息
void robotMessageRecieved(int robot_index, QString src, int level, int code,
const QString &msg);
void robotMessageRecieved(int robot_index, const QString &src, int level,
const RobotMsg &msg);
/// 操作模式切换
void operationalModeChanged(
int robot_index, arcs::common_interface::OperationalModeType mode);
/// 联动模式切换
void linkModeChanged(int robot_index, bool enable);
/// 安全模式切换
void safetyModeChanged(int robot_index,
arcs::common_interface::SafetyModeType mode);
/// 机器人状态切换
void robotModeChanged(int robot_index,
arcs::common_interface::RobotModeType mode);
/// 机器人型号切换
void robotTypeChanged(const QString &type, const QString &subtype);
/// 缓速切换
void slowDownChanged(int robot_index, int level);
/// 运行时上下文更新
void runtimeContextUpdated(int tid, int lineno, int index,
const QString &comment);
void interpContextUpdated(int tid, int lineno, int index,
const QString &comment);
void taskDeleted(int tid);
/// ICM 插件状态变化
void icmStatusChanged(bool status);
/// PNIO 从站数据变化
void pnioDeviceChanged(const QString &name);
void pnioNetworkChanged(const QString &ip, const QString &subnet_mask,
const QString &gateway);
// EIP 连接状态变化
void sigEipConnectionStatusChanged(int);
/// 示教器启用状态变化
void teachPendantEnabledChanged(bool status);
/// Modbus master
void modbusSignalCreated(const QString &name);
void modbusSignalRemoved(const QString &name);
void jointMovedDuringPoweroff(int robot_index);
void robotCollisionOccurred(int robot_index, const QString &msg);
void robotToolSensorChanged(int robot_index, const QString &sensor_id);
void robotToolSensorRemoved(int robot_index);
void robotToolSensorStatusChanged(int robot_index, bool status);
void programLoaded(int robot_index, const QString &program);
private:
RobotInterfacePtr currentRobotRpcInterface();
void robotMessageCallback(InputParser &parser);
void sendDisconnectedSignal();
// Profinet 地址表数据
void initPNCacheData();
void pnValueChanged(const std::vector<std::string> &data);
// EtherNet/IP 地址表数据
void initEIPCacheData();
void eipValueChanged(const std::vector<std::string> &data);
private:
QString name_;
int robot_index_{ -1 };
std::vector<std::string> robot_names_;
std::string ip_;
int port_;
aubo_sdk::RpcClientPtr rpc_client_{ nullptr };
aubo_sdk::RtdeClientPtr rtde_client_{ nullptr };
aubo_sdk::ScriptClientPtr script_client_{ nullptr };
RealtimeRobotStatePtr rt_state_{ nullptr };
bool initiallized_{ false };
QMap<int, QString> script_;
bool icm_connected_{ false };
bool pn_connected_{ false };
std::atomic_int eip_connected_{ 0 };
// Profinet 地址表数据
std::shared_mutex mtx_pn_address_;
std::vector<std::vector<uint8_t>> cache_pn_address_;
// EtherNet/IP 地址表数据
std::shared_mutex mtx_eip_address_;
std::vector<std::vector<uint8_t>> cache_eip_address_;
};
using RobotProxyPtr = std::shared_ptr<RobotProxy>;
} // namespace aubo_sdk
} // namespace arcs
Q_DECLARE_METATYPE(arcs::aubo_sdk::RobotProxyPtr)
#endif

View File

@ -0,0 +1,103 @@
#ifndef ROBOTIOMATETYPE_H
#define ROBOTIOMATETYPE_H
//接口板用户DI 名称定义
#define UESR_IO_DI_00_NAME "U_DI_00"
#define UESR_IO_DI_01_NAME "U_DI_01"
#define UESR_IO_DI_02_NAME "U_DI_02"
#define UESR_IO_DI_03_NAME "U_DI_03"
#define UESR_IO_DI_04_NAME "U_DI_04"
#define UESR_IO_DI_05_NAME "U_DI_05"
#define UESR_IO_DI_06_NAME "U_DI_06"
#define UESR_IO_DI_07_NAME "U_DI_07"
#define UESR_IO_DI_10_NAME "U_DI_10"
#define UESR_IO_DI_11_NAME "U_DI_11"
#define UESR_IO_DI_12_NAME "U_DI_12"
#define UESR_IO_DI_13_NAME "U_DI_13"
#define UESR_IO_DI_14_NAME "U_DI_14"
#define UESR_IO_DI_15_NAME "U_DI_15"
#define UESR_IO_DI_16_NAME "U_DI_16"
#define UESR_IO_DI_17_NAME "U_DI_17"
//接口板用户DI 地址定义
#define UESR_IO_DI_00_ADDR 0X24
#define UESR_IO_DI_01_ADDR 0X25
#define UESR_IO_DI_02_ADDR 0X26
#define UESR_IO_DI_03_ADDR 0X27
#define UESR_IO_DI_04_ADDR 0X28
#define UESR_IO_DI_05_ADDR 0X29
#define UESR_IO_DI_06_ADDR 0X2A
#define UESR_IO_DI_07_ADDR 0X2B
#define UESR_IO_DI_10_ADDR 0X2C
#define UESR_IO_DI_11_ADDR 0X2D
#define UESR_IO_DI_12_ADDR 0X2E
#define UESR_IO_DI_13_ADDR 0X2F
#define UESR_IO_DI_14_ADDR 0X30
#define UESR_IO_DI_15_ADDR 0X31
#define UESR_IO_DI_16_ADDR 0X32
#define UESR_IO_DI_17_ADDR 0X33
//接口板用户DO 名称定义
#define UESR_IO_DO_00_NAME "U_DO_00"
#define UESR_IO_DO_01_NAME "U_DO_01"
#define UESR_IO_DO_02_NAME "U_DO_02"
#define UESR_IO_DO_03_NAME "U_DO_03"
#define UESR_IO_DO_04_NAME "U_DO_04"
#define UESR_IO_DO_05_NAME "U_DO_05"
#define UESR_IO_DO_06_NAME "U_DO_06"
#define UESR_IO_DO_07_NAME "U_DO_07"
#define UESR_IO_DO_10_NAME "U_DO_10"
#define UESR_IO_DO_11_NAME "U_DO_11"
#define UESR_IO_DO_12_NAME "U_DO_12"
#define UESR_IO_DO_13_NAME "U_DO_13"
#define UESR_IO_DO_14_NAME "U_DO_14"
#define UESR_IO_DO_15_NAME "U_DO_15"
#define UESR_IO_DO_16_NAME "U_DO_16"
#define UESR_IO_DO_17_NAME "U_DO_17"
//接口板用户DO 地址定义
#define UESR_IO_DO_00_ADDR 0X20
#define UESR_IO_DO_01_ADDR 0X21
#define UESR_IO_DO_02_ADDR 0X22
#define UESR_IO_DO_03_ADDR 0X23
#define UESR_IO_DO_04_ADDR 0X24
#define UESR_IO_DO_05_ADDR 0X25
#define UESR_IO_DO_06_ADDR 0X26
#define UESR_IO_DO_07_ADDR 0X27
#define UESR_IO_DO_10_ADDR 0X28
#define UESR_IO_DO_11_ADDR 0X29
#define UESR_IO_DO_12_ADDR 0X2A
#define UESR_IO_DO_13_ADDR 0X2B
#define UESR_IO_DO_14_ADDR 0X2C
#define UESR_IO_DO_15_ADDR 0X2D
#define UESR_IO_DO_16_ADDR 0X2E
#define UESR_IO_DO_17_ADDR 0X2F
//接口板用户AI 名称定义
#define UESR_IO_AI_00_NAME "VI0"
#define UESR_IO_AI_01_NAME "VI1"
#define UESR_IO_AI_02_NAME "VI2"
#define UESR_IO_AI_03_NAME "VI3"
//接口板用户AI 地址定义
#define UESR_IO_AI_00_ADDR 0X00
#define UESR_IO_AI_01_ADDR 0X01
#define UESR_IO_AI_02_ADDR 0X02
#define UESR_IO_AI_03_ADDR 0X03
//接口板用户AI 名称定义
#define UESR_IO_AO_00_NAME "VO0"
#define UESR_IO_AO_01_NAME "VO1"
#define UESR_IO_AO_02_NAME "VO2"
#define UESR_IO_AO_03_NAME "VO3"
//接口板用户AI 地址定义
#define UESR_IO_AO_00_ADDR 0X00
#define UESR_IO_AO_01_ADDR 0X01
#define UESR_IO_AO_02_ADDR 0X02
#define UESR_IO_AO_03_ADDR 0X03
#endif // ROBOTIOMATETYPE_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
#ifndef RSERRORS_H
#define RSERRORS_H
/*robot service errors*/
#define RSERR_BASE 1000
#define RSERR_SUCC 0
#define RSERR_NOT_ENOUGH_RSHD_BUFFER RSERR_BASE + 1
#define RSERR_RSHD_NO_FOUND RSERR_BASE + 2
#define RSERR_PARAMETER_ERROR RSERR_BASE + 3
#define RSERR_CREATE_THREAD_ERROR RSERR_BASE + 4
#endif // RSERRORS_H

View File

@ -0,0 +1,125 @@
#ifndef RSPIDCFG_H
#define RSPIDCFG_H
#include "rstype.h"
#include "AuboRobotMetaType.h"
using namespace aubo_robot_namespace;
typedef struct
{
JointCommonData data[ARM_DOF];
} RobotJointCommonData;
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief
* @param rshd
* @param data
* @return
*/
int rs_get_joint_common_data(RSHD rshd, RobotJointCommonData &data);
/**
* @brief P
* @param joint_id ID1~6)
* @param P P
* @return
*/
int rs_set_current_ip(RSHD rshd, int joint_id, uint16 P);
/**
* @brief I
* @param joint_id ID1~6)
* @param I I
* @return
*/
int rs_set_current_ii(RSHD rshd, int joint_id, uint16 I);
/**
* @brief D
* @param joint_id ID1~6)
* @param D D
* @return
*/
int rs_set_current_id(RSHD rshd, int joint_id, uint16 D);
/**
* @brief P
* @param joint_id ID1~6)
* @param P P
* @return
*/
int rs_set_speed_p(RSHD rshd, int joint_id, uint16 P);
/**
* @brief I
* @param joint_id ID1~6)
* @param I I
* @return
*/
int rs_set_speed_i(RSHD rshd, int joint_id, uint16 I);
/**
* @brief D
* @param joint_id ID1~6)
* @param D D
* @return
*/
int rs_set_speed_d(RSHD rshd, int joint_id, uint16 D);
/**
* @brief DS
* @param joint_id ID1~6)
* @param DS DS
* @return
*/
int rs_set_speed_ds(RSHD rshd, int joint_id, uint16 DS);
/**
* @brief P
* @param joint_id ID1~6)
* @param P P
* @return
*/
int rs_set_pos_p(RSHD rshd, int joint_id, uint16 P);
/**
* @brief I
* @param joint_id ID1~6)
* @param I I
* @return
*/
int rs_set_pos_i(RSHD rshd, int joint_id, uint16 I);
/**
* @brief D
* @param joint_id ID1~6)
* @param D D
* @return
*/
int rs_set_pos_d(RSHD rshd, int joint_id, uint16 D);
/**
* @brief DS
* @param joint_id ID1~6)
* @param DS DS
* @return
*/
int rs_set_pos_ds(RSHD rshd, int joint_id, uint16 DS);
/**
* @brief PID参数到关节flash
* @param rshd
* @param joint_id
* @return
*/
int rs_joint_save_data_flash(RSHD rshd, int joint_id);
#ifdef __cplusplus
}
#endif
#endif // RSPIDCFG_H

View File

@ -0,0 +1,29 @@
#ifndef RSTYPE_H
#define RSTYPE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
/* General types */
typedef uint8_t boolean;
typedef int8_t int8;
typedef int16_t int16;
typedef int32_t int32;
typedef uint8_t uint8;
typedef uint16_t uint16;
typedef uint32_t uint32;
typedef int64_t int64;
typedef uint64_t uint64;
typedef float float32;
typedef double float64;
typedef uint16_t RSHD; // robot servcie handle
#ifdef __cplusplus
}
#endif
#endif // RSTYPE_H

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,330 @@
// 力控相关的工艺封装接口
#ifndef AUBO_SDK_SKILL_INTERFACE_H
#define AUBO_SDK_SKILL_INTERFACE_H
#include <chrono>
#include <atomic>
#include <shared_mutex>
#include <condition_variable>
#include <aubo/aubo_api.h>
using namespace arcs::common_interface;
namespace arcs {
namespace aubo_sdk {
class RtdeClient;
class RpcClient;
using RtdeClientPtr = std::shared_ptr<RtdeClient>;
using RpcClientPtr = std::shared_ptr<RpcClient>;
class GuideTrajMove;
using GuideTrajMovePtr = std::shared_ptr<GuideTrajMove>;
class ARCS_ABI ForceControl
{
public:
enum ForceStage
{
TOUCH = 1, // 接近
SEARCH = 2, // 搜孔
INSERT = 3, // 插孔
CONSTANT = 4, // 恒力
}; // enum ForceStage
enum StateCode
{
// 失败状态码
TimeOut = -100, // 超时
Search_MaxForce = -4, // 搜孔达到最大力
Insert_MaxForce = -3, // 插入达到最大力
Constant_NotTouch = -2, // 恒力过程中未接触
Touch_Distance = -1, // 超出探寻距离
Running = 0, // 力控执行中
// 成功状态码
Touch_Succeed = 1, // 接触成功
Insert_Succeed = 2, // 插孔成功
Search_Succeed = 3, // 搜孔成功
Constant_Succeed = 4, // 接触成功
}; // StateCode
// 轨迹类型
enum GuideTrajType
{
NONE = 0, // 无参考轨迹
LINE1 = 1, // 直线 speedLine
LINE2 = 2, // 直线 moveLine
SPIRAL = 3, // 螺旋线
WEAVE = 4, // 摆线
};
// 螺旋线平面
enum class SpiralPlane
{
xy = 0,
yz = 1,
zx = 2
};
// 螺旋线轨迹参数
struct SpiralTrajParams
{
double step = 0.0; // 圈数
double direction = -1; // 旋转方向 -1顺时针旋转1逆时针旋转
SpiralPlane plane = SpiralPlane::xy; // 参考平面选择
double spiral = 0.0; // 螺旋线外扩
double helix = 0.0; // 螺旋上升 m
double radius = 0.0; // 第一圈半径 m
};
// 摆线方向
enum class WeaveSelect
{
x = 1,
y = 2,
z = 3,
rx = 4,
ry = 5,
rz = 6
};
// 摆线轨迹参数
struct WeaveTrajParams
{
double step = 0.0; // 周期
double amplitude = 0.0; // 幅度
WeaveSelect direction = WeaveSelect::x; // 方向
double hold_distance = 0.0; // 保持距离 m
double angle = 0.0; // 角度
double type; // 类型
};
// 插孔方向
enum class InsertSelect
{
x = 1,
y = 2,
z = 3,
};
// 插孔参数
struct InsertParams
{
InsertSelect insert_select = InsertSelect::z; // 插入方向,可选x\y\z
double hole_diameter = 0.0; // 轴孔直径 m
double insert_max_speed = 0.01; // 插入速度限制 m/s
double insert_time = 1000; // 插入时间限制 ms
GuideTrajType guide_traj_type = NONE; // 主动轨迹类型
std::vector<double> insert_max_force = {
0.0, 0.0, 0.0, 0.0, 0.0, 0.0
}; // 最大力限制
double insert_max_depth = 0.01; // 插入距离限制 m
double insert_guide_force = 10; // 插入引导力
// 力控调节参数
std::vector<double> insert_damp_scale = {
0.5, 0.5, 0.5, 0.5, 0.5, 0.5
};
std::vector<double> insert_stiff_scale = {
0.5, 0.5, 0.5, 0.5, 0.5, 0.5
};
SpiralTrajParams spiral_param; // 螺旋轨迹参数
WeaveTrajParams weave_param; // 摆动轨迹参数
};
// 搜孔平面
enum class SearchPlane
{
yz = 1,
xz = 2,
xy = 3
};
// 搜孔参数
struct SearchParams
{
SearchPlane search_plane = SearchPlane::xy; // 搜孔平面
double hole_diameter = 0.0; // 轴孔直径 m
double search_range = 0.1; // 搜孔范围
double search_time = 1000; // 搜孔时间限制 ms
GuideTrajType guide_traj_type = NONE; // 搜孔过程主动轨迹类型
double search_max_force = 10; // 最大力限制
double search_guide_force = 1; // 搜孔引导力
// 力控调节参数
std::vector<double> search_damp_scale = {
0.5, 0.5, 0.5, 0.5, 0.5, 0.5
};
std::vector<double> search_stiff_scale = {
0.5, 0.5, 0.5, 0.5, 0.5, 0.5
};
SpiralTrajParams spiral_param;
WeaveTrajParams weave_param;
};
struct ConstantParams
{
TaskFrameType frame_type = MOTION_FORCE;
std::vector<double> feature = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
std::vector<bool> compliance = { true, true, true, true, true, true };
std::vector<double> wrench = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
// 力控调节参数
std::vector<double> env_stiff = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
std::vector<double> damp_scale = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 };
std::vector<double> stiff_scale = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 };
std::vector<double> contact_threshold = {
1.0, 1.0, 1.0, 0.2, 0.2, 0.2
}; // 接触判断阈值
double constant_time = 5000; // 默认5s
};
struct TouchParams
{
TaskFrameType frame_type = TOOL_FORCE;
std::vector<double> feature = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
std::vector<bool> compliance = { true, true, true, true, true, true };
std::vector<double> wrench = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
std::vector<double> env_stiff = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
// std::vector<double> damp_scale = { 0.5, 0.5, 0.5, 0.5, 0.5,
// 0.5 };
std::vector<double> stiff_scale = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 };
std::vector<double> speed = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 };
double distance = 0.0;
double touch_time = 1000; // 默认5s
};
ForceControl(const RpcClientPtr rpc, const RtdeClientPtr rtde);
~ForceControl();
/**
* @brief
*
* @return 0
*/
std::vector<double> getTaskForce(const TaskFrameType &type,
const std::vector<double> &feature);
// 接近
int fcTouch(const TouchParams &param);
// 恒力
int fcConstant(const ConstantParams &param);
// 插入
int fcInsert(const InsertParams &param);
// 搜孔
int fcSearch(const SearchParams &param);
// 等待力控结束
int fcWaitCondition();
int fcExit();
// 注册状态回调函数
void registerStateCallBack(std::function<void(int state)> func);
private:
// 注册实时状态订阅
void subscribeRealtimeState();
// 力控过程监控线程
void monitor();
// 超时监控
void timeoutMonitor();
// 距离监控
void distanceMonitor();
// 单方向距离监控
void signalDistanceMonitor();
// 力监控
void forceMonitor();
// 接触监控
void contactMonitor();
private:
RpcClientPtr rpc_;
RtdeClientPtr rtde_;
std::atomic_bool is_exit_;
std::atomic_bool is_stop_;
std::mutex monitor_thread_mutex_;
std::condition_variable monitor_cond_;
std::thread *monitor_thread_ptr_;
// 用于恒力和接近之间的切换
std::atomic_bool last_is_contact_;
// 记录当前参数
std::shared_mutex mutex_;
TaskFrameType frame_type_;
std::vector<double> feature_;
ForceStage cur_process_type_;
std::vector<bool> compliance_;
std::vector<double> env_stiff_;
std::vector<double> damp_scale_;
std::vector<double> stiff_scale_;
std::vector<double> wrench_;
std::vector<double> start_tcp_pose_; // 开始力控位姿
double distance_; // 力控执行距离
double direction_; // 搜孔/插孔方向
std::chrono::steady_clock::time_point start_time_; // 开启力控时间点
double interval_; // 超时间隔
// 参考轨迹运行
GuideTrajMovePtr guide_traj_move_;
// 状态回调函数
std::atomic<StateCode> state_code_ = Running;
std::function<void(int state)> func_;
// RTDE相关
std::shared_mutex rtde_mutex_;
std::vector<double> actual_tcp_pose_;
std::vector<double> actual_tcp_speed_;
std::vector<double> actual_tcp_force_;
std::vector<double> actual_tcp_force_sensor_;
}; // namespace aubo_sdk
class GuideTrajMove
{
public:
GuideTrajMove(const RpcClientPtr rpc);
~GuideTrajMove();
void speedLine(const std::vector<double> &speed, const double &time);
void moveLine(const std::vector<double> &target_pose, const double &speed);
void moveSpiral(const ForceControl::SpiralTrajParams &spiral_param);
void moveWeave(const ForceControl::WeaveTrajParams &weave_param,
const int &move_direction);
void stop();
private:
int waitArrival();
RpcClientPtr rpc_;
std::atomic_bool is_exit_;
std::atomic_bool is_stop_;
std::mutex thread_mutex_;
std::condition_variable cond_;
std::thread thread_;
ForceControl::GuideTrajType traj_type_ = ForceControl::NONE;
};
} // namespace aubo_sdk
} // namespace arcs
#endif // AUBO_SDK_SKILL_INTERFACE_H

View File

@ -0,0 +1,200 @@
#ifndef AUBO_SDK_ForceControl_C_H
#define AUBO_SDK_ForceControl_C_H
#include <aubo_sdk/type_def_c.h>
typedef void *FC_HANDLER;
enum ForceStage_C
{
TOUCH = 1, // 接近
SEARCH = 2, // 搜孔
INSERT = 3, // 插孔
CONSTANT = 4, // 恒力
}; // enum ForceStage
enum StateCode_C
{
// 失败状态码
TimeOut = -100, // 超时
Search_MaxForce = -4, // 搜孔达到最大力
Insert_MaxForce = -3, // 插入达到最大力
Constant_NotTouch = -2, // 恒力过程中未接触
Touch_Distance = -1, // 超出探寻距离
Running = 0, // 力控执行中
// 成功状态码
Touch_Succeed = 1, // 接触成功
Insert_Succeed = 2, // 插孔成功
Search_Succeed = 3, // 搜孔成功
Constant_Succeed = 4, // 接触成功
}; // StateCode
// 轨迹类型
enum GuideTrajType_C
{
NONE = 0, // 无参考轨迹
LINE1 = 1, // 直线 speedLine
LINE2 = 2, // 直线 moveLine
SPIRAL = 3, // 螺旋线
WEAVE = 4, // 摆线
};
// 螺旋线平面
enum class SpiralPlane_C
{
xy = 0,
yz = 1,
zx = 2
};
// 螺旋线轨迹参数
struct SpiralTrajParams_C
{
double step = 0.0; // 圈数
double direction = -1; // 旋转方向 -1顺时针旋转1逆时针旋转
SpiralPlane_C plane = SpiralPlane_C::xy; // 参考平面选择
double spiral = 0.0; // 螺旋线外扩
double helix = 0.0; // 螺旋上升 m
double radius = 0.0; // 第一圈半径 m
};
// 摆线方向
enum class WeaveSelect_C
{
x = 1,
y = 2,
z = 3,
rx = 4,
ry = 5,
rz = 6
};
// 摆线轨迹参数
struct WeaveTrajParams_C
{
double step = 0.0; // 周期
double amplitude = 0.0; // 幅度
WeaveSelect_C direction = WeaveSelect_C::x; // 方向
double hold_distance = 0.0; // 保持距离 m
double angle = 0.0; // 角度
double type; // 类型
};
// 插孔方向
enum class InsertSelect_C
{
x = 1,
y = 2,
z = 3,
};
// 插孔参数
struct InsertParams_C
{
InsertSelect_C insert_select = InsertSelect_C::z; // 插入方向,可选x\y\z
double hole_diameter = 0.0; // 轴孔直径 m
double insert_max_speed = 0.01; // 插入速度限制 m/s
double insert_time = 1000; // 插入时间限制 ms
GuideTrajType_C guide_traj_type = NONE; // 主动轨迹类型
double insert_max_force[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; // 最大力限制
double insert_max_depth = 0.01; // 插入距离限制 m
double insert_guide_force = 10; // 插入引导力
// 力控调节参数
double insert_damp_scale[6] = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 };
double insert_stiff_scale[6] = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 };
SpiralTrajParams_C spiral_param; // 螺旋轨迹参数
WeaveTrajParams_C weave_param; // 摆动轨迹参数
};
// 搜孔平面
enum class SearchPlane_C
{
yz = 1,
xz = 2,
xy = 3
};
// 搜孔参数
struct SearchParams_C
{
SearchPlane_C search_plane = SearchPlane_C::xy; // 搜孔平面
double hole_diameter = 0.0; // 轴孔直径 m
double search_range = 0.1; // 搜孔范围
double search_time = 1000; // 搜孔时间限制 ms
GuideTrajType_C guide_traj_type = NONE; // 搜孔过程主动轨迹类型
double search_max_force = 10; // 最大力限制
double search_guide_force = 1; // 搜孔引导力
// 力控调节参数
double search_damp_scale[6] = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 };
double search_stiff_scale[6] = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 };
SpiralTrajParams_C spiral_param;
WeaveTrajParams_C weave_param;
};
struct ConstantParams_C
{
TaskFrameType_C frame_type = TaskFrameType_MOTION_FORCE;
double feature[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
bool compliance[6] = { true, true, true, true, true, true };
double wrench[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
// 力控调节参数
double env_stiff[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
double damp_scale[6] = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 };
double stiff_scale[6] = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 };
double contact_threshold[6] = {
1.0, 1.0, 1.0, 0.2, 0.2, 0.2
}; // 接触判断阈值
double constant_time = 5000; // 默认5s
};
struct TouchParams_C
{
TaskFrameType_C frame_type = TaskFrameType_TOOL_FORCE;
double feature[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
bool compliance[6] = { true, true, true, true, true, true };
double wrench[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
double env_stiff[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
// std::vector<double> damp_scale = { 0.5, 0.5, 0.5, 0.5, 0.5,
// 0.5 };
double stiff_scale[6] = { 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 };
double speed[6] = { 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 };
double distance = 0.0;
double touch_time = 1000; // 默认5s
};
#ifdef __cplusplus
extern "C" {
#endif
ARCS_ABI FC_HANDLER create_fc_ptr(void *rpc, void *rtde);
ARCS_ABI void destroy_fc_ptr(void *ptr);
ARCS_ABI int getTaskForce(FORCE_CONTROL_HANDLER h, TaskFrameType_C type,
const double *feature, double *result);
ARCS_ABI int fcTouch(FORCE_CONTROL_HANDLER h, const TouchParams_C &param);
ARCS_ABI int fcConstant(FORCE_CONTROL_HANDLER h, const ConstantParams_C &param);
ARCS_ABI int fcInsert(FORCE_CONTROL_HANDLER h, const InsertParams_C &param);
ARCS_ABI int fcSearch(FORCE_CONTROL_HANDLER h, const SearchParams_C &param);
ARCS_ABI int fcWaitCondition(FORCE_CONTROL_HANDLER h);
ARCS_ABI int fcExit(FORCE_CONTROL_HANDLER h);
// ARCS_ABI void registerStateCallBack(std::function<void(int state)> func);
#ifdef __cplusplus
}
#endif
#endif

View File

@ -0,0 +1,138 @@
#ifndef TCP_AUTO_CALIB_H
#define TCP_AUTO_CALIB_H
#include <atomic>
#include <shared_mutex>
#include <aubo/aubo_api.h>
using namespace arcs::common_interface;
namespace arcs {
namespace aubo_sdk {
class RtdeClient;
class RpcClient;
using RtdeClientPtr = std::shared_ptr<RtdeClient>;
using RpcClientPtr = std::shared_ptr<RpcClient>;
using Vec3 = std::array<double, 3>;
class ARCS_ABI TcpAutoCalib
{
public:
TcpAutoCalib(RpcClientPtr rpc, RtdeClientPtr rtde);
/**
* @brief setTcpAutoCalibParam
* TCP自动标定参数
* @param circle_radius ,:m,:0.01m
* @param second_plane_offset TCP
* Z+,:m,:0.01m
* @param move_line_speed ,:m/s,:0.005m/s
* @param move_line_r_speed ,:rad/s,:0.05rad/s
* @param rotation_angle
* TCP自动标定计算姿态角度,:rad,:0.523599(30°)
* @param depth_offset
* TCP自动标定向下移动距离,:m,:0.005m
* @return
*/
int setTcpAutoCalibParam(const double circle_radius,
const double second_plane_offset,
const double move_line_speed,
const double move_line_r_speed,
const double rotation_angle,
const double depth_offset);
/**
* @brief tcpAutoCalibrate
* TCP位置自动标定
*
* 1. TCP位置
* 2. TCP位于传感器中心并且TCP Z方向垂直于传感器平面
* @param io_index_1 DI索引
* @param io_index_2 DI索引
* @return 0TCP位置x,y,z-1
*/
ResultWithErrno tcpAutoCalibrate(const int io_index_1,
const int io_index_2);
/**
* @brief tcpAutoCorrect
* TCP自动纠偏
*
* 1. TCP位于传感器中心并且TCP Z方向垂直于传感器平面
* @param sensor_pose 姿
* @param io_index_1 DI索引
* @param io_index_2 DI索引
* @return 0TCP-1
*/
ResultWithErrno tcpAutoCorrect(const std::vector<double> &sensor_pose,
const int io_index_1, const int io_index_2);
/**
* @brief calibrateSensorPoseWithTCP
* TCP标定传感器位姿
*
* 1. TCP位于传感器中心并且TCP Z方向垂直于传感器平面
* @param io_index_1 DI索引
* @param io_index_2 DI索引
* @return 0姿-1
*/
ResultWithErrno calibrateSensorPoseWithTCP(const int io_index_1,
const int io_index_2);
private:
void subscribeRealtimeState();
std::pair<std::vector<std::vector<double>>,
std::vector<std::vector<double>>>
runTwoCirclesCapture(const bool checkOccl = true);
std::vector<std::vector<double>> runOneCircleAndCaptureFlange(
const std::vector<double> &circle_center, const bool flag = true);
std::vector<std::vector<double>> genCirclePoints(
const std::vector<double> &center, double radius, int npts,
bool is_offset = false);
void moveTcpPoseAlignZ(const Vec3 &target_z);
std::vector<double> alignTcpZToBaseZ();
std::vector<double> probeAlongAxisFromPointWithZOffset(
const Vec3 &axis_origin, const Vec3 &axis_z, double start_along_z);
int waitArrival();
int waitDIEdgeChanged(const int timeout);
private:
double second_plane_offset_ = 0.01;
double circle_radius_ = 0.01;
double move_line_acc_ = 0.8;
double move_line_speed_ = 0.005;
double move_line_r_speed_ = 0.05;
double rotation_angle_ = 0.523599; // TCP自动标定计算位姿角度默认30°
double depth_offset_ = 0.005; // TCP自动标定向下移动距离
RpcClientPtr rpc_;
RtdeClientPtr rtde_;
RobotInterfacePtr robot_;
int task_id_{ -1 };
std::atomic_int io_index_1_{ 0 };
std::atomic_int io_index_2_{ 0 };
std::shared_mutex tool_poses_mutex_;
std::vector<std::vector<double>> tool_poses_;
std::atomic_bool io_1_state_{ false };
std::atomic_bool io_2_state_{ false };
bool offset_45_{ false };
};
} // namespace aubo_sdk
} // namespace arcs
#endif // TCP_AUTO_CALIB_H

View File

@ -0,0 +1,135 @@
#ifndef AUBO_SDK_FORCE_CONTROL_TYPE_CONVERT_C_H
#define AUBO_SDK_FORCE_CONTROL_TYPE_CONVERT_C_H
#include <skill_interface/force_control.h>
#include <skill_interface/force_control_c.h>
// 用于将SpiralTrajParams_C转化为SpiralTrajParams
inline arcs::aubo_sdk::ForceControl::SpiralTrajParams convertToSpiralTrajParams(
const SpiralTrajParams_C &source)
{
arcs::aubo_sdk::ForceControl::SpiralTrajParams result;
result.step = source.step;
result.direction = source.direction;
result.plane = (arcs::aubo_sdk::ForceControl::SpiralPlane)source.plane;
result.spiral = source.spiral;
result.helix = source.helix;
result.radius = source.radius;
return result;
}
// 用于将WeaveTrajParams_C转化为WeaveTrajParams
inline arcs::aubo_sdk::ForceControl::WeaveTrajParams convertToWeaveTrajParams(
const WeaveTrajParams_C &source)
{
arcs::aubo_sdk::ForceControl::WeaveTrajParams result;
result.step = source.step;
result.amplitude = source.amplitude;
result.direction =
(arcs::aubo_sdk::ForceControl::WeaveSelect)source.direction;
result.hold_distance = source.hold_distance;
result.angle = source.angle;
result.type = source.type;
return result;
}
// 用于将TouchParams_C转化为TouchParams
inline arcs::aubo_sdk::ForceControl::TouchParams convertToTouchParams(
const TouchParams_C &source)
{
arcs::aubo_sdk::ForceControl::TouchParams result;
result.frame_type =
(arcs::common_interface::TaskFrameType)source.frame_type;
for (int i = 0; i < 6; i++) {
result.feature[i] = source.feature[i];
result.compliance[i] = source.compliance[i];
result.wrench[i] = source.wrench[i];
result.env_stiff[i] = source.env_stiff[i];
result.stiff_scale[i] = source.stiff_scale[i];
result.speed[i] = source.speed[i];
}
result.distance = source.distance;
result.touch_time = source.touch_time;
return result;
}
inline arcs::aubo_sdk::ForceControl::ConstantParams convertToConstantParams(
const ConstantParams_C &source)
{
arcs::aubo_sdk::ForceControl::ConstantParams result;
result.frame_type =
(arcs::common_interface::TaskFrameType)source.frame_type;
for (int i = 0; i < 6; i++) {
result.feature[i] = source.feature[i];
result.compliance[i] = source.compliance[i];
result.wrench[i] = source.wrench[i];
result.env_stiff[i] = source.env_stiff[i];
result.damp_scale[i] = source.damp_scale[i];
result.stiff_scale[i] = source.stiff_scale[i];
result.contact_threshold[i] = source.contact_threshold[i];
} // 接触判断阈值
result.constant_time = source.constant_time; // 默认5sams result;
return result;
}
inline arcs::aubo_sdk::ForceControl::InsertParams convertToInsertParams(
const InsertParams_C &source)
{
arcs::aubo_sdk::ForceControl::InsertParams result;
result.insert_select =
(arcs::aubo_sdk::ForceControl::InsertSelect)source.insert_select;
result.hole_diameter = source.hole_diameter;
result.insert_max_speed = source.insert_max_speed;
result.insert_time = source.insert_time;
result.guide_traj_type =
(arcs::aubo_sdk::ForceControl::GuideTrajType)source.guide_traj_type;
result.insert_max_depth = source.insert_max_depth;
result.insert_guide_force = source.insert_guide_force;
for (int i = 0; i < 6; i++) {
result.insert_max_force[i] = source.insert_max_force[i];
result.insert_damp_scale[i] = source.insert_damp_scale[i];
result.insert_stiff_scale[i] = source.insert_stiff_scale[i];
}
result.spiral_param = convertToSpiralTrajParams(source.spiral_param);
result.weave_param = convertToWeaveTrajParams(source.weave_param);
return result;
}
// 用于将SearchParams_C转化为SearchParams
inline arcs::aubo_sdk::ForceControl::SearchParams convertToSearchParams(
const SearchParams_C &source)
{
arcs::aubo_sdk::ForceControl::SearchParams result;
result.search_plane =
(arcs::aubo_sdk::ForceControl::SearchPlane)source.search_plane;
result.hole_diameter = source.hole_diameter;
result.search_range = source.search_range;
result.search_time = source.search_time;
result.guide_traj_type =
(arcs::aubo_sdk::ForceControl::GuideTrajType)source.guide_traj_type;
result.search_max_force = source.search_max_force;
result.search_guide_force = source.search_guide_force;
for (int i = 0; i < 6; i++) {
result.search_damp_scale[i] = source.search_damp_scale[i];
result.search_stiff_scale[i] = source.search_stiff_scale[i];
}
result.spiral_param = convertToSpiralTrajParams(source.spiral_param);
result.weave_param = convertToWeaveTrajParams(source.weave_param);
return result;
}
#endif

View File

@ -0,0 +1,11 @@
include(CMakeFindDependencyMacro)
# Config使
# set(my-config-var )
# 使find_package
# find_dependency(MYDEP REQUIRED)
# Any extra setup
# Add the targets file
include("${CMAKE_CURRENT_LIST_DIR}/aubo_sdkTargets.cmake")

View File

@ -0,0 +1,48 @@
# This is a basic version file for the Config-mode of find_package().
# It is used by write_basic_package_version_file() as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version.
# The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "0.26.0")
if (PACKAGE_FIND_VERSION_RANGE)
# Package version must be in the requested version range
if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN)
OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX)
OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX)))
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
endif()
else()
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
endif()
# if the installed project requested no architecture check, don't perform the check
if("FALSE")
return()
endif()
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
return()
endif()
# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
math(EXPR installedBits "8 * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()

View File

@ -0,0 +1,29 @@
#----------------------------------------------------------------
# Generated CMake target import file for configuration "Debug".
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "aubo_sdk::aubo_sdk" for configuration "Debug"
set_property(TARGET aubo_sdk::aubo_sdk APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(aubo_sdk::aubo_sdk PROPERTIES
IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/libaubo_sdkd.so"
IMPORTED_SONAME_DEBUG "libaubo_sdkd.so"
)
list(APPEND _IMPORT_CHECK_TARGETS aubo_sdk::aubo_sdk )
list(APPEND _IMPORT_CHECK_FILES_FOR_aubo_sdk::aubo_sdk "${_IMPORT_PREFIX}/lib/libaubo_sdkd.so" )
# Import target "aubo_sdk::robot_proxy" for configuration "Debug"
set_property(TARGET aubo_sdk::robot_proxy APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(aubo_sdk::robot_proxy PROPERTIES
IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/lib/librobot_proxyd.so"
IMPORTED_SONAME_DEBUG "librobot_proxyd.so"
)
list(APPEND _IMPORT_CHECK_TARGETS aubo_sdk::robot_proxy )
list(APPEND _IMPORT_CHECK_FILES_FOR_aubo_sdk::robot_proxy "${_IMPORT_PREFIX}/lib/librobot_proxyd.so" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

View File

@ -0,0 +1,29 @@
#----------------------------------------------------------------
# Generated CMake target import file for configuration "Release".
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Import target "aubo_sdk::aubo_sdk" for configuration "Release"
set_property(TARGET aubo_sdk::aubo_sdk APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(aubo_sdk::aubo_sdk PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libaubo_sdk.so"
IMPORTED_SONAME_RELEASE "libaubo_sdk.so"
)
list(APPEND _IMPORT_CHECK_TARGETS aubo_sdk::aubo_sdk )
list(APPEND _IMPORT_CHECK_FILES_FOR_aubo_sdk::aubo_sdk "${_IMPORT_PREFIX}/lib/libaubo_sdk.so" )
# Import target "aubo_sdk::robot_proxy" for configuration "Release"
set_property(TARGET aubo_sdk::robot_proxy APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(aubo_sdk::robot_proxy PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/librobot_proxy.so"
IMPORTED_SONAME_RELEASE "librobot_proxy.so"
)
list(APPEND _IMPORT_CHECK_TARGETS aubo_sdk::robot_proxy )
list(APPEND _IMPORT_CHECK_FILES_FOR_aubo_sdk::robot_proxy "${_IMPORT_PREFIX}/lib/librobot_proxy.so" )
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)

View File

@ -0,0 +1,114 @@
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
message(FATAL_ERROR "CMake >= 2.6.0 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.6...3.18)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_targetsDefined)
set(_targetsNotDefined)
set(_expectedTargets)
foreach(_expectedTarget aubo_sdk::aubo_sdk aubo_sdk::common_interface aubo_sdk::robot_proxy)
list(APPEND _expectedTargets ${_expectedTarget})
if(NOT TARGET ${_expectedTarget})
list(APPEND _targetsNotDefined ${_expectedTarget})
endif()
if(TARGET ${_expectedTarget})
list(APPEND _targetsDefined ${_expectedTarget})
endif()
endforeach()
if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT "${_targetsDefined}" STREQUAL "")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
endif()
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
# Compute the installation prefix relative to this file.
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
if(_IMPORT_PREFIX STREQUAL "/")
set(_IMPORT_PREFIX "")
endif()
# Create imported target aubo_sdk::aubo_sdk
add_library(aubo_sdk::aubo_sdk SHARED IMPORTED)
set_target_properties(aubo_sdk::aubo_sdk PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
INTERFACE_LINK_LIBRARIES "aubo_sdk::common_interface"
)
# Create imported target aubo_sdk::common_interface
add_library(aubo_sdk::common_interface INTERFACE IMPORTED)
set_target_properties(aubo_sdk::common_interface PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
)
# Create imported target aubo_sdk::robot_proxy
add_library(aubo_sdk::robot_proxy SHARED IMPORTED)
set_target_properties(aubo_sdk::robot_proxy PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
INTERFACE_LINK_LIBRARIES "aubo_sdk::aubo_sdk;Qt5::Core"
)
if(CMAKE_VERSION VERSION_LESS 3.0.0)
message(FATAL_ERROR "This file relies on consumers using CMake 3.0.0 or greater.")
endif()
# Load information for each installed configuration.
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
file(GLOB CONFIG_FILES "${_DIR}/aubo_sdkTargets-*.cmake")
foreach(f ${CONFIG_FILES})
include(${f})
endforeach()
# Cleanup temporary variables.
set(_IMPORT_PREFIX)
# Loop over all imported files and verify that they actually exist
foreach(target ${_IMPORT_CHECK_TARGETS} )
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
if(NOT EXISTS "${file}" )
message(FATAL_ERROR "The imported target \"${target}\" references the file
\"${file}\"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
\"${CMAKE_CURRENT_LIST_FILE}\"
but not all the files it references.
")
endif()
endforeach()
unset(_IMPORT_CHECK_FILES_FOR_${target})
endforeach()
unset(_IMPORT_CHECK_TARGETS)
# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
libstdc++.so.6.0.25

Binary file not shown.

View File

@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.5)
project(aubo_interfaces)
find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(builtin_interfaces REQUIRED)
set(INTERFACE_LIST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/generated_interfaces.txt")
if(EXISTS "${INTERFACE_LIST_FILE}")
file(STRINGS "${INTERFACE_LIST_FILE}" INTERFACES)
else()
message(FATAL_ERROR "generated_interfaces.txt not found: ${INTERFACE_LIST_FILE}")
endif()
list(FILTER INTERFACES EXCLUDE REGEX "^[ \t]*$")
rosidl_generate_interfaces(${PROJECT_NAME}
${INTERFACES}
DEPENDENCIES builtin_interfaces
)
ament_export_dependencies(rosidl_default_runtime)
ament_package()

View File

@ -0,0 +1,11 @@
string robot_name
uint32 dof
float64 watchdog_timeout
---
int32 code
string message
uint64 accepted_commands
---
bool active
uint64 accepted_commands
float64[] target_positions

View File

@ -0,0 +1,664 @@
srv/PoseAdd.srv
srv/PoseSub.srv
srv/InterpolatePose.srv
srv/PoseTrans.srv
srv/PoseTransInv.srv
srv/PoseInverse.srv
srv/PoseDistance.srv
srv/PoseAngleDistance.srv
srv/PoseEqual.srv
srv/TransferRefFrame.srv
srv/PoseRotation.srv
srv/RpyToQuaternion.srv
srv/QuaternionToRpy.srv
srv/TcpOffsetIdentify.srv
srv/CalibrateCoordinate.srv
srv/CalculateCircleFourthPoint.srv
srv/ForceTrans.srv
srv/GetDeltaPoseBySensorDistance.srv
srv/DeltaPoseTrans.srv
srv/DeltaPoseAdd.srv
srv/SerialOpen.srv
srv/SerialClose.srv
srv/SerialReadByte.srv
srv/SerialReadByteList.srv
srv/SerialReadString.srv
srv/SerialSendByte.srv
srv/SerialSendInt.srv
srv/SerialSendLine.srv
srv/SerialSendString.srv
srv/SerialSendAllString.srv
srv/SocketOpen.srv
srv/SocketClose.srv
srv/SocketReadAsciiFloat.srv
srv/SocketReadBinaryInteger.srv
srv/SocketReadByteList.srv
srv/SocketReadString.srv
srv/SocketReadAllString.srv
srv/SocketSendByte.srv
srv/SocketSendInt.srv
srv/SocketSendLine.srv
srv/SocketSendString.srv
srv/SocketSendAllString.srv
srv/SocketHasConnected.srv
srv/GetControlSoftwareVersionCode.srv
srv/GetControlSoftwareFullVersion.srv
srv/GetInterfaceVersionCode.srv
srv/GetControlSoftwareBuildDate.srv
srv/GetControlSoftwareVersionHash.srv
srv/GetControlSystemTime.srv
srv/NewTask.srv
srv/DeleteTask.srv
srv/DetachTask.srv
srv/IsTaskAlive.srv
srv/GetTaskQueueSize.srv
srv/Nop.srv
srv/SwitchTask.srv
srv/SetLabel.srv
srv/SetPlanContext.srv
srv/GotoLine.srv
srv/GetAdvancePlanContext.srv
srv/GetAdvancePtr.srv
srv/GetMainPtr.srv
srv/GetInterpPtr.srv
srv/GetPlanContext.srv
srv/GetExecutionStatus.srv
srv/GetExecutionStatus1.srv
srv/LoadProgram.srv
srv/PreloadProgram.srv
srv/GetPreloadProgram.srv
srv/ClearPreloadPrograms.srv
srv/RunProgram.srv
srv/Start.srv
srv/Stop.srv
srv/Abort.srv
srv/Pause.srv
srv/Step.srv
srv/SetResumeWait.srv
srv/Resume.srv
srv/EnterCritical.srv
srv/ExitCritical.srv
srv/ArbitraryResume.srv
srv/GetStatus.srv
srv/GetRuntimeState.srv
srv/SetBreakPoint.srv
srv/RemoveBreakPoint.srv
srv/ClearBreakPoints.srv
srv/TimerStart.srv
srv/TimerStop.srv
srv/TimerReset.srv
srv/TimerDelete.srv
srv/GetTimer.srv
srv/TriggBegin.srv
srv/TriggEnd.srv
srv/TriggInterrupt.srv
srv/GetTriggInterrupts.srv
srv/GetBoolInput.srv
srv/SetBoolInput.srv
srv/GetInt32Input.srv
srv/SetInt32Input.srv
srv/GetFloatInput.srv
srv/SetFloatInput.srv
srv/GetDoubleInput.srv
srv/SetDoubleInput.srv
srv/GetBoolOutput.srv
srv/SetBoolOutput.srv
srv/GetInt32Output.srv
srv/SetInt32Output.srv
srv/GetFloatOutput.srv
srv/SetFloatOutput.srv
srv/GetDoubleOutput.srv
srv/SetDoubleOutput.srv
srv/GetInt16Register.srv
srv/SetInt16Register.srv
srv/GetInt16RegisterBit.srv
srv/SetInt16RegisterBit.srv
srv/VariableUpdated.srv
srv/HasNamedVariable.srv
srv/GetNamedVariableType.srv
srv/GetBool.srv
srv/SetBool.srv
srv/GetVecChar.srv
srv/SetVecChar.srv
srv/GetInt32.srv
srv/SetInt32.srv
srv/GetVecInt32.srv
srv/SetVecInt32.srv
srv/GetFloat.srv
srv/SetFloat.srv
srv/GetVecFloat.srv
srv/SetVecFloat.srv
srv/GetDouble.srv
srv/SetDouble.srv
srv/GetVecDouble.srv
srv/SetVecDouble.srv
srv/GetString.srv
srv/SetString.srv
srv/ClearNamedVariable.srv
srv/SetWatchDog.srv
srv/GetWatchDogAction.srv
srv/GetWatchDogTimeout.srv
srv/ModbusAddSignal.srv
srv/ModbusDeleteSignal.srv
srv/ModbusDeleteAllSignals.srv
srv/ModbusGetSignalStatus.srv
srv/ModbusGetSignalNames.srv
srv/ModbusGetSignalTypes.srv
srv/ModbusGetSignalValues.srv
srv/ModbusGetSignalErrors.srv
srv/ModbusSendCustomCommand.srv
srv/ModbusSetDigitalInputAction.srv
srv/ModbusSetOutputRunstate.srv
srv/ModbusSetOutputSignal.srv
srv/ModbusSetOutputSignal1.srv
srv/ModbusSetOutputSignalWithTimeout.srv
srv/ModbusSetOutputSignalPulse.srv
srv/ModbusSetSignalUpdateFrequency.srv
srv/ModbusGetSignalIndex.srv
srv/ModbusGetSignalError.srv
srv/GetModbusDeviceStatus.srv
srv/AddModbusEncoder.srv
srv/AddInt32RegEncoder.srv
srv/DeleteVirtualEncoder.srv
srv/SyncMoveOn.srv
srv/SyncMoveSegment.srv
srv/SyncMoveOff.srv
srv/SyncMoveUndo.srv
srv/WaitSyncTasks.srv
srv/IsSyncMoveOn.srv
srv/SyncMoveSuspend.srv
srv/SyncMoveResume.srv
srv/FrameAdd.srv
srv/FrameAttach.srv
srv/FrameDeleteAll.srv
srv/FrameDelete.srv
srv/FrameMove.srv
srv/FrameGetPose.srv
srv/FrameConvertPose.srv
srv/FrameExist.srv
srv/FrameGetParent.srv
srv/FrameGetChildren.srv
srv/AxisGroupAdd.srv
srv/AxisGroupDelete.srv
srv/AxisGroupAddAxis.srv
srv/AxisGroupUpdateAxis.srv
srv/AxisGroupGetAxisIndex.srv
srv/AxisGroupGetAxisName.srv
srv/AxisGroupGetTargetPositions.srv
srv/AxisGroupGetActualPositions.srv
srv/AxisGroupOffsetPositions.srv
srv/AxisGroupMoveJoint.srv
srv/AxisGroupSpeedJoint.srv
srv/Alarm.srv
srv/Popup.srv
srv/Textmsg.srv
srv/Notify.srv
srv/Peek.srv
srv/GetDof.srv
srv/GetName.srv
srv/GetCycletime.srv
srv/SetSlowDownFraction.srv
srv/GetSlowDownFraction.srv
srv/GetRobotType.srv
srv/GetRobotSubType.srv
srv/GetControlBoxType.srv
srv/GetDefaultToolAcc.srv
srv/GetDefaultToolSpeed.srv
srv/GetDefaultJointAcc.srv
srv/GetDefaultJointSpeed.srv
srv/SetMountingPose.srv
srv/GetMountingPose.srv
srv/SetCollisionLevel.srv
srv/GetCollisionLevel.srv
srv/SetCollisionStopType.srv
srv/GetCollisionStopType.srv
srv/SetHomePosition.srv
srv/GetHomePosition.srv
srv/SetFreedriveDamp.srv
srv/GetFreedriveDamp.srv
srv/SetHandguidDamp.srv
srv/GetHandguidDamp.srv
srv/GetTcpForceSensorNames.srv
srv/SelectTcpForceSensor.srv
srv/HasTcpForceSensor.srv
srv/SetTcpForceOffset.srv
srv/GetTcpForceOffset.srv
srv/GetBaseForceSensorNames.srv
srv/SelectBaseForceSensor.srv
srv/HasBaseForceSensor.srv
srv/SetBaseForceOffset.srv
srv/GetBaseForceOffset.srv
srv/SetPersistentParameters.srv
srv/SetKinematicsCompensate.srv
srv/SetHardwareCustomParameters.srv
srv/GetHardwareCustomParameters.srv
srv/SetRobotZero.srv
srv/GetKinematicsParam.srv
srv/GetKinematicsCompensate.srv
srv/GetSafetyParametersCheckSum.srv
srv/ConfirmSafetyParameters.srv
srv/CalcSafetyParametersCheckSum.srv
srv/GetJointMaxPositions.srv
srv/GetJointMinPositions.srv
srv/GetJointMaxSpeeds.srv
srv/GetJointMaxAccelerations.srv
srv/GetTcpMaxSpeeds.srv
srv/GetTcpMaxAccelerations.srv
srv/ToolSpaceInRange.srv
srv/SetPayload.srv
srv/GetPayload.srv
srv/GetTcpOffset.srv
srv/GetGravity.srv
srv/SetGravity.srv
srv/SetTcpOffset.srv
srv/SetToolInertial.srv
srv/FirmwareUpdate.srv
srv/GetFirmwareUpdateProcess.srv
srv/SetTcpForceSensorPose.srv
srv/GetTcpForceSensorPose.srv
srv/GetLimitJointMaxPositions.srv
srv/GetLimitJointMinPositions.srv
srv/GetLimitJointMaxSpeeds.srv
srv/GetLimitJointMaxAccelerations.srv
srv/GetLimitTcpMaxSpeed.srv
srv/GetSafeguardStopType.srv
srv/GetSafeguardStopSource.srv
srv/AttachRobotBaseTo.srv
srv/GetRobotBaseParent.srv
srv/SetWorkObjectData.srv
srv/GetRobotEmergencyStopSource.srv
srv/GetSelectedTcpForceSensorName.srv
srv/AttachWeldingGun.srv
srv/SetCollisionThreshold.srv
srv/GetCollisionThreshold.srv
srv/EnableAxisGroup.srv
srv/DisableAxisGroup.srv
srv/EnableEndCollisionCheck.srv
srv/IsEndCollisionCheckEnabled.srv
srv/GetEqradius.srv
srv/SetEqradius.srv
srv/GetSpeedFraction.srv
srv/SetSpeedFraction.srv
srv/SpeedFractionCritical.srv
srv/IsSpeedFractionCritical.srv
srv/IsBlending.srv
srv/PathOffsetEnable.srv
srv/PathOffsetSet.srv
srv/PathOffsetDisable.srv
srv/JointOffsetEnable.srv
srv/JointOffsetSet.srv
srv/JointOffsetDisable.srv
srv/GetTrajectoryQueueSize.srv
srv/GetQueueSize.srv
srv/GetExecId.srv
srv/GetDuration.srv
srv/GetMotionLeftTime.srv
srv/GetProgress.srv
srv/SetWorkObjectHold.srv
srv/GetWorkObjectHold.srv
srv/GetPauseJointPositions.srv
srv/SetResumeStartPoint.srv
srv/GetResumeMode.srv
srv/SetServoMode.srv
srv/IsServoModeEnabled.srv
srv/SetServoModeSelect.srv
srv/GetServoModeSelect.srv
srv/ServoJoint.srv
srv/ServoCartesian.srv
srv/ServoJointWithAxes.srv
srv/ServoJointWithAxisGroup.srv
srv/ServoCartesianWithAxes.srv
srv/ServoCartesianWithAxisGroup.srv
srv/TrackJoint.srv
srv/TrackCartesian.srv
srv/FollowJoint.srv
srv/FollowLine.srv
srv/SpeedJoint.srv
srv/ResumeSpeedJoint.srv
srv/SpeedLine.srv
srv/ResumeSpeedLine.srv
srv/MoveSpline.srv
srv/MoveJoint.srv
srv/MoveJointWithAxisGroup.srv
srv/ResumeMoveJoint.srv
srv/MoveLine.srv
srv/MoveLineWithAxisGroup.srv
srv/MoveProcess.srv
srv/ResumeMoveLine.srv
srv/MoveCircle.srv
srv/MoveCircleWithAxisGroup.srv
srv/SetCirclePathMode.srv
srv/MoveCircle2.srv
srv/PathBufferAlloc.srv
srv/PathBufferAppend.srv
srv/PathBufferEval.srv
srv/PathBufferValid.srv
srv/PathBufferFree.srv
srv/PathBufferList.srv
srv/MovePathBuffer.srv
srv/MoveIntersection.srv
srv/StopJoint.srv
srv/ResumeStopJoint.srv
srv/StopLine.srv
srv/ResumeStopLine.srv
srv/WeaveStart.srv
srv/WeaveEnd.srv
srv/StorePath.srv
srv/StopMove.srv
srv/StartMove.srv
srv/ClearPath.srv
srv/RestoPath.srv
srv/SetFuturePointSamplePeriod.srv
srv/GetFuturePathPointsJoint.srv
srv/ConveyorTrackCircle.srv
srv/ConveyorTrackLine.srv
srv/ConveyorTrackStop.srv
srv/ConveyorTrackSwitch.srv
srv/HasItemOnConveyorToTrack.srv
srv/ConveyorTrackCreatItem.srv
srv/SetConveyorTrackEncoder.srv
srv/SetConveyorTrackCompensate.srv
srv/SetConveyorTrackLimit.srv
srv/SetConveyorTrackStartWindow.srv
srv/SetConveyorTrackSensorOffset.srv
srv/SetConveyorTrackSyncSeparation.srv
srv/IsConveyorTrackExceed.srv
srv/IsConveyorTrackSync.srv
srv/ConveyorTrackClearItems.srv
srv/GetConveyorTrackQueue.srv
srv/GetConveyorTrackNextItem.srv
srv/MoveSpiral.srv
srv/PathOffsetLimits.srv
srv/PathOffsetCoordinate.srv
srv/GetLookAheadSize.srv
srv/SetLookAheadSize.srv
srv/PathOffsetSupv.srv
srv/PathBufferFilter.srv
srv/WeaveUpdateParameters.srv
srv/EnableJointSoftServo.srv
srv/DisableJointSoftServo.srv
srv/IsJointSoftServoEnabled.srv
srv/EnableVibrationSuppress.srv
srv/DisbaleVibrationSuppress.srv
srv/SetTimeOptimalEnable.srv
srv/IsTimeOptimalEnabled.srv
srv/IsSupportedTimeOptimal.srv
srv/SetTcpMaxLinearVelocity.srv
srv/GetTcpMaxLinearVelocity.srv
srv/ResetTcpMaxLinearVelocity.srv
srv/SetEndPath.srv
srv/FcEnable.srv
srv/FcDisable.srv
srv/IsFcEnabled.srv
srv/SetTargetForce.srv
srv/FcSetSensorThresholds.srv
srv/FcSetSensorLimits.srv
srv/GetFcSensorThresholds.srv
srv/GetFcSensorLimits.srv
srv/SetDynamicModel1.srv
srv/FcCalDynamicModel.srv
srv/SetDynamicModelSearch.srv
srv/SetDynamicModelInsert.srv
srv/SetDynamicModelContact.srv
srv/SetDynamicModel.srv
srv/GetDynamicModel.srv
srv/SetCondForce.srv
srv/SetCondOrient.srv
srv/SetCondPlane.srv
srv/SetCondCylinder.srv
srv/SetCondSphere.srv
srv/SetCondTcpSpeed.srv
srv/SetCondActive.srv
srv/SetCondDistance.srv
srv/SetCondAdvanced.srv
srv/IsCondFullfiled.srv
srv/SetSupvForce.srv
srv/SetSupvOrient.srv
srv/SetSupvPosBox.srv
srv/SetSupvPosCylinder.srv
srv/SetSupvPosSphere.srv
srv/SetSupvReoriSpeed.srv
srv/SetSupvTcpSpeed.srv
srv/SetLpFilter.srv
srv/ResetLpFilter.srv
srv/SpeedChangeTune.srv
srv/SpeedChangeEnable.srv
srv/SpeedChangeDisable.srv
srv/SetDamping.srv
srv/ResetDamping.srv
srv/SoftFloatEnable.srv
srv/SoftFloatDisable.srv
srv/IsSoftFloatEnabled.srv
srv/SetSoftFloatParams.srv
srv/ToolContact.srv
srv/GetActualJointPositionsHistory.srv
srv/GetStandardDigitalInputNum.srv
srv/GetToolDigitalInputNum.srv
srv/GetConfigurableDigitalInputNum.srv
srv/GetStandardDigitalOutputNum.srv
srv/GetToolDigitalOutputNum.srv
srv/SetToolIoInput.srv
srv/IsToolIoInput.srv
srv/GetConfigurableDigitalOutputNum.srv
srv/GetStandardAnalogInputNum.srv
srv/GetToolAnalogInputNum.srv
srv/GetStandardAnalogOutputNum.srv
srv/GetToolAnalogOutputNum.srv
srv/SetDigitalInputActionDefault.srv
srv/SetStandardDigitalInputAction.srv
srv/SetToolDigitalInputAction.srv
srv/SetConfigurableDigitalInputAction.srv
srv/GetStandardDigitalInputAction.srv
srv/GetToolDigitalInputAction.srv
srv/GetConfigurableDigitalInputAction.srv
srv/SetDigitalOutputRunstateDefault.srv
srv/SetStandardDigitalOutputRunstate.srv
srv/SetToolDigitalOutputRunstate.srv
srv/SetConfigurableDigitalOutputRunstate.srv
srv/GetStandardDigitalOutputRunstate.srv
srv/GetToolDigitalOutputRunstate.srv
srv/GetConfigurableDigitalOutputRunstate.srv
srv/SetStandardAnalogOutputRunstate.srv
srv/SetToolAnalogOutputRunstate.srv
srv/GetStandardAnalogOutputRunstate.srv
srv/GetToolAnalogOutputRunstate.srv
srv/SetDigitalOutputAfterEStopDefault.srv
srv/SetAnalogOutputAfterEStopDefault.srv
srv/SetStandardDigitalOutputAfterEStop.srv
srv/SetConfigurableDigitalOutputAfterEStop.srv
srv/SetStandardAnalogOutputAfterEStop.srv
srv/SetStandardAnalogInputDomain.srv
srv/SetToolAnalogInputDomain.srv
srv/GetStandardAnalogInputDomain.srv
srv/GetToolAnalogInputDomain.srv
srv/SetStandardAnalogOutputDomain.srv
srv/SetToolAnalogOutputDomain.srv
srv/SetToolVoltageOutputDomain.srv
srv/GetToolVoltageOutputDomain.srv
srv/GetStandardAnalogOutputDomain.srv
srv/GetToolAnalogOutputDomain.srv
srv/SetStandardDigitalOutput.srv
srv/SetStandardDigitalOutputPulse.srv
srv/SetToolDigitalOutput.srv
srv/SetToolDigitalOutputPulse.srv
srv/SetConfigurableDigitalOutput.srv
srv/SetConfigurableDigitalOutputPulse.srv
srv/SetStandardAnalogOutput.srv
srv/SetToolAnalogOutput.srv
srv/GetStandardDigitalInput.srv
srv/GetStandardDigitalInputs.srv
srv/GetToolDigitalInput.srv
srv/GetToolDigitalInputs.srv
srv/GetConfigurableDigitalInput.srv
srv/GetConfigurableDigitalInputs.srv
srv/GetStandardAnalogInput.srv
srv/GetToolAnalogInput.srv
srv/GetStandardDigitalOutput.srv
srv/GetStandardDigitalOutputs.srv
srv/GetToolDigitalOutput.srv
srv/GetToolDigitalOutputs.srv
srv/GetConfigurableDigitalOutput.srv
srv/GetConfigurableDigitalOutputs.srv
srv/GetStandardAnalogOutput.srv
srv/GetToolAnalogOutput.srv
srv/GetStaticLinkInputNum.srv
srv/GetStaticLinkOutputNum.srv
srv/GetStaticLinkInputs.srv
srv/GetStaticLinkOutputs.srv
srv/HasEncoderSensor.srv
srv/SetEncDecoderType.srv
srv/SetEncTickCount.srv
srv/GetEncDecoderType.srv
srv/GetEncTickCount.srv
srv/UnwindEncDeltaTickCount.srv
srv/GetToolButtonStatus.srv
srv/GetHandleIoStatus.srv
srv/GetHandleType.srv
srv/CalibrateTcpForceSensor.srv
srv/CalibrateTcpForceSensor2.srv
srv/CalibrateTcpForceSensor3.srv
srv/PayloadIdentify.srv
srv/PayloadIdentify1.srv
srv/PayloadCalculateFinished.srv
srv/GetPayloadIdentifyResult.srv
srv/GeneratePayloadIdentifyTraj.srv
srv/PayloadIdentifyTrajGenFinished.srv
srv/FrictionModelIdentify.srv
srv/CalibWorkpieceCoordinatePara.srv
srv/ForwardDynamics.srv
srv/ForwardKinematics.srv
srv/ForwardKinematicsAll.srv
srv/ForwardToolKinematics.srv
srv/ForwardDynamics1.srv
srv/ForwardKinematics1.srv
srv/InverseKinematics.srv
srv/InverseKinematicsAll.srv
srv/InverseKinematics1.srv
srv/InverseKinematicsAll1.srv
srv/InverseToolKinematics.srv
srv/InverseToolKinematicsAll.srv
srv/GetRobotConfiguration.srv
srv/PathMovej.srv
srv/PathBlend3Points.srv
srv/CalcJacobian.srv
srv/PathMoveS.srv
srv/CalibVibrationParams.srv
srv/CalibVibrationParams1.srv
srv/NeedVibrationRecalib.srv
srv/ValidatePath.srv
srv/Poweron.srv
srv/Startup.srv
srv/ReleaseRobotBrake.srv
srv/LockRobotBrake.srv
srv/Poweroff.srv
srv/Backdrive.srv
srv/Freedrive.srv
srv/SetHandguideParams.srv
srv/GetHandguideFreeAxes.srv
srv/GetHandguideFeature.srv
srv/HandguideMode.srv
srv/ExitHandguideMode.srv
srv/GetHandguideStatus.srv
srv/GetHandguideTrigger.srv
srv/IsHandguideEnabled.srv
srv/SetSim.srv
srv/SetOperationalMode.srv
srv/GetOperationalMode.srv
srv/GetRobotControlMode.srv
srv/IsSimulationEnabled.srv
srv/IsFreedriveEnabled.srv
srv/IsBackdriveEnabled.srv
srv/SetUnlockProtectiveStop.srv
srv/RecordCacheFree.srv
srv/StartRecordCache.srv
srv/StopRecordCache.srv
srv/PauseRecordCache.srv
srv/StartRecord.srv
srv/StopRecord.srv
srv/PauseRecord.srv
srv/RestartInterfaceBoard.srv
srv/SetLinkModeEnable.srv
srv/IsLinkModeEnabled.srv
srv/GenerateDiagnoseFile.srv
srv/GetRobotModeType.srv
srv/GetSafetyModeType.srv
srv/IsPowerOn.srv
srv/IsSteady.srv
srv/IsCollisionOccurred.srv
srv/IsWithinSafetyLimits.srv
srv/GetTcpPose.srv
srv/GetActualTcpOffset.srv
srv/GetTargetTcpPose.srv
srv/GetToolPose.srv
srv/GetTcpSpeed.srv
srv/GetTcpForce.srv
srv/GetElbowPosistion.srv
srv/GetElbowVelocity.srv
srv/GetBaseForce.srv
srv/GetTcpTargetPose.srv
srv/GetTcpTargetSpeed.srv
srv/GetTcpTargetForce.srv
srv/GetJointState.srv
srv/GetJointServoMode.srv
srv/GetJointPositions.srv
srv/GetJointPositionsHistory.srv
srv/GetJointSpeeds.srv
srv/GetJointAccelerations.srv
srv/GetJointTorqueSensors.srv
srv/GetJointContactTorques.srv
srv/GetJointGravityTorques.srv
srv/GetBaseForceSensor.srv
srv/GetTcpForceSensors.srv
srv/GetJointCurrents.srv
srv/GetJointVoltages.srv
srv/GetJointTemperatures.srv
srv/GetJointUniqueIds.srv
srv/GetJointFirmwareVersions.srv
srv/GetJointHardwareVersions.srv
srv/GetMasterBoardUniqueId.srv
srv/GetMasterBoardFirmwareVersion.srv
srv/GetMasterBoardHardwareVersion.srv
srv/GetSlaveBoardUniqueId.srv
srv/GetSlaveBoardFirmwareVersion.srv
srv/GetSlaveBoardHardwareVersion.srv
srv/GetToolUniqueId.srv
srv/GetToolFirmwareVersion.srv
srv/GetToolHardwareVersion.srv
srv/GetToolCommMode.srv
srv/GetPedestalUniqueId.srv
srv/GetPedestalFirmwareVersion.srv
srv/GetPedestalHardwareVersion.srv
srv/GetJointTargetPositions.srv
srv/GetJointTargetSpeeds.srv
srv/GetJointTargetAccelerations.srv
srv/GetJointTargetTorques.srv
srv/GetJointTargetCurrents.srv
srv/IsTeachPendantEnabled.srv
srv/IsToolFlangeEnabled.srv
srv/GetControlBoxTemperature.srv
srv/GetControlBoxHumidity.srv
srv/GetMainVoltage.srv
srv/GetMainCurrent.srv
srv/GetRobotVoltage.srv
srv/GetRobotCurrent.srv
srv/GetSlowDownLevel.srv
srv/GetTcpForceSensorStatus.srv
msg/Float64Array.msg
msg/Float64ArrayList.msg
msg/StringFloat64ArrayKV.msg
msg/StringFloat64ArrayMap.msg
msg/RobotSafetyParameterRange.msg
msg/WObjectData.msg
msg/CircleParameters.msg
msg/SpiralParameters.msg
msg/TrajConfig.msg
msg/VibrationRecalibrationParameter.msg
msg/Vector3f.msg
msg/Vector4f.msg
msg/Vector6f.msg
msg/RobotSafetyParameterRangeParam.msg
msg/RobotSafetyParameterTriggerPlane.msg
msg/RobotSafetyParameterCubic.msg
msg/Enveloping.msg
msg/Float64Row.msg
action/ServoMode.action

View File

@ -0,0 +1,10 @@
float64[] pose_via
float64[] pose_to
float64 a
float64 v
float64 blend_radius
float64 duration
float64 helix
float64 spiral
float64 direction
int32 loop_times

View File

@ -0,0 +1,3 @@
int32 shape
float64[] ep_args
string stl_path

View File

@ -0,0 +1 @@
float64[] data

View File

@ -0,0 +1 @@
Float64Array[] rows

View File

@ -0,0 +1 @@
float64[] data

View File

@ -0,0 +1,3 @@
Vector6f orig
Vector3f size
int32 restrict_elbow

View File

@ -0,0 +1,28 @@
uint32 crc32
RobotSafetyParameterRangeParam[] params
RobotSafetyParameterTriggerPlane[] trigger_planes
RobotSafetyParameterCubic[] cubic
Vector4f[] tools
float32 tool_inclination
float32 tool_azimuth
float32[] safety_home
uint32 safety_input_emergency_stop
uint32 safety_input_safeguard_stop
uint32 safety_input_safeguard_reset
uint32 safety_input_auto_safeguard_stop
uint32 safety_input_auto_safeguard_reset
uint32 safety_input_three_position_switch
uint32 safety_input_operational_mode
uint32 safety_input_reduced_mode
uint32 safety_input_handguide
uint32 safety_output_emergency_stop
uint32 safety_output_not_emergency_stop
uint32 safety_output_robot_moving
uint32 safety_output_robot_steady
uint32 safety_output_reduced_mode
uint32 safety_output_not_reduced_mode
uint32 safety_output_safe_home
uint32 safety_output_robot_not_stopping
uint32 safety_output_safetyguard_stop
int32 tp_3pe_for_handguide
int32 allow_manual_high_speed

View File

@ -0,0 +1,19 @@
float32 power
float32 momentum
float32 stop_time
float32 stop_distance
float32 reduced_entry_time
float32 reduced_entry_distance
float32 tcp_speed
float32 elbow_speed
float32 tcp_force
float32 elbow_force
float32[] qmin
float32[] qmax
float32[] qdmax
float32[] joint_torque
Vector3f tool_orientation
float32 tool_deviation
uint32 planes_size
Vector4f[] planes
int32[] restrict_elbow

View File

@ -0,0 +1,2 @@
Vector4f plane
int32 restrict_elbow

View File

@ -0,0 +1,5 @@
float64[] frame
int32 plane
float64 angle
float64 spiral
float64 helix

View File

@ -0,0 +1,2 @@
string key
float64[] value

View File

@ -0,0 +1 @@
StringFloat64ArrayKV[] items

View File

@ -0,0 +1,7 @@
Enveloping[] envelopings
int32 move_axis
float64[] init_joint
float64[] upper_joint_bound
float64[] lower_joint_bound
float64[] max_velocity
float64[] max_acceleration

View File

@ -0,0 +1 @@
float64[3] data

View File

@ -0,0 +1 @@
float64[4] data

Some files were not shown because too many files have changed in this diff Show More