diff --git a/config/cabin_robot.xml b/config/cabin_robot.xml
index 67695934..22de6619 100644
--- a/config/cabin_robot.xml
+++ b/config/cabin_robot.xml
@@ -70,6 +70,9 @@
+
+
+
diff --git a/src/device_manager/CMakeLists.txt b/src/device_manager/CMakeLists.txt
index 54b26943..0dd2b955 100644
--- a/src/device_manager/CMakeLists.txt
+++ b/src/device_manager/CMakeLists.txt
@@ -15,7 +15,7 @@ target_link_libraries(device_manager PRIVATE
cmvr_es::device::rh56dftp_dexhand
cmvr::device::head_esp32
cmvr_es::device::humanoid_robot
-# cmvr_es::device::ti5robot
+ cmvr_es::device::aubo_robot
)
add_library(cmvr_es::device_manager ALIAS device_manager)
\ No newline at end of file
diff --git a/src/device_manager/src/device_factory.cpp b/src/device_manager/src/device_factory.cpp
index d56641be..3f66e3db 100644
--- a/src/device_manager/src/device_factory.cpp
+++ b/src/device_manager/src/device_factory.cpp
@@ -2,17 +2,18 @@
// Created by xtkuang on 2025/5/13.
//
-#include "../include/device_factory.h"
-#include "../../devices/biohead/biohead_esp32/include/biohead_esp32.h"
-#include "../../devices/camera/uvc_camera/include/uvc_camera.h"
-#include "../../devices/camera/mechmind/include/mechmind_camera.h"
-#include "../../devices/speaker/ffmpeg_speaker/include/ffmpeg_speaker.h"
-#include "../../devices/microphone/ffmpeg_microphone/include/ffmpeg_microphone.h"
-#include "../../devices/camera/realsense_camera/include/realsense_camera.h"
-#include "../../devices/dexhand/rh56dftp_dexhand/include/rh56dftp_dexhand.h"
-#include "../../devices/robot/humanoid_robot/include/humanoid_robot.h"
+#include "device_manager/include/device_factory.h"
+#include "devices/biohead/biohead_esp32/include/biohead_esp32.h"
+#include "devices/camera/uvc_camera/include/uvc_camera.h"
+#include "devices/camera/mechmind/include/mechmind_camera.h"
+#include "devices/speaker/ffmpeg_speaker/include/ffmpeg_speaker.h"
+#include "devices/microphone/ffmpeg_microphone/include/ffmpeg_microphone.h"
+#include "devices/camera/realsense_camera/include/realsense_camera.h"
+#include "devices/dexhand/rh56dftp_dexhand/include/rh56dftp_dexhand.h"
+#include "devices/robot/humanoid_robot/include/humanoid_robot.h"
//#include "robot/ti5_robot/ti5_robot.h"
#include "data_center/include/motors_info.h"
+#include "devices/robot/aubo_robot/include/aubo_robot.h"
using namespace std;
using namespace cmvr::device;
@@ -125,6 +126,9 @@ std::shared_ptr DeviceFactory::create_robot_(const XmlNode& cfg)
motos_info->init(cfg);
return std::make_shared>(cfg);
}
+ else if (cfg.getNodeName() == "AuboRobot") {
+ return std::make_shared>(cfg);
+ }
else {
LOG(ERROR) << "[DeviceFactory]: Unsupported device type " << cfg.getNodeName();
return nullptr;
diff --git a/src/devices/robot/CMakeLists.txt b/src/devices/robot/CMakeLists.txt
index 599ad24f..89b22b90 100644
--- a/src/devices/robot/CMakeLists.txt
+++ b/src/devices/robot/CMakeLists.txt
@@ -1,3 +1,4 @@
#add_subdirectory(ti5_robot)
add_subdirectory(humanoid_robot)
-#add_subdirectory(c701)
\ No newline at end of file
+#add_subdirectory(c701)
+add_subdirectory(aubo_robot)
\ No newline at end of file
diff --git a/src/devices/robot/aubo_robot/CMakeLists.txt b/src/devices/robot/aubo_robot/CMakeLists.txt
new file mode 100644
index 00000000..1e16c41d
--- /dev/null
+++ b/src/devices/robot/aubo_robot/CMakeLists.txt
@@ -0,0 +1,34 @@
+# 第一步:先定义 Aubo SDK 的路径(必须在 add_library 之前!)
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ set(AUBO_SDK_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/third_party/AuboSdk/linux/include)
+ set(AUBO_SDK_LIB_DIR ${CMAKE_SOURCE_DIR}/third_party/AuboSdk/linux/lib)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+ set(AUBO_SDK_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/third_party/AuboSdk/win/include)
+ set(AUBO_SDK_LIB_DIR ${CMAKE_SOURCE_DIR}/third_party/AuboSdk/win/lib)
+endif()
+
+# 第二步:创建 aubo_robot 库(此时 SDK 路径已经定义好了)
+add_library(aubo_robot SHARED src/aubo_robot.cpp)
+
+# 第三步:给 aubo_robot 配置头文件路径(合并你原来的 ${CMAKE_CURRENT_SOURCE_DIR} 和 SDK 的 include 目录)
+target_include_directories(aubo_robot
+ PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR} # 你原来的路径(如果需要的话)
+ ${AUBO_SDK_INCLUDE_DIR} # SDK 头文件路径(关键!)
+)
+
+# 第四步:给 aubo_robot 配置库文件路径(精准绑定到目标,比 link_directories 靠谱)
+target_link_directories(aubo_robot
+ PRIVATE
+ ${AUBO_SDK_LIB_DIR} # SDK 库文件路径(关键!)
+)
+
+# 第五步:链接 SDK 库(和你原来一致,但现在路径已经生效)
+target_link_libraries(aubo_robot
+ PRIVATE
+ aubo_sdk
+ robot_proxy
+)
+
+# 别名(不变)
+add_library(cmvr_es::device::aubo_robot ALIAS aubo_robot)
\ No newline at end of file
diff --git a/src/devices/robot/aubo_robot/include/aubo_robot.h b/src/devices/robot/aubo_robot/include/aubo_robot.h
new file mode 100644
index 00000000..83d4dc9f
--- /dev/null
+++ b/src/devices/robot/aubo_robot/include/aubo_robot.h
@@ -0,0 +1,47 @@
+//
+// Created by linbo on 2025/11/7.
+//
+
+#ifndef CMVR_ES_AUBO_ROBOT_H
+#define CMVR_ES_AUBO_ROBOT_H
+#include "devices/robot/abstract_robot.h"
+#include "aubo_sdk/rpc.h"
+#include "cmvr/msgs/robot_detail.pb.h"
+using namespace arcs::common_interface;
+using namespace arcs::aubo_sdk;
+namespace cmvr::device
+{
+ template
+ class AuboRobot: public AbstractRobot {
+ public:
+ explicit AuboRobot(const XmlNode& cfg);
+ ~AuboRobot();
+ void init () override;
+
+ void torqueOn() override;
+ void torqueOff() override;
+
+ void getJointsState(std::vector& states) override;
+
+ void moveJ(std::vector& cmd, double vel, double acc) override;
+
+ void moveL(math::Pose3d& pose, double vel, double acc) override;
+
+ void calibrateZeroQ(const std::string& joint_name) override;
+ msgs::Pose3d fk(const std::string &base_link, const std::string &ee_link) override;
+ std::vector ik(const std::string &base_link, const std::string &ee_link,msgs::Pose3d pose) override;
+ private:
+ static void waitForRobotMode(const RobotInterfacePtr& robot_interface,
+ const RobotModeType& target_mode);
+ private:
+ std::string ip_;
+ int port_;
+ std::string username_;
+ std::string password_;
+ std::shared_ptr rpc_cli_;
+ };
+}
+
+
+
+#endif //CMVR_ES_AUBO_ROBOT_H
\ No newline at end of file
diff --git a/src/devices/robot/aubo_robot/src/aubo_robot.cpp b/src/devices/robot/aubo_robot/src/aubo_robot.cpp
new file mode 100644
index 00000000..79c3a52b
--- /dev/null
+++ b/src/devices/robot/aubo_robot/src/aubo_robot.cpp
@@ -0,0 +1,271 @@
+//
+// Created by linbo on 2025/11/7.
+//
+
+#include "devices/robot/aubo_robot/include/aubo_robot.h"
+using namespace std;
+using namespace cmvr::device;
+
+template
+AuboRobot::AuboRobot(const XmlNode &cfg) : AbstractRobot(cfg)
+{
+ try {
+ id_ = cfg.getAttrString("id");
+ ip_ = cfg.getAttrString("ip");
+ port_ = cfg.getAttrDefault("port",30004);
+ username_ = cfg.getAttrString("username");
+ password_ = cfg.getAttrString("password");
+ } catch (std::exception &e) {
+ throw runtime_error(e.what());
+ }
+}
+
+
+template
+AuboRobot::~AuboRobot()
+{
+ if (rpc_cli_)
+ {
+ // 接口调用: 退出登录
+ rpc_cli_->logout();
+ // 接口调用: 断开连接
+ rpc_cli_->disconnect();
+ }
+}
+
+template
+void AuboRobot::init ()
+{
+ //初始化AuboSDK
+ rpc_cli_ = std::make_shared();
+
+ // 接口调用: 设置 RPC 超时
+ rpc_cli_->setRequestTimeout(1000);
+ // 接口调用: 连接到 RPC 服务
+ rpc_cli_->connect(ip_, port_);
+ // 接口调用: 登录
+ rpc_cli_->login(username_, password_);
+}
+template
+void AuboRobot::waitForRobotMode(const RobotInterfacePtr& robot_interface,
+ const RobotModeType& target_mode)
+{
+ // 接口调用: 获取当前机械臂的模式
+ auto current_mode = robot_interface->getRobotState()->getRobotModeType();
+
+ while (current_mode != target_mode) {
+ std::cout << "机械臂当前模式:" << current_mode << std::endl;
+ std::this_thread::sleep_for(std::chrono::seconds(1));
+ current_mode = robot_interface->getRobotState()->getRobotModeType();
+ }
+}
+template
+void AuboRobot::torqueOn()
+{
+ // 接口调用: 获取机器人的名字
+ auto robot_name = rpc_cli_->getRobotNames().front();
+
+ auto robot_interface = rpc_cli_->getRobotInterface(robot_name);
+
+ // 接口调用: 设置负载
+ double mass = 0.0;
+ std::vector cog(3, 0.0);
+ std::vector aom(3, 0.0);
+ std::vector inertia(6, 0.0);
+ robot_interface->getRobotConfig()->setPayload(mass, cog, aom, inertia);
+
+ // 接口调用: 获取机械臂当前模式
+ auto robot_mode = robot_interface->getRobotState()->getRobotModeType();
+
+ if (robot_mode == RobotModeType::Running) {
+ std::cout << "机械臂已松刹车,处于运行模式" << std::endl;
+
+ } else {
+ // 接口调用: 机械臂发起上电请求
+ robot_interface->getRobotManage()->poweron();
+
+ // 等待机械臂进入空闲模式
+ waitForRobotMode(robot_interface, RobotModeType::Idle);
+
+ std::cout << "机械臂上电成功,当前模式:"
+ << robot_interface->getRobotState()->getRobotModeType()
+ << std::endl;
+
+ // 接口调用: 机械臂发起松刹车请求
+ rpc_cli_->getRobotInterface(robot_name)->getRobotManage()->startup();
+
+ // 等待机械臂进入运行模式
+ waitForRobotMode(robot_interface, RobotModeType::Running);
+
+ std::cout << "机械臂松刹车成功,当前模式:"
+ << robot_interface->getRobotState()->getRobotModeType()
+ << std::endl;
+ }
+}
+template
+void AuboRobot::getJointsState(std::vector& states)
+{
+ try {
+ // 接口调用: 获取机器人的名字
+ auto robot_name = rpc_cli_->getRobotNames().front();
+
+ auto robot_interface = rpc_cli_->getRobotInterface(robot_name);
+ auto rebotState = robot_interface->getRobotState();
+ states.clear();
+ JointState state;
+ //获取关节位置和速度
+ for (int i = 0; i < 6; i++) {
+ state.velocity = rebotState->getJointSpeeds()[i];
+ state.position = rebotState->getJointPositions()[i];
+ states.push_back(state);
+ }
+ } catch (exception &e) {
+ throw runtime_error(e.what());
+ }
+}
+
+
+template
+void AuboRobot::torqueOff()
+{
+ // 接口调用: 获取机器人的名字
+ auto robot_name = rpc_cli_->getRobotNames().front();
+
+ auto robot_interface = rpc_cli_->getRobotInterface(robot_name);
+
+ // 接口调用: 机械臂断电
+ robot_interface->getRobotManage()->poweroff();
+
+ // 等待机械臂进入断电模式
+ waitForRobotMode(robot_interface, RobotModeType::PowerOff);
+
+ std::cout << "机械臂断电成功,当前模式:"
+ << robot_interface->getRobotState()->getRobotModeType()
+ << std::endl;
+}
+template
+void AuboRobot::moveJ(std::vector& cmd, double vel, double acc)
+{
+ try
+ {
+ //检查参数
+ if (cmd.size() != dof_)
+ {
+ LOG(ERROR) << "[AuboRobot](moveJ)Wrong number of cmd";
+ throw std::invalid_argument("[AuboRobot](moveJ)Wrong number of cmd");
+ }
+ //调用aubo sdk接口实现moveJ
+
+ // 接口调用: 获取机器人的名字
+ auto robot_name = rpc_cli_->getRobotNames().front();
+
+ auto robot_interface = rpc_cli_->getRobotInterface(robot_name);
+
+ // 接口调用: 设置机械臂的速度比率
+ robot_interface->getMotionControl()->setSpeedFraction(0.3);
+
+ /*
+ * 1、严格遵守公司安全规章制度,严格遵守相关的国家安全规章制度,发现隐患及时上报
+ * 2、工作前按规定佩戴安全保护工具
+ * 3、定期检查存在安全隐患的设备
+ * 4、积极参与公司组织的安全培训
+ * 5、在进行危险工作过程中相互监查,安全作业
+ */
+ // 接口调用: 关节运动
+ // 关节角,单位: 弧度 (此处为6关节)
+ std::vector joint_angle;
+ for (int i = 0; i < cmd.size(); i++)
+ {
+ joint_angle.emplace_back(cmd[i].rad);
+ }
+ robot_interface->getMotionControl()->moveJoint(
+ joint_angle, acc, vel, 0, 0);
+ }
+ catch (std::exception& e)
+ {
+ throw std::invalid_argument(e.what());
+ }
+}
+
+template
+void AuboRobot::calibrateZeroQ(const std::string& joint_name)
+{
+
+}
+
+template
+cmvr::msgs::Pose3d AuboRobot::fk(const std::string &base_link, const std::string &ee_link)
+{
+ cmvr::msgs::Pose3d pose;
+
+
+ return pose;
+}
+
+template
+std::vector AuboRobot::ik(const std::string &base_link, const std::string &ee_link,msgs::Pose3d pose)
+{
+ std::vector ik;
+
+
+ return ik;
+}
+// 实现阻塞功能: 当机械臂运动到目标路点时,程序再往下执行
+int waitArrival(RobotInterfacePtr impl) {
+ const int max_retry_count = 5;
+ int cnt = 0;
+
+ // 接口调用: 获取当前的运动指令 ID
+ int exec_id = impl->getMotionControl()->getExecId();
+
+ // 等待机械臂开始运动
+ while (exec_id == -1) {
+ if (cnt++ > max_retry_count) {
+ return -1;
+ }
+ std::this_thread::sleep_for(std::chrono::milliseconds(50));
+ exec_id = impl->getMotionControl()->getExecId();
+ }
+
+ // 等待机械臂动作完成
+ while (impl->getMotionControl()->getExecId() != -1) {
+ std::this_thread::sleep_for(std::chrono::milliseconds(50));
+ }
+
+ return 0;
+}
+template
+void AuboRobot::moveL(math::Pose3d& pose, double vel, double acc)
+{
+ // 接口调用: 获取机器人的名字
+ auto robot_name = rpc_cli_->getRobotNames().front();
+
+ auto robot_interface = rpc_cli_->getRobotInterface(robot_name);
+
+ // 接口调用: 设置机械臂的速度比率
+ robot_interface->getMotionControl()->setSpeedFraction(0.75);
+
+ // 接口调用: 设置工具中心点(TCP相对于法兰盘中心的偏移)
+ std::vector tcp_offset(6, 0.0);
+ robot_interface->getRobotConfig()->setTcpOffset(tcp_offset);
+
+ // 接口调用: 直线运动到位置
+ std::vector pose1;
+ pose1.emplace_back(pose.position.x);
+ pose1.emplace_back(pose.position.y);
+ pose1.emplace_back(pose.position.z);
+ pose1.emplace_back(pose.euler.rx);
+ pose1.emplace_back(pose.euler.ry);
+ pose1.emplace_back(pose.euler.rz);
+ robot_interface->getMotionControl()->moveLine(pose1, acc, vel, 0.025, 0);
+ // 阻塞
+ auto ret = waitArrival(robot_interface);
+ if (ret == 0) {
+ LOG(INFO)<<"直线运动到位置成功!";
+ } else {
+ LOG(INFO)<<"直线运动到位置失败!";
+ }
+}
+
+
+template class cmvr::device::AuboRobot<6>;
diff --git a/third_party/AuboSdk/linux/include/AuboRobotMetaType.h b/third_party/AuboSdk/linux/include/AuboRobotMetaType.h
new file mode 100644
index 00000000..aa9995b3
--- /dev/null
+++ b/third_party/AuboSdk/linux/include/AuboRobotMetaType.h
@@ -0,0 +1,1670 @@
+#ifndef AUBOROBOTMETATYPE_H
+#define AUBOROBOTMETATYPE_H
+
+#include
+#include
+#include "robotiomatetype.h"
+
+#if defined(SERVICE_INTERFACE_BUILD_STAGE) // 编译阶段
+#if defined __GNUC__
+#define SERVICE_INTERFACE_ABI_EXPORT __attribute__((visibility("default")))
+#define SERVICE_INTERFACE_ABI_LOCAL __attribute__((visibility("hidden")))
+#else
+#define SERVICE_INTERFACE_ABI_EXPORT __declspec(dllexport)
+#define SERVICE_INTERFACE_ABI_LOCAL __attribute__((visibility("hidden")))
+#endif
+#else // 链接阶段
+#if defined __GNUC__
+#define SERVICE_INTERFACE_ABI_EXPORT
+#define SERVICE_INTERFACE_ABI_LOCAL
+#else
+#define SERVICE_INTERFACE_ABI_EXPORT __declspec(dllimport)
+#define SERVICE_INTERFACE_ABI_LOCAL
+#endif
+#endif
+
+/**
+ * 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;
+
+#ifdef __GNUC__
+#define PACK(__Declaration__) __Declaration__ __attribute__((__packed__))
+#endif
+
+#ifdef _MSC_VER
+#define PACK(__Declaration__) \
+ __pragma(pack(push, 1)) __Declaration__ __pragma(pack(pop))
+#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * 命名空间 aubo_robot_namespace
+ **/
+namespace aubo_robot_namespace {
+enum CollisionMode
+{
+ CollisionMode_Free,
+ CollisionMode_Stuck,
+ // CollisionMode_Adamittance,
+};
+
+enum
+{
+ ARM_DOF = 6, //机械臂关节数
+};
+
+/**
+ * 机械臂类型
+ **/
+typedef enum
+{
+ ROBOT_I5 = 0,
+ ROBOT_I7 = 1,
+ ROBOT_I10_12 = 2,
+ ROBOT_I3S = 3,
+ ROBOT_I3 = 4,
+ ROBOT_I5S = 5,
+ ROBOT_I5RX = 501,
+ ROBOT_I5A_02 = 502,
+ ROBOT_I5A_03 = 503,
+ ROBOT_I5L = 6,
+ ROBOT_I10S = 7,
+ ROBOT_I16 = 8,
+ ROBOT_I20 = 9,
+ ROBOT_I20_1500 = 901,
+ ROBOT_I20_1650_A = 902,
+ ROBOT_I20TD = 10,
+ ROBOT_G3 = 11,
+ ROBOT_G6 = 12,
+ ROBOT_F12B = 20,
+ ROBOT_I12 = 21,
+ ROBOT_I18 = 22,
+ ROBOT_T6 = 23,
+ ROBOT_I5_NET = 24,
+ ROBOT_I20L_1900 = 25,
+ ROBOT_I10_CM01 = 26,
+ ROBOT_I20_BZL = 27,
+ ROBOT_IS10 = 50,
+ ROBOT_IS20 = 51,
+ ROBOT_IS7 = 52,
+ ROBOT_I25 = 53,
+ ROBOT_I27 = 54,
+ ROBOT_I35 = 55,
+ ROBOT_I10_JY = 56,
+ ROBOT_IS25_1500 = 57,
+ ROBOT_I10L = 58,
+ ROBOT_IS20L = 59,
+ ROBOT_IS20L_T0 = 60,
+ ROBOT_IS25_1700 = 61,
+ ROBOT_I3_F = 62,
+ ROBOT_I5_F = 63,
+ ROBOT_I7_F = 64,
+ ROBOT_I10_F = 65,
+ ROBOT_I12_F = 66,
+ ROBOT_I16_F = 67,
+ ROBOT_IS7_F = 68,
+} RobotType;
+
+/**
+ * DH参数
+ **/
+typedef struct
+{
+ double A3;
+ double A4;
+ double D1;
+ double D2;
+ double D5;
+ double D6;
+
+ // general dh model
+ double alpha[ARM_DOF];
+ double a[ARM_DOF];
+ double d[ARM_DOF];
+ double theta[ARM_DOF];
+} RobotDhPara;
+
+typedef enum
+{
+ RobotControllerErr_MotionCfgErr, // only this is recoverable.
+ RobotControllerErr_OverspeedProtect,
+ RobotControllerErr_IkFailure,
+ RobotControllerErr_OnlineTrajErr,
+ RobotControllerErr_OfflineTrajErr,
+ RobotControllerErr_StatusException,
+} RobotControllerErrorCode;
+
+typedef enum
+{
+ RUN_TO_READY_POSITION,
+ RUN_PROJECT,
+ PAUSE_PROJECT,
+ CONTINUE_PROJECT,
+ SLOWLY_STOP_PROJECT,
+ LOAD_PROJECT,
+ ENTER_SAFEGUARD_MODE_BY_DI_EXTERNAL_SAFEGUARD_STOP,
+ RELEASE_SAFEGUARD_MODE_IN_AUTOMATIC_MODE,
+ RELEASE_SAFEGUARD_MODE_IN_MANUAL_MODE,
+ MANUALLY_RELEASE_SAFEGUARD_MODE_PROMPT,
+ ENTER_SAFEGUARD_MODE_BY_TRI_STATE_SWITCH,
+ RELEASE_SAFEGUARD_MODE_BY_TRI_STATE_SWITCH,
+ ENTER_REDUCE_MODE,
+ RELEASE_REDUCE_MODE,
+ REMOTE_CLEAR_ALARM_SIGNAL,
+ PROJECT_STARTUP_IS_SAFETY,
+ START_RUN_TO_READY_POSITION,
+ STOP_RUN_TO_READY_POSITION
+} InterfaceBoardSafeIoEventCode;
+
+/**
+ * 机械臂诊断信息
+ **/
+PACK(struct RobotDiagnosis {
+ uint8
+ armCanbusStatus; // CAN通信状态:0x01~0x80:关节CAN通信错误(每个关节占用1bit)
+ // 0x00:无错误
+ float armPowerCurrent; // 机械臂48V电源当前电流
+ float armPowerVoltage; // 机械臂48V电源当前电压
+ bool armPowerStatus; // 机械臂48V电源状态(开、关)
+ char contorllerTemp; // 控制箱温度
+ uint8 contorllerHumidity; // 控制箱湿度
+ bool remoteHalt; // 远程关机信号
+ bool softEmergency; // 机械臂软急停
+ bool remoteEmergency; // 远程急停信号
+ bool robotCollision; // 碰撞检测位
+ bool forceControlMode; // 机械臂进入力控模式标志位
+ bool brakeStuats; // 刹车状态
+ float robotEndSpeed; // 末端速度
+ int robotMaxAcc; // 最大加速度
+ bool orpeStatus; // 上位机软件状态位
+ bool enableReadPose; // 位姿读取使能位
+ bool robotMountingPoseChanged; // 安装位置状态
+ bool encoderErrorStatus; // 磁编码器错误状态
+ bool staticCollisionDetect; // 静止碰撞检测开关
+ uint8 jointCollisionDetect; // 关节碰撞检测 每个关节占用1bit 0-无碰撞
+ // 1-存在碰撞
+ bool encoderLinesError; // 光电编码器不一致错误 0-无错误 1-有错误
+ bool jointErrorStatus; // joint error status
+ bool singularityOverSpeedAlarm; // 机械臂奇异点过速警告
+ bool robotCurrentAlarm; // 机械臂电流错误警告
+ uint8 toolIoError; // tool error
+ bool robotMountingPoseWarning; // 机械臂安装位置错位(只在力控模式下起作用)
+ uint16 macTargetPosBufferSize; // mac缓冲器长度 预留
+ uint16 macTargetPosDataSize; // mac缓冲器有效数据长度 预留
+ uint8 macDataInterruptWarning; // mac数据中断 预留
+ uint8 controlBoardAbnormalStateFlag; //主控板(接口板)异常状态标志
+});
+
+PACK(struct OrpeSafetyStatus {
+ uint8 orpePause; // 上位机暂停状态
+ uint8 orpeStop; // 上位机停止状态
+ uint8 orpeError[16]; // 上位机错误
+ uint8 systemEmergencyStop; // 解除系统紧急停止输出信号
+ uint8 reducedModeError; // 解除缩减错误
+ uint8 safetyguardResetSucc; // 防护重置成功
+});
+
+PACK(struct RobotSafetyConfig {
+ uint16 robotReducedConfigJointSpeed[6]; //缩减配置 关节速度限制
+ uint32 robotReducedConfigTcpSpeed; //缩减配置 TCP速度限制
+ uint32 robotReducedConfigTcpForce; //缩减配置 TCP力(暂定为碰撞等级)
+ uint32 robotReducedConfigMomentum; //缩减配置 动量
+ uint32 robotReducedConfigPower; //缩减配置 功率
+ uint8 robotSafeguradResetConfig; //防护重 置设置
+ uint8 robotOperationalModeConfig; //操作模式设置
+});
+
+PACK(struct RegulateSpeedModeParamConfig_t {
+ double maxTcpVelocity; //末端速度
+ double maxTcpAcceleration; //末端加速度
+ double maxJointVelocity[ARM_DOF]; //关节速度
+ double maxJointAcceleration[ARM_DOF]; //关节加速度
+});
+
+PACK(struct AdmittancePatam_t {
+ double inertia[ARM_DOF]; //导纳系数之 惯量inertia
+ double damping[ARM_DOF]; //导纳系数之 阻尼(b)damping
+ double stiffness[ARM_DOF]; //导纳系数之 刚度(k)stiffness
+});
+
+/**
+ * @brief IO的类型枚举
+ *
+ **/
+typedef enum
+{
+ RobotBoardControllerDI, // 接口板控制器DI(数字量输入) 只读(一般系统内部使用)
+ RobotBoardControllerDO, // 接口板控制器DO(数字量输出) 只读(一般系统内部使用)
+ RobotBoardControllerAI, // 接口板控制器AI(模拟量输入)
+ // 只读(一般系统内部使用)
+ RobotBoardControllerAO, // 接口板控制器AO(模拟量输出) 只读(一般系统内部使用)
+
+ RobotBoardUserDI, // 接口板用户DI(数字量输入) 可读可写
+ RobotBoardUserDO, // 接口板用户DO(数字量输出) 可读可写
+ RobotBoardUserAI, // 接口板用户AI(模拟量输入) 可读可写
+ RobotBoardUserAO, // 接口板用户AO(模拟量输出) 可读可写
+
+ RobotToolDI, // 工具端DI
+ RobotToolDO, // 工具端DO
+ RobotToolAI, // 工具端AI
+ RobotToolAO, // 工具端AO
+
+} RobotIoType;
+
+/**
+ * IO类型
+ **/
+typedef enum
+{
+ IO_IN = 0, //输入
+ IO_OUT //输出
+} ToolIOType;
+
+/**
+ * 工具的电源类型
+ **/
+typedef enum
+{
+ OUT_0V = 0,
+ OUT_12V = 1,
+ OUT_24V = 2
+} ToolPowerType;
+
+typedef enum
+{
+ RobotToolIoTypeDI = RobotToolDI, //工具端DI
+ RobotToolIoTypeDO = RobotToolDO //工具端DO
+} RobotToolIoType;
+
+typedef enum //IO状态
+{
+ IO_STATUS_INVALID = 0, //有效
+ IO_STATUS_VALID //无效
+} IO_STATUS;
+
+typedef enum
+{
+ TOOL_DIGITAL_IO_0 = 0,
+ TOOL_DIGITAL_IO_1 = 1,
+ TOOL_DIGITAL_IO_2 = 2,
+ TOOL_DIGITAL_IO_3 = 3
+
+} ToolDigitalIOAddr;
+
+/**
+ * 综合描述一个IO
+ **/
+PACK(struct RobotIoDesc {
+ char ioId[32]; // IO-ID 目前未使用
+ RobotIoType ioType; // IO类型
+ char ioName[32]; // IO名称
+ int ioAddr; // IO地址
+ double ioValue; // IO状态
+});
+
+//接口板数字量数据
+typedef struct
+{
+ uint8 addr;
+ uint8 value;
+ uint8 type;
+} RobotDiagnosisIODesc;
+
+//接口板模拟量数据
+typedef struct
+{
+ uint8 addr;
+ float value;
+ uint8 type;
+} RobotAnalogIODesc;
+
+PACK(struct ToolDigitalStatus {
+ ToolIOType ioType;
+ uint8 ioData;
+});
+
+typedef enum
+{
+ RobotToolNoError = 0, //无错误
+ RobotToolOverVoltage = 1, //过压
+ RobotToolUnderVoltage = 2, //欠压
+ RobotToolOVerTemp = 3, //过温
+ RobotToolCanBusError = 4 // CAN总线错误
+} RobotToolErrorCode;
+
+/**
+ * @brief 机械臂启动完成状态
+ */
+enum ROBOT_SERVICE_STATE
+{
+ ROBOT_SERVICE_READY = 0,
+ ROBOT_SERVICE_STARTING,
+ ROBOT_SERVICE_WORKING,
+ ROBOT_SERVICE_CLOSING,
+ ROBOT_SERVICE_CLOSED,
+ ROBOT_SETVICE_FAULT_POWER,
+ ROBOT_SETVICE_FAULT_BRAKE,
+ ROBOT_SETVICE_FAULT_NO_ROBOT,
+ ROBOT_SETVICE_FAULT_SAFEGUARD_STOP
+};
+
+enum ROBOT_INIT_PHASE
+{
+ ROBOT_INIT_PHASE_READY = 0,
+ ROBOT_INIT_PHASE_HANDSHAKE,
+ ROBOT_INIT_PHASE_SET_POWER,
+ ROBOT_INIT_PHASE_SET_BRAKE,
+ ROBOT_INIT_PHASE_SET_COLLSION_CLASS,
+ ROBOT_INIT_PHASE_SET_OTHER_CMD,
+ ROBOT_INIT_PHASE_WORKING
+};
+
+typedef enum
+{
+ RobotModeSimulator, // 机械臂仿真模式
+ RobotModeReal // 机械臂真实模式
+} RobotWorkMode;
+
+/**
+ * @brief 机械臂运动控制命令
+ */
+typedef enum
+{
+ RobotMoveStop = 0, // 停止
+ RobotMovePause = 1, // 暂停
+ RobotMoveContinue = 2, // 继续
+} RobotMoveControlCommand;
+
+/**
+ * @brief 机械臂控制命令
+ */
+enum RobotControlCommand
+{
+ RobotRelease = 0, // 释放刹车
+ RobotBrake = 1, // 刹车
+ OverspeedWarning = 2, // 拖动示教速度过快报警
+ OverspeedRecover = 3, // 解除拖动过速报警
+ DisableForceControl = 4, // 失能力控
+ EnableForceControl = 5, // 使能力控
+ OrpeOpen = 6, // 打开上位机软件
+ OrpeClose = 7, // 关闭上位机软件
+ EnableReadPose = 8, // 打开读取位姿
+ DisableReadPose = 9, // 关闭读取位姿
+ MountingPoseChanged = 10, // 安装位置已改变
+ MountingPoseUnChanged = 11, // 安装位置未改变
+ EnableStaticCollisionDetect = 12, // 打开静止碰撞检测
+ DisableStaticCollisionDetect = 13, // 关闭静止碰撞检测
+ ClearSingularityOverSpeedAlarm = 14, // 解除机械臂奇异点过速警告
+ ClearRobotCurrentAlarm = 15, // 解除机械臂电流错误警告
+
+ // 适配新 aubope sdk 部分枚举,用于实现加油机器人需求
+ EnterDragAndTeachMode = 0x15, //进入拖动示教模式
+ ExitDragAndTeachMode = 0x16, //退出拖动示教模式
+ RobotShutdown = 0x24, //上位机指令控制机械臂一类停机,并上传错误
+ ClearRobotShutdown = 0x25, //清除上位机一类停机标志
+ EnableCollisionStuckBrake = 0x28, //使能碰撞stuck模式锁刹车
+ DisableCollisionStuckBrake = 0x29, //失能能碰撞stuck模式锁刹车
+};
+
+/**
+ * @brief 位置信息
+ **/
+struct Pos
+{
+ double x;
+ double y;
+ double z;
+};
+
+/**
+ * @brief 位置信息的共用体描述
+ **/
+union cartesianPos_U
+{
+ Pos position;
+ double positionVector[3];
+};
+
+/**
+ * @brief 姿态的四元素表示方法
+ **/
+struct Ori
+{
+ double w;
+ double x;
+ double y;
+ double z;
+};
+
+/**
+ * @brief 姿态的欧拉角表示方法
+ **/
+struct Rpy
+{
+ double rx;
+ double ry;
+ double rz;
+};
+
+typedef struct
+{
+ double jointPos[ARM_DOF];
+} JointParam;
+
+/**
+ * @brief 描述关节的速度和加速度
+ */
+typedef struct
+{
+ double jointPara[ARM_DOF];
+} JointVelcAccParam;
+
+/**
+ * 关节碰撞补偿(范围0.00~0.51度)
+ **/
+typedef struct
+{
+ double jointOffset[ARM_DOF];
+} RobotJointOffset;
+
+/**
+ * @brief 机械臂的路点信息
+ **/
+typedef struct
+{
+ cartesianPos_U cartPos; // 机械臂的位置信息(x,y,z)
+ Ori orientation; // 机械臂姿态信息,四元素(w,x,y,z)
+ double jointpos[ARM_DOF]; // 机械臂关节角信息
+ int id; // 路点ID
+} wayPoint_S;
+
+typedef struct
+{
+ cartesianPos_U cartPos;
+ Ori orientation;
+ double jointpos[ARM_DOF];
+} RoadPoint;
+
+typedef struct
+{
+ double data[6];
+} ForceSensorData;
+
+typedef struct
+{
+ Pos position;
+ Ori quaternion;
+} PositionAndQuaternion;
+
+/**
+ * @brief 描述运动属性中的偏移属性
+ */
+typedef struct
+{
+ bool ena; // 是否使能偏移
+ float relativePosition[3]; // 偏移量 x,y,z
+ Ori relativeOri; // 姿态偏移
+} MoveRelative;
+
+typedef struct
+{
+ double minValue;
+ double maxValue;
+} RangeOfMotion;
+
+/**
+ * 关节运动范围
+ */
+
+typedef struct
+{
+ bool enable; // 是否使能偏移
+ RangeOfMotion rangeValues[ARM_DOF]; //运动范围
+} JointRangeOfMotion;
+
+/**
+ * @brief 示教模式枚举
+ **/
+enum teach_mode
+{
+ NO_TEACH = 0,
+ JOINT1,
+ JOINT2,
+ JOINT3,
+ JOINT4,
+ JOINT5,
+ JOINT6,
+ MOV_X,
+ MOV_Y,
+ MOV_Z,
+ ROT_X,
+ ROT_Y,
+ ROT_Z
+};
+
+/**
+ * @brief 运动轨迹枚举
+ **/
+enum move_track
+{
+ NO_TRACK = 0,
+
+ // for moveJ and moveL
+ TRACKING,
+
+ // cartesian motion for moveP
+ ARC_CIR,
+ CARTESIAN_MOVEP,
+ CARTESIAN_CUBICSPLINE,
+ CARTESIAN_UBSPLINEINTP,
+ CARTESIAN_GNUBSPLINEINTP,
+ CARTESIAN_LOOKAHEAD,
+
+ // joint motion for moveP
+ JIONT_CUBICSPLINE,
+ JOINT_UBSPLINEINTP,
+ JOINT_GNUBSPLINEINTP,
+
+ ARC,
+ CIRCLE,
+ ARC_ORI_ROTATED,
+ CIRCLE_ORI_ROTATED,
+
+ ORI_POSITION_ROTATE_CIRCUMFERENCE = 101,
+};
+
+/**
+ * @brief 工具姿态标定的方法枚举
+ *
+ */
+
+enum ToolKinematicsOriCalibrateMathod
+{
+ ToolKinematicsOriCalibrateMathod_Invalid = -1,
+ ToolKinematicsOriCalibrateMathod_xOxy, // 原点、x轴正半轴、x、y轴平面的第一象限上任意一点
+ ToolKinematicsOriCalibrateMathod_yOyz, // 原点、y轴正半轴、y、z轴平面的第一象限上任意一点
+ ToolKinematicsOriCalibrateMathod_zOzx, // 原点、z轴正半轴、z、x轴平面的第一象限上任意一点
+ ToolKinematicsOriCalibrateMathod_TxRBz_TxyPBzAndTyABnz, // 工具x轴平行反向于基坐标系z轴;
+ // 工具xOy平面平行于基坐标系z轴、工具y轴与基坐标系负z轴夹角为锐角
+ ToolKinematicsOriCalibrateMathod_TyRBz_TyzPBzAndTzABnz, // 工具y轴平行反向于基坐标系z轴;
+ // 工具yOz平面平行于基坐标系z轴、工具z轴与基坐标系负z轴夹角为锐角
+ ToolKinematicsOriCalibrateMathod_TzRBz_TzxPBzAndTxABnz, // 工具z轴平行反向于基坐标系z轴;
+ // 工具zOx平面平行于基坐标系z轴、工具x轴与基坐标系负z轴夹角为锐角
+ ToolKinematicsOriCalibrateMathodCount
+};
+
+/**
+ * 该结构体描述工具惯量
+ *
+ * 注:该结构体属于冗余数据类型,使用时把所有参数都设置为{0,0,0,0,0,0}.
+ **/
+typedef struct
+{
+ double xx;
+ double xy;
+ double xz;
+ double yy;
+ double yz;
+ double zz;
+} ToolInertia;
+
+/**
+ * 工具动力学参数描述
+ *
+ * 注意:
+ * 机械臂上电之前,安装在机器人末端的工具发生改变时都需要重新设置工具的动力学参数.
+ * 一般情况下,工具的动力学参数和运动学参数是需要一起设置的;
+ * 切记:
+ * 该参数如果不能正确设置会影响机械臂的安全等级和运动轨迹.
+ **/
+typedef struct
+{
+ double positionX; // 工具重心的X坐标
+ double positionY; // 工具重心的Y坐标
+ double positionZ; // 工具重心的Z坐标
+ double payload; // 工具重量
+ ToolInertia toolInertia; // 工具惯量 预留 使用是全部设置为0
+} ToolDynamicsParam;
+
+/** 工具描述 工具的运动学参数
+ *
+ * 该工具用于描述一个工具或者工具的运动学参数.
+ */
+typedef struct
+{
+ Pos toolInEndPosition; // 工具相对法兰盘的位置
+ Ori toolInEndOrientation; // 工具相对法兰盘的姿态
+} ToolInEndDesc;
+
+typedef ToolInEndDesc ToolKinematicsParam;
+typedef ToolInEndDesc RobotCameraCalib;
+
+/**
+ * 焊接摇摆结构体
+ */
+typedef struct
+{
+ bool weaveEnable;
+ int weaveType;
+ double weaveStep;
+ double weaveAmplitude;
+ double weaveHoldDistance;
+ double weaveAngle;
+} WeaveMove;
+
+PACK(struct RobotRecongnitionParam {
+ uint8 type; //机械臂辨识参数类型
+ uint8 length; //参数数据长度
+ uint8 data[256]; //参数实际数据
+});
+
+/**
+ * 坐标系类型枚举
+ **/
+enum coordinate_refer
+{
+ BaseCoordinate = 0, // 基座坐标系
+ EndCoordinate, // 末端坐标系或工具坐标系
+ WorldCoordinate, // 用户坐标系
+};
+
+/**
+ * 用户坐标系标定方法枚举
+ *
+ * 描述:3点标定坐标系 3个示教点的含义.
+ **/
+enum CoordCalibrateMathod
+{
+ Origin_AnyPointOnPositiveXAxis_AnyPointOnPositiveYAxis, // 原点、x轴正半轴、y轴正半轴
+ Origin_AnyPointOnPositiveYAxis_AnyPointOnPositiveZAxis, // 原点、y轴正半轴、z轴正半轴
+ Origin_AnyPointOnPositiveZAxis_AnyPointOnPositiveXAxis, // 原点、z轴正半轴、x轴正半轴
+ Origin_AnyPointOnPositiveXAxis_AnyPointOnFirstQuadrantOfXOYPlane, // 原点、x轴正半轴、x、y轴平面的第一象限上任意一点
+ Origin_AnyPointOnPositiveXAxis_AnyPointOnFirstQuadrantOfXOZPlane, // 原点、x轴正半轴、x、z轴平面的第一象限上任意一点
+ Origin_AnyPointOnPositiveYAxis_AnyPointOnFirstQuadrantOfYOZPlane, // 原点、y轴正半轴、y、z轴平面的第一象限上任意一点
+ Origin_AnyPointOnPositiveYAxis_AnyPointOnFirstQuadrantOfYOXPlane, // 原点、y轴正半轴、y、x轴平面的第一象限上任意一点
+ Origin_AnyPointOnPositiveZAxis_AnyPointOnFirstQuadrantOfZOXPlane, // 原点、z轴正半轴、z、x轴平面的第一象限上任意一点
+ Origin_AnyPointOnPositiveZAxis_AnyPointOnFirstQuadrantOfZOYPlane, // 原点、z轴正半轴、z、y轴平面的第一象限上任意一点
+
+ CoordTypeCount,
+};
+
+/**
+ * 坐标系描述
+ *
+ * 该结构体描述一个坐标系。系统通过该结构体描述一个坐标系(基座坐标系,
+ *用户坐标系, 末端坐标系或工具坐标系)。
+ *
+ * 坐标系分3种类型: 基座坐标系(BaseCoordinate);
+ * 用户坐标系(WorldCoordinate);
+ * 末端坐标系或工具坐标系(EndCoordinate);
+ *
+ * 定义:
+ * 基座坐标系 是 根据机械臂基座建立的坐标系;
+ * 用户坐标系 是
+ *用户坐标系定义在工件上,在机器人动作允许范围内的任意位置,设定任意角度的X、Y、Z轴,原点位于机器人抓取的工件上,坐标系的方向根据客户需要任意定义。
+ * 末端坐标系
+ *是 安装在机器人末端的工具坐标系,原点及方向都是随着末端位置与角度不断变化的,该座标系实际是将基础座标系通过旋转及位移变化而来的;法兰盘是一个特殊的末端坐标系.
+ *
+ * 结构体参数描述:
+ * coordType 坐标系类型,描述坐标系属于那种类型
+ * methods
+ * 用户坐标系的标定方法 仅在coordType为用户坐标系(WorldCoordinate)时有效;
+ * wayPointArray[3] 标定用户坐标系的3个路点信息 仅在coordType为用户坐标系(WorldCoordinate)时有效;
+ * toolDesc 末端工具描述 当coordType=WorldCoordinate 表示标定用户坐标系时,安装在机器人末端的工具;
+ * 当coordType=EndCoordinate
+ *描述是哪个工具的坐标系
+ *
+ * 使用说明:
+ * 基座坐标系
+ * coordType=BaseCoordinate
+ * 其他参数默认
+ * 用户坐标系
+ * coordType=WorldCoordinate
+ * methods 为标定方法
+ * wayPointArray[3] 标定坐标系的3个路点
+ * toolDesc 标定用户坐标系时,安装在机器人末端的工具
+ * 末端坐标系或工具坐标系
+ * coordType=EndCoordinate
+ * methods 缺省,不需要设置
+ * wayPointArray[3] 缺省,不需要设置
+ * toolDesc 机器人末端的工具
+ *
+ * 备注:
+ * 法兰盘为特殊的工具,工具描述中的位置设置为(0,0,0),姿态信息设置为(1,0,0,0)
+ * 其结构体定义为
+ * {
+ * pos{0,0,0},
+ * Ori{1,0,0,0}
+ * } //伪代码
+ *
+ * 该结构同时用于用户坐标系的标定.一般通过示教3个示教点实现,第一个示教点是用户坐标系的原点;第二个和第三个示教点的选择根据标定方法来确定,遵循右手手法.
+ */
+typedef struct
+{
+ coordinate_refer coordType; // 坐标系类型
+ CoordCalibrateMathod methods; // 用户坐标系的标定方法
+ JointParam wayPointArray[3]; // 用于标定用户坐标系的3个点(关节角)
+ ToolInEndDesc toolDesc; // 工具描述
+} CoordCalibrateByJointAngleAndTool;
+
+typedef struct
+{
+ //用于位置标定点的数量
+ int posCalibrateNum;
+ //位置标定点
+ wayPoint_S posCalibrateWaypoint[4];
+ //用于姿态标定点的数量
+ int oriCalibrateNum;
+ //姿态标定点
+ wayPoint_S oriCalibrateWaypoint[3];
+ //姿态标定方法
+ ToolKinematicsOriCalibrateMathod CalibrateMathod;
+} ToolCalibrate;
+
+PACK(struct MoveProfile_t {
+ double jointMaxAcc[ARM_DOF]; //关节型运动的最大加速度
+ double jointMaxVelc[ARM_DOF]; //关节型运动的最大速度
+ double endMaxLineAcc; //末端型运动的最大加速度
+ double endMaxLineVelc; //末端型运动的最大速度
+
+ MoveRelative relative; //偏移参数
+ CoordCalibrateByJointAngleAndTool relativeOnCoord; //偏移量基于那个坐标系
+
+ double blendRadius; //交融半径
+ ToolInEndDesc toolInEndDesc; //工具属性
+});
+
+/**
+ * @brief 机械臂状态枚举
+ **/
+enum RobotState
+{
+ RobotStopped = 0, //停止
+ RobotRunning, //运行
+ RobotPaused, //暂停
+ RobotResumed //恢复
+};
+
+/**
+ * 机械臂重力分量x y z
+ **/
+typedef struct
+{
+ float x;
+ float y;
+ float z;
+} RobotGravityComponent;
+
+/**
+ * 机械臂关节版本信息
+ **/
+PACK(struct JointVersion {
+ char hw_version[8]; //硬件版本信息
+ char sw_version[16]; //固件版本信息
+});
+
+/**
+ * 关节ID信息
+ **/
+PACK(struct JointProductID { char productID[16]; });
+
+/**
+ * 该结构体描述设备信息
+ **/
+PACK(struct RobotDevInfo {
+ uint8 type; // 设备型号、芯片型号:上位机主站:0x01 接口板0x02
+ char revision[16]; // 设备版本号,eg:V1.0
+ char manu_id[16]; // 厂家ID,"OUR "的ASCII码0x4F 55 52 00
+ char joint_type[16]; // 机械臂类型
+ JointVersion joint_ver[8]; // 机械臂关节及工具端信息
+ char desc[64]; // 设备描述字符串以0x00结束
+ JointProductID jointProductID[8]; // 关节ID信息
+ char slave_version[16]; // 从设备版本号 - 字符串表示,如“V1.0.0
+ char extio_version[16]; // IO扩展板版本号 -字符串标志,如“V1.0.0
+});
+
+typedef struct PACKED
+{
+ uint8 io_modes; // PNP:0; NPN:1
+
+ uint64_t di_num;
+
+ uint64_t do_num;
+
+ uint64_t ai_num;
+
+ uint64_t ao_num;
+
+} IoConfig;
+
+/**
+ * 描述机械臂的关节状态
+ */
+PACK(struct JointStatus {
+ int jointCurrentI; // 关节电流 Current of driver
+ int jointSpeedMoto; // 关节速度 Speed of driver
+ float jointPosJ; // 关节角 Current position in radian
+ float jointCurVol; // 关节电压 Rated voltage of motor. Unit: mV
+ float jointCurTemp; // 当前温度 Current temprature of joint
+ int jointTagCurrentI; // 电机目标电流 Target current of motor
+ float jointTagSpeedMoto; // 电机目标速度 Target speed of motor
+ float jointTagPosJ; // 目标关节角 Target position of joint in radian
+ uint16 jointErrorNum; // 关节错误码 Joint error of joint num
+});
+
+PACK(struct JointCommonData {
+ uint16 JointCurVol; /*!< 关节当前电压 */
+ uint16 JointCurTemp; /*!< 关节当前温度*/
+ uint16 JointWorkMode; /*!< 关节工作模式 */
+ uint16 JointDriEnable; /*!< 关节驱动器使能标志 */
+ uint16 JointOpenPwm; /*!< 关节开环占空比 */
+ int32_t JointTagCurrent; /*!< 关节当前的目标电流 */
+ int32_t JointTagSpeed; /*!< 关节当前的目标速度 */
+ int32_t JointTagPos; /*!< 关节当前的目标位置 */
+
+ uint16 JointMaxCur; /*!< 关节当前的最大电流 */
+ uint16 JointMaxSpeed; /*!< 关节当前的最大速度 */
+ uint16 JointMaxAcc; /*!< 关节当前的最大加速度 */
+ int32_t JointMINPos; /*!< 关节最小位置 */
+ int32_t JointMAXPos; /*!< 关节最大位置 */
+
+ uint16 JointSEVLock; /*!< 关节三环参数锁定标志 */
+ uint16 JointCurP; /*!< 关节电流P参数 */
+ uint16 JointCurI; /*!< 关节电流I参数 */
+ uint16 JointCurD; /*!< 关节电流D参数 */
+ uint16 JointSpeedP; /*!< 关节速度P参数 */
+ uint16 JointSpeedI; /*!< 关节速度I参数 */
+ uint16 JointSpeedD; /*!< 关节速度D参数 */
+ uint16 JointSpeedDS; /*!< 关节速度死区 */
+ uint16 JointPosP; /*!< 关节位置P参数 */
+ uint16 JointPosI; /*!< 关节位置I参数 */
+ uint16 JointPosD; /*!< 关节位置D参数 */
+ uint16 JointPosDS; /*!< 关节位置DS参数 */
+});
+
+/**
+ * @brief 离线轨迹相关枚举
+ */
+enum Robot_Dyn_identify_traj
+{
+ Dyn_identify_traj_none = 0,
+ Dyn_identify_traj_robot, // submode: 0/1 <-> internal/hybrid
+ Dyn_identify_traj_tool, // submode: 0/1 <-> tool only/tool+friction
+ Dyn_identify_traj_tool_abort
+};
+
+/**
+ * @brief 接口板固件升级枚举
+ */
+typedef enum
+{
+ update_master_board_firmware_trans_start = 1,
+ update_master_board_firmware_trans_data = 2,
+ update_master_board_firmware_trans_end = 3,
+ update_slave_board_firmware_trans_start = 4,
+ update_slave_board_firmware_trans_data = 5,
+ update_slave_board_firmware_trans_end = 6
+} update_board_firmware_cmd;
+
+typedef struct
+{
+ bool trackEnable; // T
+ wayPoint_S currentRoadPoint; // R
+ wayPoint_S nextRoadPoint; // R
+ int timeInterval; // T
+ double currentPosError[3]; // T
+ double maxVel; // T
+ double maxAcc; // T
+ bool paraChanged; // RT
+} SeamTracking;
+
+PACK(struct RobotArmParamHeader {
+ uint16 cmd; //请求指令 0x01-读 0x02-写
+ uint16 baseDataLen; //基座信息长度
+ uint16 jointDataLen; //关节信息长度
+});
+
+//位置姿态类型枚举
+typedef enum
+{
+ POSITION_MM_AND_RPY_ANGLE_SPACE_SPLIT =
+ 1, //位置(单位:毫米)+ 姿态(欧拉角 单位:角度制) 空格分割
+ POSITION_M_AND_QUATERNION_COMMA_SPLIT =
+ 10, //位置(单位:米) + 姿态(四元素) 逗号分割
+} POSITION_ORIENTATION_TYPE;
+
+PACK(struct RobotArmParam {
+ RobotArmParamHeader header;
+ uint8 base[382]; //底座参数数据 //RobotBaseParameters
+ uint8 joints[512]; //关键参数数据 //RobotJointsParameter
+});
+
+PACK(struct RobotInfo {
+ uint16 robot_type; // robot type
+ uint16 auth_type; // auth type
+ uint32 robot_expire; // robot expire
+ uint8 reserve[12]; // reserve
+ uint32 robot_duration; // robot duration
+ uint32 joint_duration[6]; // joint duration
+});
+
+PACK(struct RobotDynamicsParameters {
+ double K[6]; // motor torque constant
+ double IA[4]; // rotor inertia
+ double M[1]; // link mass
+ double MXYZ[13]; // center of mass
+ double IXYZ[28]; // Inertia parameter
+ double CB[6]; // current bias
+});
+
+PACK(struct RobotHandguidingParameters {
+ double FP[6]; // friction compensation percent
+ double FD[6]; // damp coefficient
+ double FK[6]; // stiffness coefficient
+ double FM[6]; // mass coefficient
+ double pos_limit[6]; // position limit
+ double velocity_limit[6]; // velocity limit
+ double acceleration_limit[6]; // acceleration limit
+});
+
+PACK(struct RobotKinematicsParameters {
+ double da[6]; // compensation a
+ double dd[6]; // compensation d
+ double dalpha[6]; // compensation alpha
+ double dbeta[6]; // compensation beta
+ double dratio[6]; // compensation ratio
+ double dtheta[6]; // compensation theta
+});
+
+PACK(struct RobotFrictionParameters {
+ uint16 FL[6]; // load friction compensation
+ uint16 FR[6]; // reserved friction compensation
+ int16 tmp_a[6]; // tmp_coefficient_a
+ uint16 tmp_b[6]; // tmp_coefficient_b
+ int16 posvel_a1[6]; // positive_vel_a1
+ uint16 posvel_b1[6]; // positive_vel_b1
+ int16 posvel_a2[6]; // positive_vel_a2
+ uint16 posvel_b2[6]; // positive_vel_b2
+ uint16 posvel_c2[6]; // positive_vel_c2
+ int16 negvel_a1[6]; // negative_vel_a1
+ int16 negvel_b1[6]; // negative_vel_b1
+ uint16 negvel_a2[6]; // negative_vel_a2
+ uint16 negvel_b2[6]; // negative_vel_b2
+ int16 negvel_c2[6]; // negative_vel_c2
+});
+
+PACK(struct RobotBaseParameters {
+ RobotInfo info;
+ RobotDynamicsParameters dynamicParam;
+ RobotHandguidingParameters handguidingParam;
+ RobotKinematicsParameters kinematicsParam;
+});
+
+PACK(struct RobotJointsParameter { RobotFrictionParameters frictionParam; });
+
+typedef enum
+{
+ LL_INFO = 0,
+ LL_DEBUG,
+ LL_WARN,
+ LL_ERROR,
+ LL_FATAL
+} LOG_LEVEL;
+
+/**
+ * 描述机械臂事件类型 event define
+ *
+ * 机械臂的很多信息(故障,通知)是通过事件通知到客户的,所有在使用SDK时,
+ * 务必注册接收事件的回调函数。
+ */
+typedef enum
+{
+ RobotEvent_armCanbusError, //机械臂CAN总线错误 已过时,不建议使用
+ RobotEvent_remoteHalt, //远程关机
+ RobotEvent_remoteEmergencyStop, //机械臂远程急停
+ RobotEvent_jointError, //关节错误 PS:已过时,不建议使用
+
+ RobotEvent_forceControl, //力控制
+ RobotEvent_exitForceControl, //退出力控制
+
+ RobotEvent_softEmergency, //软急停
+ RobotEvent_exitSoftEmergency, //退出软急停
+
+ RobotEvent_collision, //碰撞
+ //已过时,不建议使用 已用RobotEventJointCollision(2123)
+ //替代
+ RobotEvent_collisionStatusChanged, //碰撞状态改变
+ //已过时,不建议使用 已用RobotEventJointCollision(2123)
+ //替代
+ RobotEvent_tcpParametersSucc, //工具动力学参数设置成功
+ //系统事件,用户可以忽略
+ RobotEvent_powerChanged, //机械臂电源开关状态改变
+ RobotEvent_ArmPowerOff, //机械臂电源关闭
+ //不建议使用 已用RobotEventArmPowerOff(2600) 替代
+ RobotEvent_mountingPoseChanged, //安装位置发生改变
+ RobotEvent_encoderError, //编码器错误 不建议使用
+
+ RobotEvent_encoderLinesError, //编码器线数不一致
+ //不建议使用 已用RobotEventEncoderLineError(2203)替代
+ RobotEvent_singularityOverspeed, //奇异点超速
+ RobotEvent_currentAlarm, //机械臂电流异常
+ RobotEvent_toolioError, //机械臂工具端错误
+ RobotEvent_robotStartupPhase, //机械臂启动阶段 系统事件,用户可以忽略
+ RobotEvent_robotStartupDoneResult, //机械臂启动完成结果
+ //系统事件,用户可以忽略
+ RobotEvent_robotShutdownDone, //机械臂关机结果 系统事件,用户可以忽略
+ RobotEvent_atTrackTargetPos, //机械臂轨迹运动到位信号通知
+ //系统事件,用户可以忽略
+
+ RobotSetPowerOnDone, //设置电源状态完成
+ RobotReleaseBrakeDone, //机械臂刹车释放完成 系统事件,用户可以忽略
+ RobotEvent_robotControllerStateChaned, //机械臂控制状态改变
+ //系统事件,用户可以忽略
+ RobotEvent_robotControllerError, //机械臂控制错误----一般是算法规划出现问题时返回
+ RobotEvent_socketDisconnected, // socket断开连接
+
+ RobotEvent_robotControlException,
+ RobotEvent_trackPlayInterrupte,
+
+ RobotEvent_staticCollisionStatusChanged, //不建议使用 已过时
+ RobotEvent_MountingPoseWarning,
+
+ RobotEvent_MacDataInterruptWarning,
+ RobotEvent_ToolIoError, //
+ RobotEvent_InterfacBoardSafeIoEvent, //安全IO通知型事件
+
+ RobotEvent_RobotHandShakeSucc, //系统事件,用户可以忽略
+ RobotEvent_RobotHandShakeFailed, //系统事件,用户可以忽略
+
+ RobotEvent_RobotErrorInfoNotify, //不建议使用 已过时
+
+ RobotEvent_InterfacBoardDIChanged, //通知型事件 DI状态改变
+ RobotEvent_InterfacBoardDOChanged, //通知型事件 DO状态改变
+ RobotEvent_InterfacBoardAIChanged, //通知型事件 AI状态改变
+ RobotEvent_InterfacBoardAOChanged, //通知型事件 AO状态改变
+
+ RobotEvent_UpdateJoint6Rot360Flag, //系统事件,用户可以忽略
+
+ RobotEvent_RobotMoveControlDone, //系统事件,用户可以忽略
+ RobotEvent_RobotMoveControlStopDone, //系统事件,用户可以忽略
+ RobotEvent_RobotMoveControlPauseDone, //系统事件,用户可以忽略
+ RobotEvent_RobotMoveControlContinueDone, //系统事件,用户可以忽略
+
+ //主从模式切换
+ RobotEvent_RobotSwitchToOnlineMaster, //通知型事件 进入联动主模式
+ RobotEvent_RobotSwitchToOnlineSlave, //通知型事件 进入联动从模式
+
+ RobotEvent_ConveyorTrackRobotStartup, //系统事件,用户可以忽略
+ RobotEvent_ConveyorTrackRobotCatchup, //系统事件,用户可以忽略
+
+ RobotEvent_TeachButtonStatusChanged = 80, //四五六关节示教按钮状态改变
+
+ RobotEvent_exceptEvent = 100,
+
+ RobotEventInvalid = 1000, // 无效的事件
+
+ /**
+ * RobotControllerErrorEvent 控制器异常事件 1001~1499
+ *
+ * 事件处理建议
+ * 建议采取措施:停止当前运动
+ *
+ * PS: 这些事件会引起机械臂运动的错误返回
+ * 使用时尽量用枚举变量 枚举变量值只是为了查看日志方便
+ *
+ **/
+ RobotEventMoveJConfigError =
+ 1001, // moveJ configuration error 关节运动属性配置错误
+ RobotEventMoveLConfigError =
+ 1002, // moveL configuration error 直线运动属性配置错误
+ RobotEventMovePConfigError =
+ 1003, // moveP configuration error 轨迹运动属性配置错误
+ RobotEventInvailConfigError =
+ 1004, // invail configuration 无效的运动属性配置
+ RobotEventWaitRobotStopped =
+ 1005, // please wait robot stopped 等待机器人停止
+ RobotEventJointOutRange = 1006, // joint out of range 超出关节运动范围
+ RobotEventFirstWaypointSetError =
+ 1007, // please set first waypoint correctly in modep
+ // 请正确设置MODEP第一个路点
+ RobotEventConveyorTrackConfigError =
+ 1008, // configuration error for conveyor tracking 传送带跟踪配置错误
+ RobotEventConveyorTrackTrajectoryTypeError =
+ 1009, // unsupported conveyor tracking trajectory type
+ // 传送带轨迹类型错误
+ RobotEventRelativeTransformIKFailed =
+ 1010, // inverse kinematics failure due to invalid relative transform
+ // 相对坐标变换逆解失败
+ RobotEventTeachModeCollision =
+ 1011, // collision in teach-mode 示教模式发生碰撞
+ RobotEventextErnalToolConfigError =
+ 1012, // configuration error for external tool and hand workobject
+ // 运动属性配置错误,外部工具或手持工件配置错误
+
+ RobotEventTrajectoryAbnormal = 1101, // Trajectory is abnormal 轨迹异常
+ RobotEventOnlineTrajectoryPlanError =
+ 1102, // Trajectory is abnormal,online planning failed 轨迹规划错误
+ RobotEventOnlineTrajectoryTypeIIError =
+ 1103, // Trajectory is abnormal,type II online planning failed
+ // 二型在线轨迹规划失败
+ RobotEventIKFailed =
+ 1104, // Trajectory is abnormal,inverse kinematics failed 逆解失败
+ RobotEventAbnormalLimitProtect =
+ 1105, // Trajectory is abnormal,abnormal limit protection 动力学限制保护
+ RobotEventConveyorTrackingFailed =
+ 1106, // Trajectory is abnormal,conveyor tracking failed 传送带跟踪失败
+ RobotEventConveyorOutWorkingRange =
+ 1107, // Trajectory is abnormal,exceeding the conveyor working range
+ // 超出传送带工作范围
+ RobotEventTrajectoryJointOutOfRange =
+ 1108, // Trajectory is abnormal,joint out of range 关节超出范围
+ RobotEventTrajectoryJointOverspeed =
+ 1109, // Trajectory is abnormal,joint overspeed 关节超速
+ RobotEventOfflineTrajectoryPlanFailed =
+ 1110, // Trajectory is abnormal,Offline track planning failed
+ // 离线轨迹规划失败
+ RobotEventTrajectoryJointAccOutOfRange =
+ 1111, // Trajectory is abnormal,joint acc out of range
+ // 轨迹异常,关节加速度超限
+ RobotEventTrajectoryBeyondSafetyPlane = 1112, //超过安全平面
+
+ RobotEventForceModeException = 1120, // 力控模式异常
+ RobotEventForceModeIKFailed =
+ 1121, // Trajectory is abnormal,force control mode ik failed
+ // 轨迹异常,力控模式下失败
+ RobotEventForceModeTrackJointverspeed =
+ 1122, // Trajectory is abnormal,joint overspeed 关节超速
+
+ RobotEventControllerIKFailed =
+ 1200, // The controller has an exception and the inverse kinematics
+ // failed 控制器异常,逆解失败
+ RobotEventControllerStatusException =
+ 1201, // The controller has an exception and the status is abnormal
+ // 控制器异常,状态异常
+ RobotEventControllerTrackingLost =
+ 1202, // Exception that joint tracking is lost, 关节跟踪误差过大.
+ RobotEventMonitorErrTrackingLost =
+ 1203, // Exception that joint tracking is lost, 关节跟踪误差过大.
+ RobotEventMonitorErrNoArrivalInTime = 1204, // not used 预留
+ RobotEventMonitorErrCurrentOverload = 1205, // not used 预留
+ RobotEventMonitorErrJointOutOfRange =
+ 1206, // Exception that joint out of range 机械臂关节超出限制范围
+ RobotEventMonitorErrFifoDataTimeNotRead =
+ 1207, // controller fifo data timeout was not read
+ // 队列中数据超时未被读取
+ RobotEventThreePositionSwitchNoPress = 1208, //操作模式,三态开关未按下
+
+ RobotEventMoveEnterStopState =
+ 1300, // Movement enters the stop state 运动进入到stop阶段
+
+ /**
+ * RobotHardwareErrorEvent 来自硬件反馈的异常事件 2001~2999
+ *
+ * 事件处理建议
+ * RobotEventJointEncoderPollustion 建议采取措施:警告性通知
+ * RobotEventDriveVersionError 建议采取措施:警告性通知
+ * RobotEventJointCollision 建议采取措施:
+ 如需回复当前运动,调用暂停函数
+ 恢复的时候先调用碰撞回复函数,在调用continue函数
+ 如不需回复当前运动,调用停止函数
+ 恢复的时候调用碰撞回复函数可以
+ * 其余的事件 建议采取措施:停止当前运动
+ **/
+
+ RobotEventHardwareErrorNotify = 2001, // Robot hardware error 机械臂硬件错误
+
+ RobotEventJointError = 2101, // Robot joint error 机械臂关节错误
+ RobotEventJointOverCurrent =
+ 2102, // Robot joint over current. 机械臂关节过流
+ RobotEventJointOverVoltage =
+ 2103, // Robot joint over voltage. 机械臂关节过压
+ RobotEventJointLowVoltage =
+ 2104, // Robot joint low voltage. 机械臂关节欠压
+ RobotEventJointOverTemperature =
+ 2105, // Robot joint over temperature. 机械臂关节过温
+ RobotEventJointHallError =
+ 2106, // Robot joint hall error. 机械臂关节霍尔错误
+ RobotEventJointEncoderError =
+ 2107, // Robot joint encoder error. 机械臂关节编码器错误
+ RobotEventJointAbsoluteEncoderError =
+ 2108, // Robot joint absolute encoder error. 机械臂关节绝对编码器错误
+ RobotEventJointCurrentDetectError =
+ 2109, // Robot joint current position error. 机械臂关节当前位置错误
+ RobotEventJointEncoderPollustion =
+ 2110, // Robot joint encoder pollustion. 机械臂关节编码器污染
+ // 建议采取措施:警告性通知
+ RobotEventJointEncoderZSignalError =
+ 2111, // Robot joint encoder Z signal error. 机械臂关节编码器Z信号错误
+ RobotEventJointEncoderCalibrateInvalid =
+ 2112, // Robot joint encoder calibrate invalid.
+ // 机械臂关节编码器校准失效
+ RobotEventJoint_IMU_SensorInvalid =
+ 2113, // Robot joint IMU sensor invalid. 机械臂关节IMU传感器失效
+ RobotEventJointTemperatureSensorError =
+ 2114, // Robot joint temperature sensor error. 机械臂关节温度传感器出错
+ RobotEventJointCanBusError =
+ 2115, // Robot joint CAN BUS error. 机械臂关节CAN总线出错
+ RobotEventJointCurrentError =
+ 2116, // Robot joint current error. 机械臂关节当前电流错误
+ RobotEventJointCurrentPositionError =
+ 2117, // Robot joint current position error. 机械臂关节当前位置错误
+ RobotEventJointOverSpeed = 2118, // Robot joint over speed. 机械臂关节超速
+ RobotEventJointOverAccelerate =
+ 2119, // Robot joint over accelerate. 机械臂关节加速度过大错误
+ RobotEventJointTraceAccuracy =
+ 2120, // Robot joint trace accuracy. 机械臂关节跟踪精度错误
+ RobotEventJointTargetPositionOutOfRange =
+ 2121, // Robot joint target position out of range.
+ // 机械臂关节目标位置超范围
+ RobotEventJointTargetSpeedOutOfRange =
+ 2122, // Robot joint target speed out of range. 机械臂关节目标速度超范围
+ RobotEventJointCollision = 2123, // Robot joint collision. 机械臂碰撞
+ // 建议采取措施:暂停当前运动
+ RobotEventJointSlaveOverCurrent =
+ 2124, // Robot joint slave over current! 从机过流
+ RobotEventJointSlaveOverVoltage =
+ 2125, // Robot joint slave over voltage! 从机过压
+ RobotEventJointSlaveLowVoltage =
+ 2126, // Robot joint slave low voltage! 从机欠压
+ RobotEventJointSlavePositionDiffOver =
+ 2127, // Robot joint position deviation between master and slave is too
+ // big! 主从机位置偏差过大
+ RobotEventJointSlaveSpeedDiffOver =
+ 2128, // Robot joint speed deviation between master and slave is too
+ // big! 主从机速度偏差过大
+ RobotEventJointSlaveAbsoluteEncoderError =
+ 2129, // Robot joint slave abs encoder! 从机绝对编码器错误
+ RobotEventJointSlaveCurrentDetectError =
+ 2130, // Robot joint slave detect current! 从机电流检测错误
+ RobotEventJointSlaveEncoderPollustion =
+ 2131, // Robot joint slave encoder pollustion! 从机编码器污染
+ RobotEventJointSlaveEncoderZSignalError =
+ 2132, // Robot joint slave enocder z signal! 从机编码器Z信号错误
+ RobotEventJointSlaveCommunication =
+ 2133, // Robot joint communication between master and slave error!
+ // 主从机之间通信错误
+ RobotEventJointOpticalEncoderError =
+ 2134, // Robot joint optical encoder error! 光电编码器错误
+
+ RobotEventDataAbnormal = 2200, // Robot data abnormal 机械臂信息异常
+ RobotEventRobotTypeError = 2201, // Robot type error 机械臂类型错误
+ RobotEventAccelerationSensorError =
+ 2202, // Robot acceleration sensor error 机械臂加速度计芯片错误
+ RobotEventEncoderLineError =
+ 2203, // Robot encoder line error 机械臂编码器线数错误
+ RobotEventEnterDragAndTeachModeError =
+ 2204, // Robot enter drag and teach mode error
+ // 机械臂进入拖动示教模式错误
+ RobotEventExitDragAndTeachModeError =
+ 2205, // Robot exit drag and teach mode error 机械臂退出拖动示教模式错误
+ RobotEventMACDataInterruptionError =
+ 2206, // Robot MAC data interruption error 机械臂MAC数据中断错误
+ RobotEventDriveVersionError =
+ 2207, // Drive version error 驱动器版本错误(关节固件版本不一致)
+ RobotEventToolNotExist = 2208, // Robot tool do not exist! 工具端不存在
+ RobotEventPowerOnCheckError =
+ 2209, // Robot power on check error! 上电自检错误
+ RobotEventDriverVersionTooLow =
+ 2210, // Robot driver firmware version is too low! 驱动器版本过低
+ RobotEventTargetPosDataBufferOverflow =
+ 2211, // Robot target pos data buffer overflow! 目标位置数据溢出
+ RobotEventRobotArmNotConnected =
+ 2212, // Robot arm is not connected! 机械臂未连接
+ RobotEventPayloadError = 2213, // Robot payload error! 负载错误
+
+ RobotEventInitAbnormal = 2300, // Robot init abnormal 机械臂初始化异常
+ RobotEventDriverEnableFailed =
+ 2301, // Robot driver enable failed 机械臂驱动器使能失败
+ RobotEventDriverEnableAutoBackFailed =
+ 2302, // Robot driver enable auto back failed
+ // 机械臂驱动器使能自动回应失败
+ RobotEventDriverEnableCurrentLoopFailed =
+ 2303, // Robot driver enable current loop failed
+ // 机械臂驱动器使能电流环失败
+ RobotEventDriverSetTargetCurrentFailed =
+ 2304, // Robot driver set target current failed
+ // 机械臂驱动器设置目标电流失败
+ RobotEventDriverReleaseBrakeFailed =
+ 2305, // Robot driver release brake failed 机械臂释放刹车失败
+ RobotEventDriverEnablePostionLoopFailed =
+ 2306, // Robot driver enable postion loop failed 机械臂使能位置环失败
+ RobotEventSetMaxAccelerateFailed =
+ 2307, // Robot set max accelerate failed 设置最大加速度失败
+ RobotEventSetPositionLoopWorkModeFailed =
+ 2308, // Robot set position loop work mode failed!
+ // 设置位置环工作模式失败
+ RobotEventCalcuateGravityComponentFailed =
+ 2309, // Robot calculate the gravity component failed! 计算重力分量错误
+ RobotEventSetMaxVelocityFailed =
+ 2310, // Robot set max velocity failed! 设置最大速度失败
+ RobotEventEnableCANSyncFrameFailed =
+ 2311, // Robot enable can synchronization frame failed!
+ // 使能CAN同步帧失败
+
+ RobotEventSafetyError = 2400, // Robot Safety error 机械臂安全出错
+ RobotEventExternEmergencyStop =
+ 2401, // Robot extern emergency stop 机械臂外部紧急停止
+ RobotEventSystemEmergencyStop =
+ 2402, // Robot system emergency stop 机械臂系统紧急停止
+ RobotEventTeachpendantEmergencyStop =
+ 2403, // Robot teachpendant emergency stop 机械臂示教器紧急停止
+ RobotEventControlCabinetEmergencyStop =
+ 2404, // Robot control cabinet emergency stop 机械臂控制柜紧急停止
+ RobotEventProtectionStopTimeout =
+ 2405, // Robot protection stop timeout 机械臂保护停止超时
+ RobotEventEeducedModeTimeout =
+ 2406, // Robot reduced mode timeout 机械臂缩减模式超时
+
+ RobotEventSystemAbnormal = 2500, // Robot systen abnormal 机械臂系统异常
+ RobotEvent_MCU_CommunicationAbnormal =
+ 2501, // Robot mcu communication error 机械臂mcu通信异常
+ RobotEvent485CommunicationAbnormal =
+ 2502, // Robot RS485 communication error 机械臂485通信异常
+ RobotEvent220VDetectionBoardAbnormal =
+ 2503, // Robot 220v detection board abnormal 220V掉电板检测错误
+
+ //#if 0 // 非实时版本
+ RobotEventCurrentJointOutRange = 2550, // Joint out of Range
+ //#else
+ RobotEventSoftEmergency = 2550, // 软急停
+ RobotEventSoftEmergencyExit = 2551, // 软急停退出
+ //#endif
+
+ RobotEventArmPowerOff =
+ 2600, // Disconnecting the contactor causes the arm 48V power off
+ // 控制柜接触器断开导致机械臂48V断电
+
+ RobotEventHardwareErrorNotifyMaximumIndex = 2999, // 索引
+
+ RobotEventNotifyEvent = 3000, // Robot notification event 机械臂通知性事件
+ RobotEventNotifyCollisionLevelChange =
+ 3001, // Robot Collision level change 机械臂事件通知-碰撞等级被改变
+ RobotEventNotifyEnterFlexibleControlMode = 3010, // 进入柔性控制模式通知
+ RobotEventNotifyExitFlexibleControlMode = 3011, // 退出柔性控制模式通知
+ RobotEventNotifyEnterSpeedReducedMode = 3015, // 进入速度缩减模式通知
+ RobotEventNotifyExitSpeedReducedMode = 3016, // 退出速度缩减模式通知
+
+ RobotEventNotifyStopCurrentMove = 3100, // 停止掉当前运动
+
+ RobotEventNotifyScriptFinishSucc = 3200, // 脚本运行结束:成功
+ RobotEventNotifyScriptFinishFailed = 3201, // 脚本运行结束:失败
+ RobotEventNotifyScriptRunInterruptedByStopOperation =
+ 3202, //脚本运行中断:被stop操作中断
+
+ RobotEventNotifyScriptRunLabel = 3300, //通知性事件:脚本运行标签
+ RobotEventNotifyScriptTraceInfo = 3301, //通知性事件:脚本Print
+ RobotEventNotifyScriptSetVariable = 3302, //通知性事件:设置示教器全局变量值
+ RobotEventNotifyScriptTimeStamp = 3303, //通知性事件:设置计时器
+ RobotEventNotifyScriptPopMessage = 3304, //通知性事件:服务器脚本层弹窗
+
+ RobotEventNotifyJointUpdateFinishSucc = 3400, // 关节驱动升级结束:成功
+ RobotEventNotifyJointUpdateFinishFailed = 3401, // 关节驱动升级结束:失败
+ RobotEventNotifyJointUpdating = 3402, // 关节驱动升级中
+ RobotEventNotifyJointNoProgram =
+ 3410, // 关节在上电后检测到没有程序,需要升级
+
+ RobotEventMoveGroupCurrentWaypointId = 3500, // moveGroup当前路点id
+ RobotEventMoveGroupPaused = 3501, // moveGroup暂停完成
+ RobotEventMoveGroupResumed = 3502, // moveGroup恢复完成
+ RobotEventMoveGroupStopped = 3503, // moveGroup停止完成
+ RobotEventMoveGroupAtTargrtPos = 3504, // moveGroup运行结束
+
+ // unknown event
+ robot_event_unknown = 10000,
+
+ // user event
+ RobotEvent_User = 9000, // first user event id
+ RobotEvent_MaxUser = 9999 // last user event id
+
+} RobotEventType;
+
+/** 事件类型 **/
+typedef struct
+{
+ RobotEventType eventType; //事件类型号
+ int eventCode; //
+ std::string eventContent; //事件内容
+} RobotEventInfo;
+
+/**
+ * 接口函数 错误码定义 成功返回InterfaceCallSuccCode(0);失败返回对应的错误号
+ *
+ * 下面是错误代码列表
+ * 21000 ~ 21999错误码 表示错由于控制器异常事件导致的
+ * 22000 ~ 22999错误码 表示错由于硬件层异常事件导致的
+ */
+enum
+{
+ InterfaceCallSuccCode = 0, //接口调用成功的返回值
+};
+
+typedef enum
+{
+ // clang-format off
+ ErrnoSucc = InterfaceCallSuccCode, // 成功
+
+ ErrCode_Base = 10000,
+ ErrCode_Failed = 10001, // 通用失败 failed
+ ErrCode_ParamError = 10002, // 参数错误 parameters error
+ ErrCode_ConnectSocketFailed = 10003, // 连接失败 socket connect failed Socket
+ ErrCode_SocketDisconnect = 10004, // Socket断开连接 socket disconnected Socket
+ ErrCode_CreateRequestFailed = 10005, // 创建请求失败 create request failed
+ ErrCode_RequestRelatedVariableError = 10006, // 请求相关的内部变量出错 internal error
+ ErrCode_RequestTimeout = 10007, // 请求超时 timout
+ ErrCode_SendRequestFailed = 10008, // 发送请求信息失败 send request failed
+ ErrCode_ResponseInfoIsNULL = 10009, // 响应信息为空 response is null
+ ErrCode_ResolveResponseFailed = 10010, // 解析响应失败 parse response failed
+ ErrCode_FkFailed = 10011, // 正解出错 fk failed
+ ErrCode_IkFailed = 10012, // 逆解出错 ik failed
+ ErrCode_ToolCalibrateError = 10013, // 工具标定参数有错 tool coordinate paramter error
+ ErrCode_ToolCalibrateParamError = 10014, // 工具标定参数有错 tool coordinate paramter error
+ ErrCode_CoordinateSystemCalibrateError = 10015, // 坐标系标定失败 user coordinate calibrate failed
+ ErrCode_BaseToUserConvertFailed = 10016, // 基坐标系转用户座标失败 base coordinate convert to user coordinate fialed
+ ErrCode_UserToBaseConvertFailed = 10017, // 用户坐标系转基座标失败 user coordinate convert to base coordinate fialed
+
+
+ ErrCode_MotionRelatedVariableError = 10018, // 运动相关的内部变量出错 move funcation paramters error
+ ErrCode_MotionRequestFailed = 10019, // 运动请求失败 call move funcation failed
+ ErrCode_CreateMotionRequestFailed = 10020, // 生成运动请求失败 create request failed
+ ErrCode_MotionInterruptedByEvent = 10021, // 运动被事件中断 move funcation interrupt
+ ErrCode_MotionWaypointVetorSizeError = 10022, // 运动相关的路点容器的长度不符合规定 parameter error
+ ErrCode_ResponseReturnError = 10023, // 服务器响应返回错误 server reponse error
+ ErrCode_RealRobotNoExist = 10024, // 真实机械臂不存在,因为有些接口只有在真是机械臂存在的情况下才可以被调用 real robot no exist
+
+ ErrCode_moveControlSlowStopFailed = 11025, // 调用缓停接口失败 call function failed, server side error
+ ErrCode_moveControlFastStopFailed = 11026, // 调用急停接口失败 call function failed, server side error
+ ErrCode_moveControlPauseFailed = 11027, // 调用暂停接口失败 call function failed, server side error
+ ErrCode_moveControlContinueFailed = 11028, // 调用继续接口失败 call function failed, server side error
+
+
+ //20000~21000 的异常码是为了版本兼容 后续会逐渐取消
+ ErrCode_collision = 20008, //碰撞
+ ErrCode_robotControllerError = 20026, //控制器异常
+
+
+ /**
+ * 控制器返回的异常
+ **/
+ ErrCodeMoveJConfigError = 21001, // moveJ configuration error 关节运动属性配置错误
+ ErrCodeMoveLConfigError = 21002, // moveL configuration error 直线运动属性配置错误
+ ErrCodeMovePConfigError = 21003, // moveP configuration error 轨迹运动属性配置错误
+ ErrCodeInvailConfigError = 21004, // invail configuration 无效的运动属性配置
+ ErrCodeWaitRobotStopped = 21005, // please wait robot stopped 等待机器人停止
+ ErrCodeJointOutRange = 21006, // joint out of range 超出关节运动范围
+ ErrCodeFirstWaypointSetError = 21007, // please set first waypoint correctly in modep 请正确设置MODEP第一个路点
+ ErrCodeConveyorTrackConfigError = 21008, // configuration error for conveyor tracking 传送带跟踪配置错误
+ ErrCodeConveyorTrackTrajectoryTypeError = 21009, // unsupported conveyor tracking trajectory type 传送带轨迹类型错误
+ ErrCodeRelativeTransformIKFailed = 21010, // inverse kinematics failure due to invalid relative transform 相对坐标变换逆解失败
+ ErrCodeTeachModeCollision = 21011, // collision in teach-mode 示教模式发生碰撞
+ ErrCodeextErnalToolConfigError = 21012, // configuration error for external tool and hand workobject 运动属性配置错误,外部工具或手持工件配置错误
+
+ ErrCodeTrajectoryAbnormal = 21101, // Trajectory is abnormal 轨迹异常
+ ErrCodeOnlineTrajectoryPlanError = 21102, // Trajectory is abnormal,online planning failed 轨迹规划错误
+ ErrCodeOnlineTrajectoryTypeIIError = 21103, // Trajectory is abnormal,type II online planning failed 二型在线轨迹规划失败
+ ErrCodeIKFailed = 21104, // Trajectory is abnormal,inverse kinematics failed 逆解失败
+ ErrCodeAbnormalLimitProtect = 21105, // Trajectory is abnormal,abnormal limit protection 动力学限制保护
+ ErrCodeConveyorTrackingFailed = 21106, // Trajectory is abnormal,conveyor tracking failed 传送带跟踪失败
+ ErrCodeConveyorOutWorkingRange = 21107, // Trajectory is abnormal,exceeding the conveyor working range 超出传送带工作范围
+ ErrCodeTrajectoryJointOutOfRange = 21108, // Trajectory is abnormal,joint out of range 关节超出范围
+ ErrCodeTrajectoryJointOverspeed = 21109, // Trajectory is abnormal,joint overspeed 关节超速
+ ErrCodeOfflineTrajectoryPlanFailed = 21110, // Trajectory is abnormal,Offline track planning failed 离线轨迹规划失败
+ ErrCodeTrajectoryJointAccOutOfRange = 21111, // Trajectory is abnormal,joint acc out of range 轨迹异常,关节加速度超限
+
+ ErrCodeForceModeException = 21120, // 力控模式异常
+ ErrCodeForceModeIKFailed = 21121, // Trajectory is abnormal,force control mode ik failed 轨迹异常,力控模式下失败
+ ErrCodeForceModeTrackJointverspeed = 21122, // Trajectory is abnormal,joint overspeed 关节超速
+
+ ErrCodeControllerIKFailed = 21200, // The controller has an exception and the inverse kinematics failed 控制器异常,逆解失败
+ ErrCodeControllerStatusException = 21201, // The controller has an exception and the status is abnormal 控制器异常,状态异常
+ ErrCodeControllerTrackingLost = 21202, // Exception that joint tracking is lost, 关节跟踪误差过大.
+ ErrCodeMonitorErrTrackingLost = 21203, // Exception that joint tracking is lost, 关节跟踪误差过大.
+ ErrCodeMonitorErrNoArrivalInTime = 21204, // not used 预留
+ ErrCodeMonitorErrCurrentOverload = 21205, // not used 预留
+ ErrCodeMonitorErrJointOutOfRange = 21206, // Exception that joint out of range 机械臂关节超出限制范围
+ ErrCodeFifoDataTimeNotRead = 21207, // 缓存区超时未更新
+
+ ErrCodeMoveEnterStopState = 21300, // Movement enters the stop state 运动进入到stop阶段
+ ErrCodeMoveInterruptedByEvent = 21301, // Movement interrupted by the event 运动被未知事件中断
+
+ /**
+ * 来自硬件层返回的异常
+ **/
+ ErrCodeHardwareErrorNotify = 22001, // Robot hardware error 机械臂硬件错误 不能区分是哪种硬件异常才会返回该错误
+
+ ErrCodeJointError = 22101, // Robot joint error 机械臂关节错误
+ ErrCodeJointOverCurrent = 22102, // Robot joint over current. 机械臂关节过流
+ ErrCodeJointOverVoltage = 22103, // Robot joint over voltage. 机械臂关节过压
+ ErrCodeJointLowVoltage = 22104, // Robot joint low voltage. 机械臂关节欠压
+ ErrCodeJointOverTemperature = 22105, // Robot joint over temperature. 机械臂关节过温
+ ErrCodeJointHallError = 22106, // Robot joint hall error. 机械臂关节霍尔错误
+ ErrCodeJointEncoderError = 22107, // Robot joint encoder error. 机械臂关节编码器错误
+ ErrCodeJointAbsoluteEncoderError = 22108, // Robot joint absolute encoder error. 机械臂关节绝对编码器错误
+ ErrCodeJointCurrentDetectError = 22109, // Robot joint current position error. 机械臂关节当前位置错误
+ ErrCodeJointEncoderPollustion = 22110, // Robot joint encoder pollustion. 机械臂关节编码器污染 建议采取措施:警告性通知
+ ErrCodeJointEncoderZSignalError = 22111, // Robot joint encoder Z signal error. 机械臂关节编码器Z信号错误
+ ErrCodeJointEncoderCalibrateInvalid = 22112, // Robot joint encoder calibrate invalid. 机械臂关节编码器校准失效
+ ErrCodeJoint_IMU_SensorInvalid = 22113, // Robot joint IMU sensor invalid. 机械臂关节IMU传感器失效
+ ErrCodeJointTemperatureSensorError = 22114, // Robot joint temperature sensor error. 机械臂关节温度传感器出错
+ ErrCodeJointCanBusError = 22115, // Robot joint CAN BUS error. 机械臂关节CAN总线出错
+ ErrCodeJointCurrentError = 22116, // Robot joint current error. 机械臂关节当前电流错误
+ ErrCodeJointCurrentPositionError = 22117, // Robot joint current position error. 机械臂关节当前位置错误
+ ErrCodeJointOverSpeed = 22118, // Robot joint over speed. 机械臂关节超速
+ ErrCodeJointOverAccelerate = 22119, // Robot joint over accelerate. 机械臂关节加速度过大错误
+ ErrCodeJointTraceAccuracy = 22120, // Robot joint trace accuracy. 机械臂关节跟踪精度错误
+ ErrCodeJointTargetPositionOutOfRange = 22121, // Robot joint target position out of range. 机械臂关节目标位置超范围
+ ErrCodeJointTargetSpeedOutOfRange = 22122, // Robot joint target speed out of range. 机械臂关节目标速度超范围
+ ErrCodeJointCollision = 22123, // Robot joint collision. 机械臂碰撞 建议采取措施:暂停当前运动
+
+ ErrCodeDataAbnormal = 22200, // Robot data abnormal 机械臂信息异常
+ ErrCodeRobotTypeError = 22201, // Robot type error 机械臂类型错误
+ ErrCodeAccelerationSensorError = 22202, // Robot acceleration sensor error 机械臂加速度计芯片错误
+ ErrCodeEncoderLineError = 22203, // Robot encoder line error 机械臂编码器线数错误
+ ErrCodeEnterDragAndTeachModeError = 22204, // Robot enter drag and teach mode error 机械臂进入拖动示教模式错误
+ ErrCodeExitDragAndTeachModeError = 22205, // Robot exit drag and teach mode error 机械臂退出拖动示教模式错误
+ ErrCodeMACDataInterruptionError = 22206, // Robot MAC data interruption error 机械臂MAC数据中断错误
+ ErrCodeDriveVersionError = 22207, // Drive version error 驱动器版本错误(关节固件版本不一致)
+
+ ErrCodeInitAbnormal = 22300, // Robot init abnormal 机械臂初始化异常
+ ErrCodeDriverEnableFailed = 22301, // Robot driver enable failed 机械臂驱动器使能失败
+ ErrCodeDriverEnableAutoBackFailed = 22302, // Robot driver enable auto back failed 机械臂驱动器使能自动回应失败
+ ErrCodeDriverEnableCurrentLoopFailed = 22303, // Robot driver enable current loop failed 机械臂驱动器使能电流环失败
+ ErrCodeDriverSetTargetCurrentFailed = 22304, // Robot driver set target current failed 机械臂驱动器设置目标电流失败
+ ErrCodeDriverReleaseBrakeFailed = 22305, // Robot driver release brake failed 机械臂释放刹车失败
+ ErrCodeDriverEnablePostionLoopFailed = 22306, // Robot driver enable postion loop failed 机械臂使能位置环失败
+ ErrCodeSetMaxAccelerateFailed = 22307, // Robot set max accelerate failed 设置最大加速度失败
+
+ ErrCodeSafetyError = 22400, // Robot Safety error 机械臂安全出错
+ ErrCodeExternEmergencyStop = 22401, // Robot extern emergency stop 机械臂外部紧急停止
+ ErrCodeSystemEmergencyStop = 22402, // Robot system emergency stop 机械臂系统紧急停止
+ ErrCodeTeachpendantEmergencyStop = 22403, // Robot teachpendant emergency stop 机械臂示教器紧急停止
+ ErrCodeControlCabinetEmergencyStop = 22404, // Robot control cabinet emergency stop 机械臂控制柜紧急停止
+ ErrCodeProtectionStopTimeout = 22405, // Robot protection stop timeout 机械臂保护停止超时
+ ErrCodeEeducedModeTimeout = 22406, // Robot reduced mode timeout 机械臂缩减模式超时
+
+ ErrCodeSystemAbnormal = 22500, // Robot systen abnormal 机械臂系统异常
+ ErrCode_MCU_CommunicationAbnormal = 22501, // Robot mcu communication error 机械臂mcu通信异常
+ ErrCode485CommunicationAbnormal = 22502, // Robot RS485 communication error 机械臂485通信异常
+
+ ErrCodeSoftEmergency = 22550, // 软急停
+
+ ErrCodeArmPowerOff = 22600, //Disconnecting the contactor causes the arm 48V power off 控制柜接触器断开导致机械臂48V断电
+
+ ErrCodeInterfaceNotImpleted = 30000, // 此接口不支持
+ // clang-format on
+} RobotErrorCode;
+
+enum class MoveModeType : int
+{
+ NONE = 0,
+ MOVE_GROUP,
+ SERVOJ,
+ FORCE_TEACH,
+ TRAJECTORY_ANALYSE,
+ TOOL_DYNAMIC_IDENTIFY
+};
+
+} // namespace aubo_robot_namespace
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * @brief 获取实时关节状态回调函数类型.
+ * @param jointStatus 当前的关节状态;
+ * @param size 上一个参数(jointStatus)的长度;
+ * @param arg 使用者在注册回调函数中传递的第二个参数;
+ */
+typedef void (*RealTimeJointStatusCallback)(
+ const aubo_robot_namespace::JointStatus *jointStatus, int size, void *arg);
+
+/**
+ * @brief 获取实时路点信息的回调函数类型.
+ * @param wayPoint 当前的路点信息;
+ * @param arg 使用者在注册回调函数中传递的第二个参数;
+ */
+typedef void (*RealTimeRoadPointCallback)(
+ const aubo_robot_namespace::wayPoint_S *wayPoint, void *arg);
+
+/**
+ *@brief 获取实时末端速度的回调函数类型
+ *@param speed 当前的末端速度;
+ *@param arg 使用者在注册回调函数中传递的第二个参数;
+ */
+typedef void (*RealTimeEndSpeedCallback)(double speed, void *arg);
+
+/**
+ *@brief 获取实时Movep执行进度的回调函数类型
+ *@param num 当前的Movep执行进度;
+ *@param arg 使用者在注册回调函数中传递的第二个参数;
+ */
+typedef void (*RealTimeMovepStepNumNotifyCallback)(int num, void *arg);
+
+/**
+ * @brief 获取机械臂事件信息的回调函数类型
+ * @param arg 使用者在注册回调函数中传递的第二个参数;
+ */
+typedef void (*RobotEventCallback)(
+ const aubo_robot_namespace::RobotEventInfo *eventInfo, void *arg);
+
+/**
+ * @brief 日志输出对应的回调函数类型
+ * @param logLevel 日志级别;
+ * @param str 日志信息;
+ */
+typedef void (*RobotLogPrintCallback)(aubo_robot_namespace::LOG_LEVEL logLevel,
+ const char *str, void *arg);
+
+#endif // AUBOROBOTMETATYPE_H
diff --git a/third_party/AuboSdk/linux/include/aubo/aubo_api.h b/third_party/AuboSdk/linux/include/aubo/aubo_api.h
new file mode 100644
index 00000000..37a6c530
--- /dev/null
+++ b/third_party/AuboSdk/linux/include/aubo/aubo_api.h
@@ -0,0 +1,357 @@
+/** @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
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+namespace arcs {
+namespace common_interface {
+
+class ARCS_ABI_EXPORT AuboApi
+{
+public:
+ AuboApi();
+ virtual ~AuboApi();
+
+ /**
+ * \chinese
+ * 获取纯数学相关接口
+ *
+ * @return MathPtr对象的指针
+ *
+ * @par Python函数原型
+ * getMath(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.Math
+ *
+ * @par C++示例
+ * @code
+ * auto rpc_cli = std::make_shared();
+ * 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();
+ * MathPtr ptr = rpc_cli->getMath();
+ * @endcode
+ *\endenglish
+ */
+ MathPtr getMath();
+
+ /**
+ * \chinese
+ * 获取系统信息
+ *
+ * @return SystemInfoPtr对象的指针
+ *
+ * @par Python函数原型
+ * getSystemInfo(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.SystemInfo
+ *
+ * @par C++示例
+ * @code
+ * auto rpc_cli = std::make_shared();
+ * 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();
+ * SystemInfoPtr ptr = rpc_cli->getSystemInfo();
+ * @endcode
+ * \endenglish
+ */
+ SystemInfoPtr getSystemInfo();
+
+ /**
+ * \chinese
+ * 获取运行时接口
+ *
+ * @return RuntimeMachinePtr对象的指针
+ *
+ * @par Python函数原型
+ * getRuntimeMachine(self: pyaubo_sdk.AuboApi) -> pyaubo_sdk.RuntimeMachine
+ *
+ * @par C++示例
+ * @code
+ * auto rpc_cli = std::make_shared();
+ * 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();
+ * RuntimeMachinePtr ptr = rpc_cli->getRuntimeMachine();
+ * @endcode
+ * \endenglish
+ */
+ RuntimeMachinePtr getRuntimeMachine();
+
+ /**
+ * \chinese
+ * 对外寄存器接口
+ *
+ * @return RegisterControlPtr对象的指针
+ *
+ * @par Python函数原型
+ * getRegisterControl(self: pyaubo_sdk.AuboApi) ->
+ * pyaubo_sdk.RegisterControl
+ *
+ * @par C++示例
+ * @code
+ * auto rpc_cli = std::make_shared();
+ * 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();
+ * RegisterControlPtr ptr = rpc_cli->getRegisterControl();
+ * @endcode
+ * \endenglish
+ */
+ RegisterControlPtr getRegisterControl();
+
+ /**
+ * \chinese
+ * 获取机器人列表
+ *
+ * @return 机器人列表
+ *
+ * @par Python函数原型
+ * getRobotNames(self: pyaubo_sdk.AuboApi) -> List[str]
+ *
+ * @par C++示例
+ * @code
+ * auto rpc_cli = std::make_shared();
+ * 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();
+ * 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 getRobotNames();
+
+ /**
+ * \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();
+ * 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();
+ * auto robot_name = rpc_cli->getRobotNames().front();
+ * RobotInterfacePtr ptr = rpc_cli->getRobotInterface(robot_name);
+ * @endcode
+ * \endenglish
+ */
+ RobotInterfacePtr getRobotInterface(const std::string &name);
+
+ /**
+ * \~chinese 获取外部轴列表 \~english Get external axis list
+ *
+ * @return
+ */
+ std::vector getAxisNames();
+
+ /**
+ * \chinese
+ * 获取外部轴接口
+ *
+ * @param name
+ * @return
+ * \endchinese
+ *
+ * \english
+ * Get external axis interface
+ *
+ * @param name
+ * @return
+ * \endenglish
+ */
+ AxisInterfacePtr getAxisInterface(const std::string &name);
+
+ /// \~chinese 获取独立 IO 模块接口 \~english Get independent IO module interface
+
+ /**
+ * \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();
+ * 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();
+ * SocketPtr ptr = rpc_cli->getSocket();
+ * @endcode
+ * \endenglish
+ */
+ SocketPtr getSocket();
+
+ /**
+ * \chinese
+ * @return SerialPtr对象的指针
+ *
+ * @par Python函数原型
+ * getSerial(self: pyaubo_sdk.AuboApi) -> arcs::common_interface::Serial
+ *
+ * @par C++示例
+ * @code
+ * auto rpc_cli = std::make_shared();
+ * 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();
+ * SerialPtr ptr = rpc_cli->getSerial();
+ * @endcode
+ * \endenglish
+ */
+ SerialPtr getSerial();
+
+ /**
+ * \~chinese 获取同步运动接口 \~english Get syncronous move interface
+ *
+ * \~chinese @return SyncMovePtr对象的指针
+ * \~english @return Shared pointer to SyncMove object
+ */
+ SyncMovePtr getSyncMove(const std::string &name);
+
+ /**
+ * \~chinese 获取告警信息接口
+ * \~english Get alert interface
+ *
+ * \~chinese @return TracePtr对象的指针
+ * \~english @return Shared pointer of trace object
+ */
+ TracePtr getTrace(const std::string &name);
+
+protected:
+ void *d_{ nullptr };
+};
+using AuboApiPtr = std::shared_ptr;
+
+} // namespace common_interface
+} // namespace arcs
+
+#endif // AUBO_SDK_AUBO_API_H
diff --git a/third_party/AuboSdk/linux/include/aubo/axis_interface.h b/third_party/AuboSdk/linux/include/aubo/axis_interface.h
new file mode 100644
index 00000000..a9ed14e6
--- /dev/null
+++ b/third_party/AuboSdk/linux/include/aubo/axis_interface.h
@@ -0,0 +1,381 @@
+/** @file axes.h
+ * @brief 外部轴接口
+ */
+#ifndef AUBO_SDK_AXIS_INTERFACE_H
+#define AUBO_SDK_AXIS_INTERFACE_H
+
+#include
+#include
+
+namespace arcs {
+namespace common_interface {
+
+/**
+ * \~chinese 外部轴API接口
+ * \~english External axis API interface
+ */
+class ARCS_ABI_EXPORT AxisInterface
+{
+public:
+ AxisInterface();
+ virtual ~AxisInterface();
+
+ /**
+ * \~chinese 通电
+ * \~english Power on
+ * @return
+ */
+ int poweronExtAxis();
+
+ /**
+ * \~chinese 断电
+ * \~english Power off
+ * @return
+ */
+ int poweroffExtAxis();
+
+ /**
+ * \~chinese 使能
+ * \~english Enable
+ * @return
+ */
+ int enableExtAxis();
+
+ /**
+ * \~chinese 设置外部轴的安装位姿(相对于世界坐标系)
+ * \~chinese @param pose
+ * \~english Set mounting pose of external axis (wrt world frame)
+ * \~english @param pose
+
+ * @return
+ */
+ int setExtAxisMountingPose(const std::vector &pose);
+
+ /**
+ * \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);
+
+ /**
+ * \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);
+
+ int stopExtJoint(double a);
+
+ /**
+ * \~chinese 获取外部轴的类型 0代表是旋转 1代表平移
+ * \~english Get external axis type: 0 for rotation, 1 for linear
+ * @return
+ */
+ int getExtAxisType();
+
+ /**
+ * \chinese
+ * 获取当前外部轴的状态
+ *
+ * @return 当前外部轴的状态
+ * \endchinese
+ *
+ * \english
+ * Get external axis status
+ *
+ * @return Current exteral axis status
+ * \endenglish
+ */
+ AxisModeType getAxisModeType();
+
+ /**
+ * \chinese
+ * 获取外部轴安装位姿
+ *
+ * @return 外部轴安装位姿
+ * \endchinese
+ *
+ * \english
+ * Get external axis mounting pose
+ *
+ * @return External axis pose
+ * \endenglish
+ */
+ std::vector getExtAxisMountingPose();
+
+ /**
+ * \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 getExtAxisPose();
+
+ /**
+ * \chinese
+ * 获取外部轴位置
+ *
+ * @return 外部轴位置
+ * \endchinese
+ *
+ * \english
+ * Get external axis position
+ *
+ * @return External axis position
+ * \endenglish
+ */
+ double getExtAxisPosition();
+
+ /**
+ * \chinese
+ * 获取外部轴运行速度
+ *
+ * @return 外部轴运行速度
+ * \endchinese
+ *
+ * \english
+ * Get external axis speed
+ *
+ * @return External axis speed
+ * \endenglish
+ */
+ double getExtAxisVelocity();
+
+ /**
+ * \chinese
+ * 获取外部轴运行加速度
+ *
+ * @return 外部轴运行加速度
+ * \endchinese
+ *
+ * \english
+ * Get external axis acceleration
+ *
+ * @return External axis acceleration
+ * \endenglish
+ */
+ double getExtAxisAcceleration();
+
+ /**
+ * \chinese
+ * 获取外部轴电流
+ *
+ * @return 外部轴电流
+ * \endchinese
+ *
+ * \english
+ * Get external axis current
+ *
+ * @return External axis current
+ * \endenglish
+ */
+ double getExtAxisCurrent();
+
+ /**
+ * \chinese
+ * 获取外部轴温度
+ *
+ * @return 外部轴温度
+ * \endchinese
+ *
+ * \english
+ * Get external axis temperature
+ *
+ * @return External axis temperature
+ * \endenglish
+ */
+ double getExtAxisTemperature();
+
+ /**
+ * \chinese
+ * 获取外部轴电压
+ *
+ * @return 外部轴电压
+ * \endchinese
+ *
+ * \english
+ * Get external axis voltage
+ *
+ * @return External axis voltage
+ * \endenglish
+ */
+ double getExtAxisBusVoltage();
+
+ /**
+ * \chinese
+ * 获取外部轴电流
+ *
+ * @return 外部轴电流
+ * \endchinese
+ *
+ * \english
+ * Get external axis current
+ *
+ * @return external axis current
+ * \endenglish
+ */
+ double getExtAxisBusCurrent();
+
+ /**
+ * \chinese
+ * 获取外部轴最大位置
+ *
+ * @return 外部轴最大位置
+ * \endchinese
+ *
+ * \english
+ * Get external axis max position
+ *
+ * @return External axis max position
+ * \endenglish
+ */
+ double getExtAxisMaxPosition();
+
+ /**
+ * \chinese
+ * 获取外部轴最小位置
+ *
+ * @return 外部轴最小位置
+ * \endchinese
+ *
+ * \english
+ * Get external axis min position
+ *
+ * @return External axis min position
+ * \endenglish
+ */
+ double getExtMinPosition();
+
+ /**
+ * \chinese
+ * 获取外部轴最大速度
+ *
+ * @return 外部轴最大速度
+ * \endchinese
+ *
+ * \english
+ * Get external axis max speed
+ *
+ * @return External axis max speed
+ * \endenglish
+ */
+ double getExtAxisMaxVelocity();
+
+ /**
+ * \chinese
+ * 获取外部轴最大加速度
+ *
+ * @return 外部轴最大加速度
+ * \endchinese
+ *
+ * \english
+ * Get external axis max acceleration
+ *
+ * @return External axis max acceleration
+ * \endenglish
+ */
+ double getExtAxisMaxAcceleration();
+
+ /**
+ * \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);
+
+ /**
+ * \~chinese @brief stopFollowAnotherAxis(禁止运动过程中使用)
+ * \~english @brief stopFollowAnotherAxis(not to be used during motion)
+ * @return
+ */
+ int stopFollowAnotherAxis();
+
+ /**
+ * \chinese
+ * 获取外部轴错误码
+ *
+ * @return 外部轴错误码
+ * \endchinese
+ *
+ * \english
+ * Get external axis error code
+ *
+ * @return External axis error code
+ * \endenglish
+ */
+ int getErrorCode();
+
+ /**
+ * \chinese
+ * 重置外部轴错误
+ *
+ * @return
+ * \endchinese
+ *
+ * \english
+ * Reset axis error
+ *
+ * @return
+ * \endenglish
+ */
+ int clearAxisError();
+
+protected:
+ void *d_;
+};
+using AxisInterfacePtr = std::shared_ptr;
+
+} // namespace common_interface
+} // namespace arcs
+
+#endif // AUBO_SDK_AXIS_INTERFACE_H
diff --git a/third_party/AuboSdk/linux/include/aubo/error_stack/error_stack.h b/third_party/AuboSdk/linux/include/aubo/error_stack/error_stack.h
new file mode 100644
index 00000000..141a8941
--- /dev/null
+++ b/third_party/AuboSdk/linux/include/aubo/error_stack/error_stack.h
@@ -0,0 +1,114 @@
+/** @file error_stack.h
+ * @brief 汇总错误码
+ */
+#ifndef AUBO_SDK_ERROR_STACK_H
+#define AUBO_SDK_ERROR_STACK_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+
+// 格式化占位符,默认是 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
+#include
+#include
+
+#define ARCS_ERROR_CODES \
+ SYSTEM_ERRORS \
+ JOINT_ERRORS \
+ SAFETY_INTERFACE_BOARD_ERRORS \
+ RTM_ERRORS \
+ TOOL_ERRORS \
+ 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
diff --git a/third_party/AuboSdk/linux/include/aubo/error_stack/hal_error.h b/third_party/AuboSdk/linux/include/aubo/error_stack/hal_error.h
new file mode 100644
index 00000000..e04e1358
--- /dev/null
+++ b/third_party/AuboSdk/linux/include/aubo/error_stack/hal_error.h
@@ -0,0 +1,164 @@
+/** @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 robot’s 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 robot’s 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 robot’s 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 robot’s 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 robot’s 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 robot’s 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 robot’s 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 robot’s 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 robot’s 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 robot’s 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 robot’s 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 robot’s 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 robot’s 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 robot’s 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 robot’s 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...")
+
+#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 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 SAFETY_INTERFACE_BOARD_ERRORS \
+ _D(IFB_ERR_ROBOTTYPE, 20001, "Robot error type!", "suggest...") \
+ _D(IFB_ERR_ADXL_SENS, 20002, "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...")
+
+
+#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 \
+ SAFETY_INTERFACE_BOARD_ERRORS \
+ TOOL_ERRORS \
+ PEDSTRAL_ERRORS \
+ HARDWARE_INTERFACE_ERRORS
+
+#endif // AUBO_SDK_JOINT_ERROR_H
diff --git a/third_party/AuboSdk/linux/include/aubo/error_stack/rtm_error.h b/third_party/AuboSdk/linux/include/aubo/error_stack/rtm_error.h
new file mode 100644
index 00000000..50c17697
--- /dev/null
+++ b/third_party/AuboSdk/linux/include/aubo/error_stack/rtm_error.h
@@ -0,0 +1,171 @@
+/** @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 Robot’s 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...")
+
+// clang-format on
+
+#endif // AUBO_SDK_RTM_ERROR_H
diff --git a/third_party/AuboSdk/linux/include/aubo/error_stack/system_error.h b/third_party/AuboSdk/linux/include/aubo/error_stack/system_error.h
new file mode 100644
index 00000000..aa5e8cd1
--- /dev/null
+++ b/third_party/AuboSdk/linux/include/aubo/error_stack/system_error.h
@@ -0,0 +1,56 @@
+/** @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(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_X, 50, "ICM slot: " _PH1_ " index " _PH2_ " subindex " _PH3_, \
+ "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
diff --git a/third_party/AuboSdk/linux/include/aubo/global_config.h b/third_party/AuboSdk/linux/include/aubo/global_config.h
new file mode 100644
index 00000000..3673c806
--- /dev/null
+++ b/third_party/AuboSdk/linux/include/aubo/global_config.h
@@ -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 \
+ { \
+ 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
diff --git a/third_party/AuboSdk/linux/include/aubo/math.h b/third_party/AuboSdk/linux/include/aubo/math.h
new file mode 100644
index 00000000..1be0a44e
--- /dev/null
+++ b/third_party/AuboSdk/linux/include/aubo/math.h
@@ -0,0 +1,909 @@
+/** @file math.h
+ * \~chinese @brief 数学方法接口,如欧拉角与四元数转换、位姿的加减运算
+ * \~english @brief Mathematic operation interface, such as euler to quaternion conversion, addition/subtraction of poses
+ */
+#ifndef AUBO_SDK_MATH_INTERFACE_H
+#define AUBO_SDK_MATH_INTERFACE_H
+
+#include
+#include
+
+#include
+#include
+
+namespace arcs {
+namespace common_interface {
+
+class ARCS_ABI_EXPORT Math
+{
+public:
+ Math();
+ virtual ~Math();
+
+ /**
+ * \english
+ * Pose addition
+ *
+ * Both arguments contain three position parameters (x, y, z) jointly called
+ * P, and three rotation parameters (R_x, R_y, R_z) jointly called R. This
+ * function calculates the result x_3 as the addition of the given poses as
+ * follows:
+ *
+ * p_3.P = p_1.P + p_2.P
+ *
+ * p_3.R = p_1.R * p_2.R
+ *
+ * @param p1 Tool pose 1
+ * @param p2 Tool pose 2
+ * @return sum of position parts and product of rotation parts (pose)
+ *
+ * @par Python interface prototype
+ * poseAdd(self: pyaubo_sdk.Math, arg0: List[float], arg1: List[float]) ->
+ * List[float]
+ *
+ * @par Lua interface prototype
+ * poseAdd(p1: table, p2: table) -> table
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.poseAdd","params":[[0.2, 0.5, 0.1, 1.57,
+ * 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":[0.4,1.0,0.7,3.14,-0.0,0.0]}
+ * \endengish
+ *
+ * \chinese
+ * 位姿相加。
+ * 两个参数都包含三个位置参数(x、y、z),统称为P,
+ * 以及三个旋转参数(R_x、R_y、R_z),统称为R。
+ * 此函数根据以下方式计算结果 p_3,即给定位姿的相加:
+ * p_3.P = p_1.P + p_2.P,
+ * p_3.R = p_1.R * p_2.R
+ *
+ * @param p1 工具位姿1(pose)
+ * @param p2 工具位姿2(pose)
+ * @return 位置部分之和和旋转部分之积(pose)
+ *
+ * @par Python函数原型
+ * poseAdd(self: pyaubo_sdk.Math, arg0: List[float], arg1: List[float]) ->
+ * List[float]
+ *
+ * @par Lua函数原型
+ * poseAdd(p1: table, p2: table) -> table
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.poseAdd","params":[[0.2, 0.5, 0.1, 1.57,
+ * 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":[0.4,1.0,0.7,3.14,-0.0,0.0]}
+ * \endchinese
+ */
+ std::vector poseAdd(const std::vector &p1,
+ const std::vector &p2);
+
+ /**
+ * \chinese
+ * 位姿相减
+ *
+ * 两个参数都包含三个位置参数(x、y、z),统称为P,
+ * 以及三个旋转参数(R_x、R_y、R_z),统称为R。
+ * 此函数根据以下方式计算结果 p_3,即给定位姿的相加:
+ * p_3.P = p_1.P - p_2.P,
+ * p_3.R = p_1.R * p_2.R.inverse
+ *
+ * @param p1 工具位姿1
+ * @param p2 工具位姿2
+ * @return 位姿相减计算结果
+ *
+ * @par Python函数原型
+ * poseSub(self: pyaubo_sdk.Math, arg0: List[float], arg1: List[float]) ->
+ * List[float]
+ *
+ * @par Lua函数原型
+ * poseSub(p1: table, p2: table) -> table
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.poseSub","params":[[0.2, 0.5, 0.1, 1.57,
+ * 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":[0.0,0.0,-0.5,0.0,-0.0,0.0]}
+ * \endchinese
+ *
+ * \english
+ * Pose subtraction
+ *
+ * Both arguments contain three position parameters (x, y, z) jointly called
+ * P, and three rotation parameters (R_x, R_y, R_z) jointly called R. This
+ * function calculates the result x_3 as the addition of the given poses as
+ * follows:
+ *
+ * p_3.P = p_1.P - p_2.P,
+ *
+ * p_3.R = p_1.R * p_2.R.inverse
+ *
+ * @param p1 tool pose 1
+ * @param p2 tool pose 2
+ * @return difference between two poses
+ *
+ * @par Python interface prototype
+ * poseSub(self: pyaubo_sdk.Math, arg0: List[float], arg1: List[float]) ->
+ * List[float]
+ *
+ * @par Lua interface prototype
+ * poseSub(p1: table, p2: table) -> table
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.poseSub","params":[[0.2, 0.5, 0.1, 1.57,
+ * 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":[0.0,0.0,-0.5,0.0,-0.0,0.0]}
+ * \endenglish
+ */
+ std::vector poseSub(const std::vector &p1,
+ const std::vector &p2);
+
+ /**
+ * \chinese
+ * 计算线性插值
+ *
+ * @param p1 起点的TCP位姿
+ * @param p2 终点的TCP位姿
+ * @param alpha 系数,
+ * 当01,返回p2;
+ * 当alpha<0,返回p1;
+ * @return 插值计算结果
+ *
+ * @par Python函数原型
+ * interpolatePose(self: pyaubo_sdk.Math, arg0: List[float], arg1:
+ * List[float], arg2: float) -> List[float]
+ *
+ * @par Lua函数原型
+ * interpolatePose(p1: table, p2: table, alpha: number) -> table
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.interpolatePose","params":[[0.2, 0.2,
+ * 0.4, 0, 0, 0],[0.2, 0.2, 0.6, 0, 0, 0],0.5],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":[0.2,0.2,0.5,0.0,-0.0,0.0]}
+ * \endchinese
+ *
+ * \english
+ * Calculate linear interpolation
+ *
+ * @param p1 starting TCP pose
+ * @param p2 ending TCP pose
+ * @param alpha coefficient;
+ * When 01, return p2;
+ * When alpha<0,return p1;
+ * @return interpolation result
+ *
+ * @par Python interface prototype
+ * interpolatePose(self: pyaubo_sdk.Math, arg0: List[float], arg1:
+ * List[float], arg2: float) -> List[float]
+ *
+ * @par Lua interface prototype
+ * interpolatePose(p1: table, p2: table, alpha: number) -> table
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.interpolatePose","params":[[0.2, 0.2,
+ * 0.4, 0, 0, 0],[0.2, 0.2, 0.6, 0, 0, 0],0.5],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":[0.2,0.2,0.5,0.0,-0.0,0.0]}
+ * \endenglish
+ *
+ */
+ std::vector interpolatePose(const std::vector &p1,
+ const std::vector &p2,
+ double alpha);
+ /**
+ * \chinese
+ * 位姿变换
+ *
+ * 第一个参数 p_from 用于转换第二个参数 p_from_to,并返回结果。
+ * 这意味着结果是从 p_from 的坐标系开始,
+ * 然后在该坐标系中移动 p_from_to后的位姿。
+ *
+ * 这个函数可以从两个不同的角度来看。
+ * 一种是函数将 p_from_to 根据 p_from 的参数进行转换,即平移和旋转。
+ * 另一种是函数被用于获取结果姿态,先对 p_from 进行移动,然后再对 p_from_to
+ * 进行移动。 如果将姿态视为转换矩阵,它看起来像是:
+ *
+ * T_world->to = T_world->from * T_from->to,
+ * T_x->to = T_x->from * T_from->to
+ *
+ * 这两个方程描述了姿态变换的基本原理,根据给定的起始姿态和相对于起始姿态的姿态变化,可以计算出目标姿态。
+ *
+ * 举个例子,已知B相对于A的位姿、C相对于B的位姿,求C相对于A的位姿。
+ * 第一个参数是B相对于A的位姿,第二个参数是C相对于B的位姿,
+ * 返回值是C相对于A的位姿。
+ *
+ * @param pose_from 起始位姿(空间向量)
+ * @param pose_from_to 相对于起始位姿的姿态变化(空间向量)
+ * @return 结果位姿 (空间向量)
+ *
+ * @par Python函数原型
+ * poseTrans(self: pyaubo_sdk.Math, arg0: List[float], arg1: List[float]) ->
+ * List[float]
+ *
+ * @par Lua函数原型
+ * poseTrans(pose_from: table, pose_from_to: table) -> table
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.poseTrans","params":[[0.2, 0.5,
+ * 0.1, 1.57, 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":[0.4,-0.09960164640373415,0.6004776374923573,3.14,-0.0,0.0]}
+ * \endchinese
+ *
+ * \english
+ * Pose transformation
+ *
+ * The first argument, p_from, is used to transform the second argument,
+ * p_from_to, and the result is then returned. This means that the result is
+ * the resulting pose, when starting at the coordinate system of p_from, and
+ * then in that coordinate system moving p_from_to.
+ *
+ * This function can be seen in two different views. Either the function
+ * transforms, that is translates and rotates, p_from_to by the parameters
+ * of p_from. Or the function is used to get the resulting pose, when first
+ * making a move of p_from and then from there, a move of p_from_to. If the
+ * poses were regarded as transformation matrices, it would look like:
+ *
+ * T_world->to = T_world->from * T_from->to,
+ * T_x->to = T_x->from * T_from->to
+ *
+ *
+ * These two equations describes the foundations for pose transformation.
+ * Based on a starting pose and the pose transformation relative to the starting pose, we can get the target pose.
+ *
+ * For example, we know pose of B relative to A, pose of C relative to B, find pose of C relative to A.
+ * param 1 is pose of B relative to A,param 2 is pose of C relative to B,
+ * the return value is the pose of C relative to A
+ *
+ * @param pose_from starting pose(vector in 3D space)
+ * @param pose_from_to pose transformation relative to starting pose(vector in 3D space)
+ * @return final pose (vector in 3D space)
+ *
+ * @par Python interface prototype
+ * poseTrans(self: pyaubo_sdk.Math, arg0: List[float], arg1: List[float]) ->
+ * List[float]
+ *
+ * @par Lua interface prototype
+ * poseTrans(pose_from: table, pose_from_to: table) -> table
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.poseTrans","params":[[0.2, 0.5,
+ * 0.1, 1.57, 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":[0.4,-0.09960164640373415,0.6004776374923573,3.14,-0.0,0.0]}
+ * \endenglish
+ */
+ std::vector poseTrans(const std::vector &pose_from,
+ const std::vector &pose_from_to);
+
+ /**
+ * \english
+ * Pose inverse transformation
+ *
+ * Given pose of C relative to A, pose of C relative to B, find pose of B relative to A.
+ * param 1 is pose of C relative to A,param 2 is pose of C relative to B,
+ * the return value is the pose of B relative to A
+ *
+ * @param pose_from starting pose
+ * @param pose_to_from pose transformation relative to final pose
+ * @return resulting pose
+ *
+ * @par Python interface prototype
+ * poseTransInv(self: pyaubo_sdk.Math, arg0: List[float], arg1: List[float])
+ * -> List[float]
+ *
+ * @par Lua interface prototype
+ * poseTransInv(pose_from: table, pose_to_from: table) -> table
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.poseTransInv","params":[[0.4, -0.0996016,
+ * 0.600478, 3.14, 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":[0.2,0.5000000464037341,0.10000036250764266,1.57,-0.0,0.0]}
+ * \endenglish
+ *
+ * \chinese
+ * 姿态逆变换
+ *
+ * 已知C相对于A的位姿、C相对于B的位姿,求B相对于A的位姿。
+ * 第一个参数是C相对于A的位姿,第二个参数是C相对于B的位姿,
+ * 返回值是B相对于A的位姿。
+ *
+ * @param pose_from 起始位姿
+ * @param pose_to_from 相对于结果位姿的姿态变化
+ * @return 结果位姿
+ *
+ * @par Python函数原型
+ * poseTransInv(self: pyaubo_sdk.Math, arg0: List[float], arg1: List[float])
+ * -> List[float]
+ *
+ * @par Lua函数原型
+ * poseTransInv(pose_from: table, pose_to_from: table) -> table
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.poseTransInv","params":[[0.4, -0.0996016,
+ * 0.600478, 3.14, 0, 0],[0.2, 0.5, 0.6, 1.57, 0, 0]],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":[0.2,0.5000000464037341,0.10000036250764266,1.57,-0.0,0.0]}
+ * \endchinese
+ */
+ std::vector poseTransInv(const std::vector &pose_from,
+ const std::vector &pose_to_from);
+
+ /**
+ * \chinese
+ * 获取位姿的逆
+ *
+ * @param pose 工具位姿(空间向量)
+ * @return 工具位姿的逆转换(空间向量)
+ *
+ * @par Python函数原型
+ * poseInverse(self: pyaubo_sdk.Math, arg0: List[float]) -> List[float]
+ *
+ * @par Lua函数原型
+ * poseInverse(pose: table) -> table
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.poseInverse","params":[[0.2, 0.5,
+ * 0.1, 1.57, 0, 3.14]],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":[0.19920341988726448,-0.09960155178838484,-0.5003973704832628,
+ * 1.5699999989900404,-0.0015926530848129354,-3.1415913853161266]}
+ *
+ * \endchinese
+ *
+ * \english
+ * Get the inverse of a pose
+ *
+ * @param pose tool pose (spatial vector)
+ * @return inverse tool pose transformation (spatial vector)
+ *
+ * @par Python interface prototype
+ * poseInverse(self: pyaubo_sdk.Math, arg0: List[float]) -> List[float]
+ *
+ * @par Lua interface prototype
+ * poseInverse(pose: table) -> table
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.poseInverse","params":[[0.2, 0.5,
+ * 0.1, 1.57, 0, 3.14]],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":[0.19920341988726448,-0.09960155178838484,-0.5003973704832628,
+ * 1.5699999989900404,-0.0015926530848129354,-3.1415913853161266]}
+ * \endenglish
+ *
+ */
+ std::vector poseInverse(const std::vector &pose);
+
+ /**
+ * \chinese
+ * 计算两个位姿的位置距离
+ *
+ * @param p1 位姿1
+ * @param p2 位姿2
+ * @return 两个位姿的位置距离
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.poseDistance","params":[[0.1, 0.3, 0.1,
+ * 0.3142, 0.0, 1.571],[0.2, 0.5, 0.6, 0, -0.172, 0.0]],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":0.5477225575051661}
+ * \endchinese
+ *
+ * \english
+ * Calculate distance between two poses
+ *
+ * @param p1 pose 1
+ * @param p2 pose 2
+ * @return distance between the poses
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.poseDistance","params":[[0.1, 0.3, 0.1,
+ * 0.3142, 0.0, 1.571],[0.2, 0.5, 0.6, 0, -0.172, 0.0]],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":0.5477225575051661}
+ * \endenglish
+ *
+ */
+ double poseDistance(const std::vector &p1,
+ const std::vector &p2);
+
+ /**
+ * \chinese
+ * 计算两个位姿的轴角距离
+ *
+ * @param p1 位姿1
+ * @param p2 位姿2
+ * @return 轴角距离
+ * \endchinese
+ *
+ * \english
+ * Calculate axis-angle difference between two poses
+ *
+ * @param p1 pose 1
+ * @param p2 pose 2
+ * @return axis angle difference
+ * \endenglish
+ */
+ double poseAngleDistance(const std::vector &p1,
+
+ const std::vector &p2);
+
+ /**
+ * \chinese
+ * 判断两个位姿是否相等
+ *
+ * @param p1 位姿1
+ * @param p2 位姿2
+ * @param eps 误差
+ * @return 相等返回true,反之返回false
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.poseDistance","params":[[0.1, 0.3, 0.1,
+ * 0.3142, 0.0, 1.571],[0.1, 0.3, 0.1, 0.3142, 0.0, 1.5711]],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":0.0}
+ * \endchinese
+ *
+ * \english
+ * Determine if two poses are equivalent
+ *
+ * @param p1 pose 1
+ * @param p2 pose 2
+ * @param eps error margin
+ * @return true or false
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.poseDistance","params":[[0.1, 0.3, 0.1,
+ * 0.3142, 0.0, 1.571],[0.1, 0.3, 0.1, 0.3142, 0.0, 1.5711]],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":0.0}
+ * \endenglish
+ */
+ bool poseEqual(const std::vector &p1, const std::vector &p2,
+ double eps = 5e-5);
+
+ /**
+ * \chinese
+ * @param F_b_a_old
+ * @param V_in_a
+ * @param type
+ * @return
+ *
+ * @par Python函数原型
+ * transferRefFrame(self: pyaubo_sdk.Math, arg0: List[float], arg1:
+ * List[float[3]], arg2: int) -> List[float]
+ *
+ * @par Lua函数原型
+ * transferRefFrame(F_b_a_old: table, V_in_a: table, type: number) -> table
+ * \endchinese
+ *
+ * \english
+ * @param F_b_a_old
+ * @param V_in_a
+ * @param type
+ * @return
+ *
+ * @par Python interface prototype
+ * transferRefFrame(self: pyaubo_sdk.Math, arg0: List[float], arg1:
+ * List[float[3]], arg2: int) -> List[float]
+ *
+ * @par Lua interface prototype
+ * transferRefFrame(F_b_a_old: table, V_in_a: table, type: number) -> table
+ * \endenglish
+ */
+ std::vector transferRefFrame(const std::vector &F_b_a_old,
+ const Vector3d &V_in_a, int type);
+
+ /**
+ * \chinese
+ * 姿态旋转
+ *
+ * @param pose
+ * @param rotv
+ * @return
+ *
+ * @par Python函数原型
+ * poseRotation(self: pyaubo_sdk.Math, arg0: List[float], arg1: List[float])
+ * -> List[float]
+ *
+ * @par Lua函数原型
+ * poseRotation(pose: table, rotv: table) -> table
+ * \endchinese
+ *
+ * \english
+ * Pose rotation
+ *
+ * @param pose
+ * @param rotv
+ * @return
+ *
+ * @par Python interface prototype
+ * poseRotation(self: pyaubo_sdk.Math, arg0: List[float], arg1: List[float])
+ * -> List[float]
+ *
+ * @par Lua interface prototype
+ * poseRotation(pose: table, rotv: table) -> table
+ * \endenglish
+ */
+ std::vector poseRotation(const std::vector &pose,
+ const std::vector &rotv);
+
+ /**
+ * \chinese
+ * 欧拉角转四元数
+ *
+ * @param rpy 欧拉角
+ * @return 四元数
+ *
+ * @par Python函数原型
+ * rpyToQuaternion(self: pyaubo_sdk.Math, arg0: List[float]) -> List[float]
+ *
+ * @par Lua函数原型
+ * rpyToQuaternion(rpy: table) -> table
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.rpyToQuaternion","params":[[0.611, 0.785,
+ * 0.960]],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":[0.834721517970497,0.07804256900772265,0.4518931575790371,0.3048637712043723]}
+ * \endchinese
+ *
+ * \english
+ * Euler angles to quaternions
+ *
+ * @param rpy euler angles
+ * @return quaternions
+ *
+ * @par Python interface prototype
+ * rpyToQuaternion(self: pyaubo_sdk.Math, arg0: List[float]) -> List[float]
+ *
+ * @par Lua interface prototype
+ * rpyToQuaternion(rpy: table) -> table
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.rpyToQuaternion","params":[[0.611, 0.785,
+ * 0.960]],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":[0.834721517970497,0.07804256900772265,0.4518931575790371,0.3048637712043723]}
+ * \endenglish
+ */
+ std::vector rpyToQuaternion(const std::vector &rpy);
+
+ /**
+ * \chinese
+ * 四元数转欧拉角
+ *
+ * @param quat 四元数
+ * @return 欧拉角
+ *
+ * @par Python函数原型
+ * quaternionToRpy(self: pyaubo_sdk.Math, arg0: List[float]) -> List[float]
+ *
+ * @par Lua函数原型
+ * quaternionToRpy(quat: table) -> table
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.quaternionToRpy","params":[[0.834722,
+ * 0.0780426, 0.451893, 0.304864]],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":[0.6110000520523781,0.7849996877683915,0.960000543982093]}
+ * \endchinese
+ *
+ * \english
+ * Quaternions to euler angles
+ *
+ * @param quat quaternions
+ * @return euler angles
+ *
+ * @par Python interface prototype
+ * quaternionToRpy(self: pyaubo_sdk.Math, arg0: List[float]) -> List[float]
+ *
+ * @par Lua interface prototype
+ * quaternionToRpy(quat: table) -> table
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.quaternionToRpy","params":[[0.834722,
+ * 0.0780426, 0.451893, 0.304864]],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":[0.6110000520523781,0.7849996877683915,0.960000543982093]}
+ * \endenglish
+ */
+ std::vector quaternionToRpy(const std::vector &quat);
+
+ /**
+ * \chinese
+ * 四点法标定TCP偏移
+ *
+ * 找一个尖点,将机械臂工具末端点绕着尖点示教四个位置,姿态差别要大。
+ * 设置完毕后即可计算出来结果。
+ *
+ * @param poses 四个点的位姿集合
+ * @return TCP标定结果和标定结果是否有效
+ *
+ * @par Python函数原型
+ * tcpOffsetIdentify(self: pyaubo_sdk.Math, arg0: List[List[float]]) ->
+ * Tuple[List[float], int]
+ *
+ * @par Lua函数原型
+ * tcpOffsetIdentify(poses: table) -> table
+ * \endchinese
+ *
+ * \english
+ * Four point method calibration for TCP offset
+ *
+ * About a sharp point, move the robot's tcp in four different poses. Difference between each pose should be drastic.
+ * Result can be obtained based on these four poses
+ *
+ * @param poses combination of four different poses
+ * @return TCP calibration result and whether successfull
+ *
+ * @par Python interface prototype
+ * tcpOffsetIdentify(self: pyaubo_sdk.Math, arg0: List[List[float]]) ->
+ * Tuple[List[float], int]
+ *
+ * @par Lua interface prototype
+ * tcpOffsetIdentify(poses: table) -> table
+ * \endenglish
+ */
+ ResultWithErrno tcpOffsetIdentify(
+ const std::vector> &poses);
+
+ /**
+ * \chinese
+ * 三点法标定坐标系
+ *
+ * @param poses 三个点的位姿集合
+ * @param type 类型:\n
+ * 0 - oxy 原点 x轴正方向 xy平面(y轴正方向)\n
+ * 1 - oxz 原点 x轴正方向 xz平面(z轴正方向)\n
+ * 2 - oyz 原点 y轴正方向 yz平面(z轴正方向)\n
+ * 3 - oyx 原点 y轴正方向 yx平面(x轴正方向)\n
+ * 4 - ozx 原点 z轴正方向 zx平面(x轴正方向)\n
+ * 5 - ozy 原点 z轴正方向 zy平面(y轴正方向)\n
+ * @return 坐标系标定结果和标定结果是否有效
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.calibrateCoordinate","params":[[[0.55462,0.06219,0.37175,-3.142,0.0,1.580],
+ * [0.63746,0.11805,0.37175,-3.142,0.0,1.580],[0.40441,0.28489,0.37174,-3.142,0.0,1.580]],0],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":[[0.55462,0.06219,0.37175,-3.722688983883945e-05,-1.6940658945086007e-21,0.5932768162455785],0]}
+ * \endchinese
+ *
+ * \english
+ * Calibrate coordinate system with 3 points
+ *
+ * @param poses set of 3 poses
+ * @param type type:\n
+ * 0 - oxy origin, +x axis, xy plane (+y direction) \n
+ * 1 - oxz origin, +x axis, xz plane (+z direction) \n
+ * 2 - oyz origin, +y axis, yz plane (+z direction) \n
+ * 3 - oyx origin, +y axis, yx plane (+x direction) \n
+ * 4 - ozx origin, +z axis, zx plane (+x direction) \n
+ * 5 - ozy origin, +z axis, zy plane (+y direction) \n
+ * @return Coordinate system calibration result and whether the calibration result is valid
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.calibrateCoordinate","params":[[[0.55462,0.06219,0.37175,-3.142,0.0,1.580],
+ * [0.63746,0.11805,0.37175,-3.142,0.0,1.580],[0.40441,0.28489,0.37174,-3.142,0.0,1.580]],0],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":[[0.55462,0.06219,0.37175,-3.722688983883945e-05,-1.6940658945086007e-21,0.5932768162455785],0]}
+ * \endenglish
+ */
+ ResultWithErrno calibrateCoordinate(
+ const std::vector> &poses, int type);
+
+ /**
+ * \chinese
+ * 根据圆弧的三个点,计算出拟合成的圆的另一半圆弧的中间点位置
+ *
+ * @param p1 圆弧的起始点
+ * @param p2 圆弧的中间点
+ * @param p3 圆弧的结束点
+ * @param mode 当mode等于1的时候,表示需要对姿态进行圆弧规划;
+ * 当mode等于0的时候,表示不需要对姿态进行圆弧规划
+ *
+ * @return 拟合成的圆的另一半圆弧的中间点位置和计算结果是否有效
+ *
+ * @par JSON-RPC请求示例
+ * {"jsonrpc":"2.0","method":"Math.calculateCircleFourthPoint","params":[[0.5488696249770836,-0.1214996547187204,0.2631931199112321,-3.14159198038469,-3.673205103150083e-06,1.570796326792424],
+ * [0.5488696249770835,-0.1214996547187207,0.3599720701808493,-3.14159198038469,-3.6732051029273e-06,1.570796326792423],
+ * [0.5488696249770836,-0.0389996547187214,0.3599720701808496,-3.141591980384691,-3.673205102557476e-06,
+ * 1.570796326792422],1],"id":1}
+ *
+ * @par JSON-RPC响应示例
+ * {"id":1,"jsonrpc":"2.0","result":[[0.5488696249770837,-0.031860179583911546,0.27033259504604207,-3.1415919803846903,-3.67320510285378e-06,1.570796326792423],1]}
+ *
+ * \endchinese
+ *
+ * \english
+ * Based on three points on an arc, calculate the position of the midpoint of the other half of the fitted circle's arc
+ *
+ * @param p1 start point of the arc
+ * @param p2 middle point of the arc
+ * @param p3 end point of the arc
+ * @param mode when mode = 1, need to plan for orientation around arc;
+ * when mode = 0, do not need to plan for orientation around arc.
+ * @return position of the midpoint of the other half of the fitted circle's arc and whether the result is valid.
+ *
+ * @par JSON-RPC request example
+ * {"jsonrpc":"2.0","method":"Math.calculateCircleFourthPoint","params":[[0.5488696249770836,-0.1214996547187204,0.2631931199112321,-3.14159198038469,-3.673205103150083e-06,1.570796326792424],
+ * [0.5488696249770835,-0.1214996547187207,0.3599720701808493,-3.14159198038469,-3.6732051029273e-06,1.570796326792423],
+ * [0.5488696249770836,-0.0389996547187214,0.3599720701808496,-3.141591980384691,-3.673205102557476e-06,
+ * 1.570796326792422],1],"id":1}
+ *
+ * @par JSON-RPC response example
+ * {"id":1,"jsonrpc":"2.0","result":[[0.5488696249770837,-0.031860179583911546,0.27033259504604207,-3.1415919803846903,-3.67320510285378e-06,1.570796326792423],1]}
+ *
+ * \endenglish
+ */
+ ResultWithErrno calculateCircleFourthPoint(const std::vector &p1,
+ const std::vector &p2,
+ const std::vector &p3,
+ int mode);
+ /**
+ * \chinese
+ * @brief forceTrans:
+ * 变换力和力矩的参考坐标系 force_in_b = pose_a_in_b * force_in_a
+ * @param pose_a_in_b: a 坐标系在 b 坐标系的位姿
+ * @param force_in_a: 力和力矩在 a 坐标系的描述
+ * @return force_in_b,力和力矩在 b 坐标系的描述
+ * \endchinese
+ *
+ * \english
+ * @brief forceTrans:
+ * Transform the reference frame of force and torque: force_in_b = pose_a_in_b * force_in_a
+ * @param pose_a_in_b: pose of frame a in frame b
+ * @param force_in_a: force and torque described in frame a
+ * @return Force_in_b, force and torque described in frame b
+ * \endenglish
+ */
+ std::vector forceTrans(const std::vector &pose_a_in_b,
+ const std::vector &force_in_a);
+
+ /**
+ * \chinese
+ * @brief 通过距离计算工具坐标系下的位姿增量
+ * @param distances: N 个距离, N >=3
+ * @param position: 距离参考轨迹的保持高度
+ * @param radius: 传感器中心距离末端tcp的等效半径
+ * @param track_scale: 跟踪比例, 设置范围(0, 1], 1表示跟踪更快
+ * @return 基于工具坐标系的位姿增量
+ * \endchinese
+ *
+ * \english
+ * @brief Calculate pose increment in tool coordinate system based on sensor data
+ * @param distances: N distances, N >= 3
+ * @param position: reference height to maintain from the trajectory
+ * @param radius: effective radius from sensor center to tool TCP
+ * @param track_scale: tracking ratio, range (0, 1], 1 means faster tracking
+ * @return Pose increment in tool coordinate system
+ * \endenglish
+ */
+ std::vector getDeltaPoseBySensorDistance(
+ const std::vector &distances, double position, double radius,
+ double track_scale);
+
+ /**
+ * \chinese
+ * @brief changeFTFrame: 变换力和力矩的参考坐标系
+ * @param pose_a_in_b: a 坐标系在 b 坐标系的位姿
+ * @param ft_in_a: 作用在 a 点的力和力矩在 a 坐标系的描述
+ * @return ft_in_b,作用在 b 点的力和力矩在 b 坐标系的描述
+ * \endchinese
+ *
+ * \english
+ * @brief changeFTFrame: Transform the reference frame of force and torque
+ * @param pose_a_in_b: pose of frame a in frame b
+ * @param ft_in_a: force and torque applied at point a, described in frame a
+ * @return ft_in_b, force and torque applied at point b, described in frame b
+ * \endenglish
+ */
+ std::vector deltaPoseTrans(const std::vector &pose_a_in_b,
+ const std::vector &ft_in_a);
+
+ /**
+ * \chinese
+ * @brief addDeltaPose: 计算以给定速度变换单位时间后的位姿
+ * @param pose_a_in_b: 当前时刻 a 相对于 b 的位姿
+ * @param v_in_b: 当前时刻 a 坐标系的速度在 b 的描述
+ * @return pose_in_b, 单位时间后的位姿在 b 的描述
+ * \endchinese
+ *
+ * \english
+ * @brief addDeltaPose: Calculate the pose after unit time given a velocity
+ * @param pose_a_in_b: current pose of a relative to b
+ * @param v_in_b: velocity of frame a described in frame b at current time
+ * @return pose_in_b, pose after unit time described in frame b
+ * \endenglish
+ */
+ std::vector deltaPoseAdd(const std::vector &pose_a_in_b,
+ const std::vector &v_in_b);
+
+ /**
+ * \chinese
+ * @brief changePoseWithXYRef: 修改 pose_tar 的xy轴方向,尽量与 pose_ref 一致,
+ * @param pose_tar: 需要修改的目标位姿
+ * @param pose_ref: 参考位姿
+ * @return 修改后的位姿,采用pose_tar的 xyz 坐标和 z 轴方向
+ * \endchinese
+ *
+ * \english
+ * @brief changePoseWithXYRef: Modify the XY axis direction of pose_tar to be as consistent as possible with pose_ref
+ * @param pose_tar: target pose to be modified
+ * @param pose_ref: reference pose
+ * @return Modified pose, using the xyz coordinates and z axis direction of pose_tar
+ * \endenglish
+ */
+ std::vector changePoseWithXYRef(
+ const std::vector &pose_tar,
+ const std::vector &pose_ref);
+
+ /**
+ * \chinese
+ * @brief homMatrixToPose: 由齐次变换矩阵得到位姿
+ * @param homMatrix: 4*4 齐次变换矩阵, 输入元素采用横向排列
+ * @return 对应的位姿
+ * \endchinese
+ *
+ * \english
+ * @brief homMatrixToPose: Get pose from homogeneous transformation matrix
+ * @param homMatrix: 4x4 homogeneous transformation matrix, input elements are arranged row-wise
+ * @return corresponding pose
+ * \endenglish
+ */
+ std::vector homMatrixToPose(const std::vector &homMatrix);
+
+ /**
+ * \chinese
+ * @brief poseToHomMatrix: 位姿变换得到齐次变换矩阵
+ * @param pose: 输入的位姿
+ * @return 输出的齐次变换矩阵,元素横向排列
+ * \endchinese
+ *
+ * \english
+ * @brief poseToHomMatrix: Get homogeneous transformation matrix from pose
+ * @param pose: input pose
+ * @return output homogeneous transformation matrix, elements arranged row-wise
+ * \endenglish
+ */
+ std::vector poseToHomMatrix(const std::vector &pose);
+
+protected:
+ void *d_;
+};
+using MathPtr = std::shared_ptr