AUBO SDK  0.26.0
Loading...
Searching...
No Matches
type_def.h
Go to the documentation of this file.
1/** @file type_def.h
2 * \~chinese @brief 数据类型的定义 \~english @brief enum type definitions
3 */
4#ifndef AUBO_SDK_TYPE_DEF_H
5#define AUBO_SDK_TYPE_DEF_H
6
7#include <stddef.h>
8#include <array>
9#include <vector>
10#include <memory>
11#include <functional>
12#include <iostream>
13#include <string>
14
15#ifdef _MSC_VER
16#pragma execution_character_set("utf-8")
17#endif
18
19// clang-format off
20
21namespace arcs {
22namespace common_interface {
23
24/// Cartesion degree of freedom, 6 for x,y,z,rx,ry,rz
25#define CARTESIAN_DOF 6
26#define SAFETY_PARAM_SELECT_NUM 2 ///< \~chinese 正常 + 缩减 \~english normal + reduced
27#define SAFETY_PLANES_NUM 8 ///< \~chinese 安全平面的数量 \~english Number of safety planes
28#define SAFETY_CUBIC_NUM 10 ///< \~chinese 安全立方体的数量 \~english Number of safety cubes
29#define TOOL_CONFIGURATION_NUM 3 ///< \~chinese 工具配置数量 \~english Number of tool configurations
30
31using Vector3d = std::array<double, 3>;
32using Vector4d = std::array<double, 4>;
33using Vector3f = std::array<float, 3>;
34using Vector4f = std::array<float, 4>;
35using Vector6f = std::array<float, 6>;
36
38{
40 {
41 for (int i = 0; i < SAFETY_PARAM_SELECT_NUM; i++) {
42 params[i].power = 0.;
43 params[i].momentum = 0.;
44 params[i].stop_time = 0.;
45 params[i].stop_distance = 0.;
46 params[i].reduced_entry_time = 0.;
47 params[i].reduced_entry_distance = 0.;
48 params[i].tcp_speed = 0.;
49 params[i].elbow_speed = 0.;
50 params[i].tcp_force = 0.;
51 params[i].elbow_force = 0.;
52 std::fill(params[i].qmin.begin(), params[i].qmin.end(), 0.);
53 std::fill(params[i].qmax.begin(), params[i].qmax.end(), 0.);
54 std::fill(params[i].qdmax.begin(), params[i].qdmax.end(), 0.);
55 std::fill(params[i].joint_torque.begin(),
56 params[i].joint_torque.end(), 0.);
57 params[i].tool_orientation.fill(0.);
58 params[i].tool_deviation = 0.;
59 for (int j = 0; j < SAFETY_PLANES_NUM; j++) {
60 params[i].planes[j].fill(0.);
61 params[i].restrict_elbow[j] = 0;
62 }
63 }
64 for (int i = 0; i < SAFETY_PLANES_NUM; i++) {
65 trigger_planes[i].plane.fill(0.);
66 trigger_planes[i].restrict_elbow = 0;
67 }
68 for (int i = 0; i < SAFETY_CUBIC_NUM; i++) {
69 cubic[i].orig.fill(0.);
70 cubic[i].size.fill(0.);
71 cubic[i].restrict_elbow = 0;
72 }
73 for (int i = 0; i < TOOL_CONFIGURATION_NUM; i++) {
74 tools[i].fill(0.);
75 }
76
78 tool_azimuth = 0.;
79 std::fill(safety_home.begin(), safety_home.end(), 0.);
80
90
100
103 }
104
105 uint32_t crc32{ 0 };
106
107 /// \~chinese 最多可以保存2套参数, 默认使用第 0 套参数 \~english At most 2
108 /// sets of parameters can be saved, default is the 0th set
109 struct
110 {
111 float power; ///< \~chinese 关节力矩与关节角速度的乘积之和 \~english sum of joint torques times joint angular speeds
112 float momentum; ///< \~chinese 机器人动量限制 \~english robot momentum limit
113 float stop_time; ///< \~chinese 停机时间 ms \~english stop time in milliseconds
114 float stop_distance; ///< \~chinese 停机距离 m \~english stop distance in meters
115 float reduced_entry_time; ///< \~chinese 进入缩减模式的最大时间 \~english maximum time to enter reduced mode
116 float reduced_entry_distance; ///< \~chinese 进入缩减模式的最大距离(可由安全平面触发) \~english maximum distance to enter reduced mode (can be triggered by safety planes)
121 std::vector<float> qmin;
122 std::vector<float> qmax;
123 std::vector<float> qdmax;
124 std::vector<float> joint_torque;
127 Vector4f planes[SAFETY_PLANES_NUM]; /// x,y,z,displacement
130
131 /// \~chinese 8个触发平面 \~english 8 trigger planes
132 struct
133 {
134 Vector4f plane; /// x,y,z,displacement
135 int restrict_elbow;
137
138 struct
139 {
140 Vector6f orig; ///< \~chinese 立方块的原点 (x,y,z,rx,ry,rz) \~english origin of the cubic (x,y,z,rx,ry,rz)
141 Vector3f size; ///< \~chinese 立方块的尺寸 (x,y,z) \~english size of the cubic (x,y,z)
142 int restrict_elbow;
143 } cubic[SAFETY_CUBIC_NUM]; ///< \~chinese 10个安全空间 \~english 10 safety spaces
144
145 /// \~chinese 3个工具 \~english 3 tools
147
149 0.
150 }; ///< \~chinese 倾角 \~english inclination angle
151 float tool_azimuth{ 0. }; ///< \~chinese 方位角 \~english azimuth angle
152 std::vector<float> safety_home;
153
154 /// \~chinese 可配置IO的输入输出安全功能配置 \~english Configurable IO input
155 /// and output safety functions
165
175
176 int tp_3pe_for_handguide; ///< \~chinese 是否将示教器三档位开关作为拖动功能开关 \~english Whether to use the three-position switch of the teach pendant as a hand guiding function switch
177 int allow_manual_high_speed; ///< \~chinese 手动模式下允许高速运行 /~english Allow high-speed operation in manual mode
178};
179
180inline std::ostream &operator<<(std::ostream &os,
182{
183 // os << (int)vd;
184 return os;
185}
186
188{
189 /// \~chinese 是否为外部工具 \~english Whether it is an external tool
190 bool remote_tool{ false };
191
192 /// \~chinese 工件坐标系耦合的 \~english Coupled with the workpiece
193 /// coordinate system
194 std::string attach_frame{ "" };
195
196 /// \~english User coordinate system. \~chinese 用户坐标系
197 /// \~chinese 如果 robhold 为 false, 那 uframe 的数值是基于 world \~english
198 /// If robhold is false, the values of uframe are based on world.
199 /// \~chinese 否则,uframe 的数值是基于 flange \~english Otherwise, the
200 /// values of uframe are based on flange.
201 std::vector<double> user_coord{ std::vector<double>(6, 0) };
202
203 /// \~chinese 工件坐标系,基于 uframe \~english tool coordinate system,
204 /// based on uframe
205 std::vector<double> obj_coord{ std::vector<double>(6, 0) };
206};
207
208inline std::ostream &operator<<(std::ostream &os, WObjectData p)
209{
210 return os;
211}
212
213/// \~chinese 接口函数返回值定义 \~english Error codes definition
214///
215/// \~chinese 整数为警告,负数为错误,0为没有错误也没有警告 \~english whole
216/// number is warning, negative number is error, 0 is no error and no warning
217#define ENUM_AuboErrorCodes_DECLARES \
218 ENUM_ITEM(AUBO_OK, 0, "Success") \
219 ENUM_ITEM(AUBO_BAD_STATE, 1, "State error") \
220 ENUM_ITEM(AUBO_QUEUE_FULL, 2, "Planning queue full") \
221 ENUM_ITEM(AUBO_BUSY, 3, "The previous command is executing") \
222 ENUM_ITEM(AUBO_TIMEOUT, 4, "Timeout") \
223 ENUM_ITEM(AUBO_INVL_ARGUMENT, 5, "Invalid parameters") \
224 ENUM_ITEM(AUBO_NOT_IMPLETEMENT, 6, "Interface not implemented") \
225 ENUM_ITEM(AUBO_NO_ACCESS, 7, "Cannot access") \
226 ENUM_ITEM(AUBO_CONN_REFUSED, 8, "Connection refused") \
227 ENUM_ITEM(AUBO_CONN_RESET, 9, "Connection is reset") \
228 ENUM_ITEM(AUBO_INPROGRESS, 10, "Execution in progress") \
229 ENUM_ITEM(AUBO_EIO, 11, "Input/Output error") \
230 ENUM_ITEM(AUBO_NOBUFFS, 12, "") \
231 ENUM_ITEM(AUBO_REQUEST_IGNORE, 13, "Request was ignored") \
232 ENUM_ITEM(AUBO_ALGORITHM_PLAN_FAILED, 14, \
233 "Motion planning algorithm error") \
234 ENUM_ITEM(AUBO_VERSION_INCOMPAT, 15, "Interface version unmatch") \
235 ENUM_ITEM(AUBO_DIMENSION_ERR, 16, \
236 "Input parameter dimension is incorrect") \
237 ENUM_ITEM(AUBO_SINGULAR_ERR, 17, "Input configuration may be singular") \
238 ENUM_ITEM(AUBO_POS_BOUND_ERR, 18, \
239 "Input position boundary exceeds the limit range") \
240 ENUM_ITEM(AUBO_INIT_POS_ERR, 19, "Initial position input is unreasonable") \
241 ENUM_ITEM(AUBO_ELP_SETTING_ERR, 20, "Envelope body setting error") \
242 ENUM_ITEM(AUBO_TRAJ_GEN_FAIL, 21, "Trajectory generation failed") \
243 ENUM_ITEM(AUBO_TRAJ_SELF_COLLISION, 22, "Trajectory self collision") \
244 ENUM_ITEM( \
245 AUBO_IK_NO_CONVERGE, 23, \
246 "Inverse kinematics computation did not converge; computation failed") \
247 ENUM_ITEM(AUBO_IK_OUT_OF_RANGE, 24, \
248 "Inverse kinematics result out of robot range") \
249 ENUM_ITEM(AUBO_IK_CONFIG_DISMATCH, 25, \
250 "Inverse kinematics input configuration contains errors") \
251 ENUM_ITEM(AUBO_IK_JACOBIAN_FAILED, 26, \
252 "The calculation of the inverse Jacobian matrix failed") \
253 ENUM_ITEM(AUBO_IK_NO_SOLU, 27, \
254 "The target point has solutions, but it has exceeded the joint " \
255 "limit conditions") \
256 ENUM_ITEM(AUBO_IK_UNKOWN_ERROR, 28, "Inverse kinematics unkown error") \
257 ENUM_ITEM(AUBO_MOVE_IGNORED_SERVOMODE, 29, \
258 "Robot is in servo mode where movement is disabled") \
259 ENUM_ITEM(AUBO_MOVE_INVALID_SPEED_VALUE, 30, \
260 "Movement speed must be a valid positive value (cannot be zero or negative)") \
261 ENUM_ITEM(AUBO_MOVE_INVALID_ACCELERATION_VALUE, 31, \
262 "Movement acceleration must be a valid positive value (cannot be zero or negative)") \
263 ENUM_ITEM(AUBO_INST_QUEUED, 100, "Instruction pused into queue succeed") \
264 ENUM_ITEM(AUBO_INTERNAL_ERR, 101, "Internal error caused by alg .etc.") \
265 ENUM_ITEM(AUBO_BADSTATE_THREAD_DETACHED, 200, \
266 "Bad state: Operation not allowed on detached thread") \
267 ENUM_ITEM(AUBO_BADSTATE_THREAD_KILLED, 201, \
268 "Bad state: Operation not allowed on killed thread") \
269 ENUM_ITEM(AUBO_BADSTATE_TASK_NOT_FOUND, 202, \
270 "Bad state: Specified task id does not exist in the task queue")\
271 ENUM_ITEM(AUBO_BADSTATE_RTM_NOT_STARTED, 203, \
272 "Bad state: RuntimeMachine has not been started yet") \
273 ENUM_ITEM(AUBO_BADSTATE_RTM_NOT_STOPPED, 204, \
274 "Bad state: RuntimeMachine must be in Stopped state for this operation") \
275 ENUM_ITEM(AUBO_BADSTATE_RTM_NOT_PAUSED, 205, \
276 "Bad state: RuntimeMachine must be in Paused state for this operation") \
277 ENUM_ITEM(AUBO_BADSTATE_RTM_ABORTING, 206, "Bad state: RuntimeMachine is in aborting state") \
278 ENUM_ITEM(AUBO_BADSTATE_PSTOP, 207, "Bad state: Operation blocked by protective stop") \
279 ENUM_ITEM(AUBO_BADSTATE_ROBOT_ESTOP, 208, "Bad state: Robot emergency stop triggered") \
280 ENUM_ITEM(AUBO_BADSTATE_SYSTEM_ESTOP, 209, "Bad state: System emergency stop triggered") \
281 ENUM_ITEM(AUBO_BADSTATE_INVALID_ROBOT_MODE, 210, \
282 "Bad state: Robot is not in required operation mode") \
283 ENUM_ITEM(AUBO_BADSTATE_INVALID_SAFETY_MODE, 211, \
284 "Bad state: Robot is not in required safety mode") \
285 ENUM_ITEM(AUBO_BADSTATE_ROBOT_NOT_RUNNING, 212, \
286 "Bad state: Robot must be in Running mode for this operation") \
287 ENUM_ITEM(AUBO_BADSTATE_ROBOT_NOT_POWERED_OFF, 213, \
288 "Bad state: Robot must be in PowerOff mode for this operation") \
289 ENUM_ITEM(AUBO_BADSTATE_SERIAL_OPEN_FAILED, 214, "Bad state: Failed to open serial device") \
290 ENUM_ITEM(AUBO_BADSTATE_SERIAL_NOT_A_TERMINAL, 215, \
291 "Bad state: Specified device is not a terminal") \
292 ENUM_ITEM(AUBO_BADSTATE_SERIAL_CONFIG_FAILED, 216, \
293 "Bad state: Failed to configure serial port parameters") \
294 ENUM_ITEM(AUBO_BADSTATE_KINEMATICS_COMPENSATE_FAILED, 217, \
295 "Bad state: Failed to set kinematics compensation parameters") \
296 ENUM_ITEM(AUBO_BADSTATE_ROBOT_NOT_STEADY, 218, "Bad state: Robot is not in steady state") \
297 ENUM_ITEM(AUBO_BADSTATE_FREE_DRIVE_ACTIVE, 219, "Bad state: Free-drive mode is active") \
298 ENUM_ITEM(AUBO_BADSTATE_FORCE_CTRL_ACTIVE, 220, "Bad state: Force control mode is active") \
299 ENUM_ITEM(AUBO_BADSTATE_SIMULATION_MODE_ACTIVE, 221, \
300 "Bad state: Operation not allowed in simulation mode") \
301 ENUM_ITEM(AUBO_BADSTATE_MB_ERROR, 222, "Bad state: Modbus signal has error") \
302 ENUM_ITEM(AUBO_BADSTATE_MB_TIMEOUT, 223, "Bad state: Modbus signal timeout") \
303 ENUM_ITEM(AUBO_ERR_UNKOWN, 99999, "Unkown error occurred.")
304
305/**
306 * The RuntimeState enum
307 *
308 */
309#define ENUM_RuntimeState_DECLARES \
310 ENUM_ITEM(Running, 0, "正在运行中") \
311 ENUM_ITEM(Retracting, 1, "倒退") \
312 ENUM_ITEM(Pausing, 2, "暂停中") \
313 ENUM_ITEM(Paused, 3, "暂停状态") \
314 ENUM_ITEM(Stepping, 4, "单步执行中") \
315 ENUM_ITEM(Stopping, 5, "受控停止中(保持原有轨迹)") \
316 ENUM_ITEM(Stopped, 6, "已停止") \
317 ENUM_ITEM(Aborting, 7, "停止(最大速度关节运动停机)")
318
319/**
320 * \chinese
321 * @brief The RobotModeType enum
322 *
323 * 硬件强相关
324 * \endchinese
325 *
326 * \english
327 * @brief The RobotModeType enum
328 *
329 * Hardware related
330 * \endenglish
331 */
332#define ENUM_RobotModeType_DECLARES \
333 ENUM_ITEM(NoController, -1, "提供给示教器使用的, 如果aubo_control进程崩溃则会显示为NoController") \
334 ENUM_ITEM(Disconnected, 0, "没有连接到机械臂本体(控制器与接口板断开连接或是 EtherCAT 等总线断开)") \
335 ENUM_ITEM(ConfirmSafety, 1, "正在进行安全配置, 断电状态下进行") \
336 ENUM_ITEM(Booting, 2, "机械臂本体正在上电初始化") \
337 ENUM_ITEM(PowerOff, 3, "机械臂本体处于断电状态") \
338 ENUM_ITEM(PowerOn, 4, "机械臂本体上电成功, 刹车暂未松开(抱死), 关节初始状态未获取") \
339 ENUM_ITEM(Idle, 5, "机械臂上电成功, 刹车暂未松开(抱死), 电机不通电, 关节初始状态获取完成") \
340 ENUM_ITEM(BrakeReleasing, 6, "机械臂上电成功, 刹车正在松开") \
341 ENUM_ITEM(BackDrive, 7, "反向驱动:刹车松开, 电机不通电") \
342 ENUM_ITEM(Running, 8, "机械臂刹车松开, 运行模式, 控制权由硬件移交给软件") \
343 ENUM_ITEM(Maintaince, 9, "维护模式: 包括固件升级、参数写入等") \
344 ENUM_ITEM(Error, 10, "") \
345 ENUM_ITEM(PowerOffing, 11, "机械臂本体处于断电过程中")
346
347#define ENUM_SafetyModeType_DECLARES \
348 ENUM_ITEM(Undefined, 0, "安全状态待定") \
349 ENUM_ITEM(Normal, 1, "正常运行模式") \
350 ENUM_ITEM(ReducedMode, 2, "缩减运行模式") \
351 ENUM_ITEM(Recovery, 3, "启动时如果在安全限制之外, 机器人将进入recovery模式") \
352 ENUM_ITEM(Violation, 4, "超出安全限制(根据安全配置, 例如速度超限等)") \
353 ENUM_ITEM(ProtectiveStop, 5, "软件触发的停机(保持轨迹, 不抱闸, 不断电)") \
354 ENUM_ITEM(SafeguardStop, 6, "IO触发的防护停机(不保持轨迹, 抱闸, 不断电)") \
355 ENUM_ITEM(SystemEmergencyStop,7, "系统急停:急停信号由外部输入(可配置输入), 不对外输出急停信号") \
356 ENUM_ITEM(RobotEmergencyStop, 8, "机器人急停:控制柜急停输入或者示教器急停按键触发, 对外输出急停信号") \
357 ENUM_ITEM(Fault, 9, "机械臂硬件故障或者系统故障")
358 //ValidateJointId
359
360/**
361 * \chinese
362 * 根据ISO 10218-1:2011(E) 5.7节
363 * Automatic: In automatic mode, the robot shall execute the task programme and
364 * the safeguarding measures shall be functioning. Automatic operation shall be
365 * prevented if any stop condition is detected. Switching from this mode shall
366 * result in a stop.
367 * \endchinese
368 * \english
369 * Based on ISO 10218-1:2011(E) Section 5.7
370 * Automatic: In automatic mode, the robot shall execute the task programme and
371 * the safeguarding measures shall be functioning. Automatic operation shall be
372 * prevented if any stop condition is detected. Switching from this mode shall
373 * result in a stop.
374 * \endenglish
375 */
376#define ENUM_OperationalModeType_DECLARES \
377 ENUM_ITEM(Disabled, 0, "禁用模式: 不使用 Operational Mode") \
378 ENUM_ITEM(Automatic, 1, "自动模式: 机器人正常工作模式, 运行速度不会被限制 (auto mode: robot normal operation, speed will not be limited)") \
379 ENUM_ITEM(Manual, 2, "手动模式: 机器人编程示教模式(T1), 机器人运行速度将会被限制或者机器人程序校验模式(T2) (manual mode: robot programming teaching mode (T1), robot running speed will be limited or robot program verification mode (T2)") \
380
381/**
382 * \~chinese 机器人的控制模式, 最终的控制对象 \~english Robot control mode, the final control object
383 */
384#define ENUM_RobotControlModeType_DECLARES \
385 ENUM_ITEM(Unknown, 0, "未知的控制模式 (unknown control mode)") \
386 ENUM_ITEM(Position, 1, "位置控制 movej (position control)") \
387 ENUM_ITEM(Speed, 2, "速度控制 speedj/speedl (speed control)") \
388 ENUM_ITEM(Servo, 3, "位置控制 servoj (position control)") \
389 ENUM_ITEM(Freedrive, 4, "拖动示教 freedrive_mode") \
390 ENUM_ITEM(Force, 5, "末端力控 force_mode") \
391 ENUM_ITEM(Torque, 6, "关节力矩控制 (joint torque control)") \
392 ENUM_ITEM(Collision, 7, "碰撞模式 (collision mode)") \
393
394#define ENUM_JointServoModeType_DECLARES \
395 ENUM_ITEM(Unknown, -1, "未知") \
396 ENUM_ITEM(Open, 0, "开环模式 (open loop mode)") \
397 ENUM_ITEM(Current, 1, "电流伺服模式 (current servo mode)") \
398 ENUM_ITEM(Velocity, 2, "速度伺服模式 (speed servo mode)") \
399 ENUM_ITEM(Position, 3, "位置伺服模式 (position servo mode)") \
400 ENUM_ITEM(Torque, 4, "力矩伺服模式 (torque servo mode)") \
401
402#define ENUM_JointStateType_DECLARES \
403 ENUM_ITEM(Poweroff, 0, "节点未连接到接口板或者已经断电 (node not conected to interface board or already powered off)") \
404 ENUM_ITEM(Idle, 2, "节点空闲 (node idle)") \
405 ENUM_ITEM(Fault, 3, "节点错误, 节点停止伺服运动, 刹车抱死 (node error, node stopped servo move, brake engaged)") \
406 ENUM_ITEM(Running, 4, "节点伺服 (node servo)") \
407 ENUM_ITEM(Bootload, 5, "节点bootloader状态, 暂停一切通讯 (node bootloader state, pause all communication)") \
408
409#define ENUM_StandardInputAction_DECLARES \
410 ENUM_ITEM(Default, 0, "无触发") \
411 ENUM_ITEM(Handguide, 1, "拖动示教,高电平触发") \
412 ENUM_ITEM(GoHome, 2, "运动到工程初始位姿,高电平触发") \
413 ENUM_ITEM(StartProgram, 3, "开始工程,上升沿触发") \
414 ENUM_ITEM(StopProgram, 4, "停止工程,上升沿触发") \
415 ENUM_ITEM(PauseProgram, 5, "暂停工程,上升沿触发") \
416 ENUM_ITEM(PopupDismiss, 6, "消除弹窗,上升沿触发") \
417 ENUM_ITEM(PowerOn, 7, "机器人上电/松刹车,上升沿触发") \
418 ENUM_ITEM(PowerOff, 8, "机器人抱死刹车/断电,上升沿触发") \
419 ENUM_ITEM(ResumeProgram, 9, "恢复工程,上升沿触发") \
420 ENUM_ITEM(SlowDown1, 10, "机器人减速触发1,高电平触发") \
421 ENUM_ITEM(SlowDown2, 11, "机器人减速触发2,高电平触发") \
422 ENUM_ITEM(SafeStop, 12, "安全停止,高电平触发") \
423 ENUM_ITEM(RunningGuard, 13, "信号,高电平有效") \
424 ENUM_ITEM(MoveToFirstPoint, 14, "运动到工程初始位姿,高电平触发") \
425 ENUM_ITEM(xSlowDown1, 15, "机器人减速触发1,低电平触发") \
426 ENUM_ITEM(xSlowDown2, 16, "机器人减速触发2,低电平触发") \
427 ENUM_ITEM(ConveyorTrack, 17, "传送带检测到物品触发,高电平触发") \
428 ENUM_ITEM(xConveyorTrack, 18, "传送带检测到物品触发,低电平触发") \
429 ENUM_ITEM(UnlockProtectiveStop, 19, "解除保护性停止,上升沿触发") \
430 ENUM_ITEM(ArbitraryResumeProgram , 20, "恢复工程,不检查当前位置和暂停点之间的距离,上升沿触发")
431
432#define ENUM_StandardOutputRunState_DECLARES \
433 ENUM_ITEM(None, 0, "标准输出状态未定义") \
434 ENUM_ITEM(StopLow, 1, "低电平指示工程停止") \
435 ENUM_ITEM(StopHigh, 2, "高电平指示机器人停止") \
436 ENUM_ITEM(RunningHigh, 3, "指示工程正在运行") \
437 ENUM_ITEM(PausedHigh, 4, "指示工程已经暂停") \
438 ENUM_ITEM(AtHome, 5, "高电平指示机器人正在拖动") \
439 ENUM_ITEM(Handguiding, 6, "高电平指示机器人正在拖动") \
440 ENUM_ITEM(PowerOn, 7, "高电平指示机器人已经上电") \
441 ENUM_ITEM(RobotEmergencyStop, 8, "高电平指示机器人急停按下") \
442 ENUM_ITEM(SystemEmergencyStop, 9, "高电平指示外部输入系统急停按下") \
443 ENUM_ITEM(InternalEmergencyStop, 8, "高电平指示机器人急停按下") \
444 ENUM_ITEM(ExternalEmergencyStop, 9, "高电平指示外部输入系统急停按下") \
445 ENUM_ITEM(SystemError, 10, "系统错误,包括故障、超限、急停、安全停止、防护停止 ") \
446 ENUM_ITEM(NotSystemError, 11, "无系统错误,包括普通模式、缩减模式和恢复模式 ") \
447 ENUM_ITEM(RobotOperable, 12, "机器人可操作,机器人上电且松刹车了 ") \
448 ENUM_ITEM(OperationalMode, 13, "高电平指示自动模式,低电平指示手动模式") \
449 ENUM_ITEM(SafeguardStop, 14, "高电平指示处于安全停止状态") \
450 ENUM_ITEM(ProtectiveStop, 15, "高电平指示处于防护停止状态") \
451 ENUM_ITEM(ProgramAborted, 16, "高电平指示工程意外停止")
452
453#define ENUM_SafetyInputAction_DECLARES \
454 ENUM_ITEM(Unassigned, 0, "安全输入未分配动作") \
455 ENUM_ITEM(EmergencyStop, 1, "安全输入触发急停") \
456 ENUM_ITEM(SafeguardStop, 2, "安全输入触发防护停止, 边沿触发") \
457 ENUM_ITEM(SafeguardReset, 3, "安全输入触发防护重置, 边沿触发") \
458 ENUM_ITEM(ThreePositionSwitch, 4, "3档位使能开关") \
459 ENUM_ITEM(OperationalMode, 5, "切换自动模式和手动模式") \
460 ENUM_ITEM(HandGuide, 6, "拖动示教") \
461 ENUM_ITEM(ReducedMode, 7, "安全参数切换1(缩减模式),序号越低优先级越高,三路输出都无效时,选用第0组安全参数") \
462 ENUM_ITEM(AutomaticModeSafeguardStop, 8, "自动模式下防护停机输入(需要配置三档位使能设备)") \
463 ENUM_ITEM(AutomaticModeSafeguardReset, 9, "自动模式下上升沿触发防护重置(需要配置三档位使能设备)")
464
465#define ENUM_SafetyOutputRunState_DECLARES \
466 ENUM_ITEM(Unassigned, 0, "安全输出未定义") \
467 ENUM_ITEM(SystemEmergencyStop, 1, "输出高当有机器人急停输入或者急停按键被按下") \
468 ENUM_ITEM(NotSystemEmergencyStop, 2, "输出低当有机器人急停输入或者急停按键被按下") \
469 ENUM_ITEM(RobotMoving, 3, "输出高当有关节运动速度超过 0.1rad/s") \
470 ENUM_ITEM(RobotNotMoving, 4, "输出高当所有的关节运动速度不超过 0.1rad/s") \
471 ENUM_ITEM(ReducedMode, 5, "输出高当机器人处于缩减模式") \
472 ENUM_ITEM(NotReducedMode, 6, "输出高当机器人不处于缩减模式") \
473 ENUM_ITEM(SafeHome, 7, "输出高当机器人已经处于安全Home位姿") \
474 ENUM_ITEM(RobotNotStopping, 8, "输出低当机器人正在急停或者安全停止中")
475
476#define ENUM_PayloadIdentifyMoveAxis_DECLARES \
477 ENUM_ITEM(Joint_2_6, 0,"第2和6关节运动") \
478 ENUM_ITEM(Joint_3_6, 1,"第3和6关节运动") \
479 ENUM_ITEM(Joint_4_6, 2,"第4和6关节运动") \
480 ENUM_ITEM(Joint_4_5_6, 3,"第4、5、6关节运动") \
481
482#define ENUM_EnvelopingShape_DECLARES \
483 ENUM_ITEM(Cube, 1,"立方体") \
484 ENUM_ITEM(Column, 2,"柱状体") \
485 ENUM_ITEM(Stl, 3,"以STL文件的形式描述负载碰撞集合体")
486
487#define ENUM_TaskFrameType_DECLARES \
488 ENUM_ITEM(NONE, 0,"") \
489 ENUM_ITEM(POINT_FORCE, 1, "力控坐标系发生变换, 使得力控参考坐标系的y轴沿着机器人TCP指向力控所选特征的原点, x和z轴取决于所选特征的原始方向" \
490 "力控坐标系发生变换, 使得力控参考坐标系的y轴沿着机器人TCP指向力控所选特征的原点, x和z轴取决于所选特征的原始方向" \
491 "机器人TCP与所选特征的起点之间的距离至少为10mm" \
492 "优先选择X轴, 为所选特征的X轴在力控坐标系Y轴垂直平面上的投影, 如果所选特征的X轴与力控坐标系的Y轴平行, " \
493 "通过类似方法确定力控坐标系Z轴, Y-X或者Y-Z轴确定之后, 通过右手法则确定剩下的轴") \
494 ENUM_ITEM(FRAME_FORCE, 2,"力控坐标系不发生变换 SIMPLE_FORC") \
495 ENUM_ITEM(MOTION_FORCE, 3,"力控坐标系发生变换, 使得力控参考坐标系的x轴为机器人TCP速度在所选特征x-y平面上的投影y轴将垂直于机械臂运动, 并在所选特征的x-y平面内")\
496 ENUM_ITEM(TOOL_FORCE, 4,"以工具末端坐标系作为力控参考坐标系")
497
498#ifdef ERROR
499#undef ERROR
500#endif
501
502#define ENUM_TraceLevel_DECLARES \
503 ENUM_ITEM(FATAL, 0, "") \
504 ENUM_ITEM(ERROR, 1, "") \
505 ENUM_ITEM(WARNING, 2, "") \
506 ENUM_ITEM(INFO, 3, "") \
507 ENUM_ITEM(DEBUG, 4, "")
508
509#define ENUM_AxisModeType_DECLARES \
510 ENUM_ITEM(NoController, -1, "提供给示教器使用的, 如果aubo_control进程崩溃则会显示为NoController") \
511 ENUM_ITEM(Disconnected, 0, "未连接") \
512 ENUM_ITEM(PowerOff, 1, "断电") \
513 ENUM_ITEM(BrakeReleasing, 2, "刹车松开中") \
514 ENUM_ITEM(Idle, 3, "空闲") \
515 ENUM_ITEM(Running, 4, "运行中") \
516 ENUM_ITEM(Fault, 5, "错误状态")
517
518#define ENUM_SafeguedStopType_DECLARES \
519 ENUM_ITEM(None, 0, "无安全停止") \
520 ENUM_ITEM(SafeguedStopIOInput, 1, "安全停止(IO输入)") \
521 ENUM_ITEM(SafeguedStop3PE, 2, "安全停止(三态开关)") \
522 ENUM_ITEM(SafeguedStopOperational, 3, "安全停止(操作模式)")
523
524#define ENUM_RobotEmergencyStopType_DECLARES \
525 ENUM_ITEM(RobotEmergencyStopNone, 0, "无紧急停止") \
526 ENUM_ITEM(RobotEmergencyStopControlBox, 1, "紧急停止(控制柜急停)") \
527 ENUM_ITEM(RobotEmergencyStopTeachPendant, 2, "紧急停止(示教器急停)") \
528 ENUM_ITEM(RobotEmergencyStopHandle, 3, "紧急停止(手柄急停)") \
529 ENUM_ITEM(RobotEmergencyStopEI, 4, "紧急停止(固定IO急停)")
530
531#define ENUM_ITEM(c, n, ...) c = n,
536
541
546
551
552/**
553 * \~chinese 安全状态: \~english Safety Mode
554 *
555 */
560
561/**
562 * \~chinese 操作模式 \~english Operational Mode
563 */
568
569/**
570 * \~chinese 机器人控制模式 \~english Robot Control Mode
571 */
576
577/**
578 * \~chinese 关节伺服模式 \~english Joint Servo Mode
579 */
584
585/**
586 * \~chinese 关节状态 \~english Joint State
587 */
592
593/**
594 * \~chinese 标准输出运行状态 \~english Standard Output Run State
595 */
600
601/**
602 * @brief The StandardInputAction enum
603 */
608
613
618
623
628
633
638
643
648#undef ENUM_ITEM
649
650#define DECL_TO_STRING_FUNC(ENUM) \
651 inline std::string toString(ENUM v) \
652 { \
653 using T = ENUM; \
654 std::string name = #ENUM "."; \
655 ENUM_##ENUM##_DECLARES \
656 \
657 return #ENUM ".Unkown"; \
658 } \
659 inline std::ostream &operator<<(std::ostream &os, ENUM v) \
660 { \
661 os << toString(v); \
662 return os; \
663 }
664
665#define ENUM_ITEM(c, n, ...) \
666 if (v == T::c) { \
667 return name + #c; \
668 }
669
684
685#undef ENUM_ITEM
686
694
695enum class RefFrameType
696{
697 None, ///
698 Tool, ///< \~chinese 工具坐标系 \~english Tool coordinate system
699 Path, ///< \~chinese 轨迹坐标系 \~english Trajectory coordinate system
700 Base ///< \~chinese 基坐标系 \~english Base coordinate system
701};
702
703/// \~chinese 圆周运动参数定义 \~english Circular motion parameters definition
705{
706 std::vector<double> pose_via; ///< \~chinese 圆周运动途中点的位姿 \~english Pose of the intermediate point in circular motion
707 std::vector<double> pose_to; ///< \~chinese 圆周运动结束点的位姿 \~english Pose of the end point in circular motion
708 double a; ///< \~chinese 加速度, 单位: m/s^2 \~english Acceleration, unit: m/s^2
709 double v; ///< \~chinese 速度,单位: m/s \~english Speed, unit: m/s
710 double blend_radius; ///< \~chinese 交融半径,单位: m \~english Blending radius, unit: m
711 double duration; ///< \~chinese 运行时间,单位: s \~english Running time, unit: s
712 double helix;
713 double spiral;
714 double direction;
715 int loop_times; ///< \~chinese 暂不支持 \~english Currently not supported
716};
717
718inline std::ostream &operator<<(std::ostream &os, CircleParameters p)
719{
720 return os;
721}
722
724{
725 std::vector<double> frame; ///< \~chinese 参考点,螺旋线的中心点和参考坐标系 \~english Reference point, the center point of the spiral and the reference coordinate system
726 int plane; ///< \~chinese 参考平面选择 0-XY 1-YZ 2-ZX \~english Reference plane selection 0-XY 1-YZ 2-ZX
727 double angle; ///< \~chinese 转动的角度,如果为正数,机器人逆时针旋转 \~english The angle of rotation, if positive, the robot rotates counterclockwise
728 double spiral; ///< \~chinese 正数外扩 \~english Positive outward
729 double helix; ///< \~chinese 正数上升 \~english Positive upward
730};
731
732inline std::ostream &operator<<(std::ostream &os, SpiralParameters p)
733{
734 return os;
735}
736
738{
739 EnvelopingShape shape; // \~chinese 包络体形状 \~english Enveloping shape
740 std::vector<double> ep_args; // \~chinese 包络体组合,shape为None或Stl时无需对ep_args赋值; \~english Enveloping combination, when shape is None or Stl, no need to assign value to ep_args.
741 // \~chinese shape为Cube时ep_args有9个元素,分别为xmin,xmax,ymin,ymax,zmin,zmax,rx,ry,rz; \~english When shape is Cube, ep_args has 9 elements, which are xmin, xmax, ymin, ymax, zmin, zmax, rx, ry, rz;
742 // \~chinese shape为Column时ep_args有5个元素,分别为radius,height,rx,ry,rz; \~english When shape is Column, ep_args has 5 elements, which are radius, height, rx, ry, rz;
743 std::string stl_path; // \~chinese stl的路径(绝对路径),stl文件需为二进制文件, \~english Path of the stl file (absolute path), the stl file must be a binary file, \~chinese shape设置为Stl时,此项生效 \~english When shape is set to Stl, this item takes effect
744};
745
746inline std::ostream &operator<<(std::ostream &os, Enveloping p)
747{
748 return os;
749}
750
751/// \~chinese 用于负载辨识的轨迹配置 \~english Trajectory configuration for
752/// payload identification
754{
755 std::vector<Enveloping> envelopings; // \~chinese 包络体组合 \~english Enveloping combination
756 PayloadIdentifyMoveAxis move_axis; // \~chinese 运动的轴(ID), 下标从0开始 \~english Axis of movement (ID), index starts from 0
757 std::vector<double> init_joint; // \~chinese 关节初始位置 \~english Initial joint positions
758 std::vector<double> upper_joint_bound; // \~chinese 运动轴上限 \~english Upper joint limits
759 std::vector<double> lower_joint_bound; // \~chinese 运动轴下限 \~english Lower joint limits
760 std::vector<double> max_velocity; // \~chinese 关节运动的最大速度,默认值为 3.0 \~english Maximum joint velocities, default value is 3.0
761 std::vector<double> max_acceleration; // \~chinese 关节运动的最大加速度,默认值为 5.0 \~english Maximum joint accelerations, default value is 5.0
762};
763
764inline std::ostream &operator<<(std::ostream &os, TrajConfig p)
765{
766 return os;
767}
768
769// result with error code
770using ResultWithErrno = std::tuple<std::vector<double>, int>;
771using ResultWithErrno1 = std::tuple<std::vector<std::vector<double>>, int>;
772using ResultWithErrno2 = std::tuple<std::vector<std::string>, int>;
773
774// mass, cog, aom, inertia
775using Payload = std::tuple<double, std::vector<double>, std::vector<double>,
776 std::vector<double>>;
777
778// force_offset, com, mass, angle
780 std::tuple<std::vector<double>, std::vector<double>, double,
781 std::vector<double>>;
782
783// force_offset, com, mass, angle error
785 std::tuple<std::vector<double>, std::vector<double>, double,
786 std::vector<double>, double>;
787
788// \~chinese 动力学模型m,d,k \~english Dynamics model m, d, k
790 std::tuple<std::vector<double>, std::vector<double>, std::vector<double>>;
791
792// double xmin;
793// double xmax;
794// double ymin;
795// double ymax;
796// double zmin;
797// double zmax;
798using Box = std::vector<double>;
799
800// double xcbottom;
801// double ycbottom;
802// double zcbottom;
803// double height;
804// double radius;
805using Cylinder = std::vector<double>;
806
807// double xc;
808// double yc;
809// double radius;
810using Sphere = std::vector<double>;
811
813{
814 uint64_t timestamp; ///< \~chinese 时间戳,即系统时间 \~english Timestamp,
815 ///< i.e., system time
816 TraceLevel level; ///< \~chinese 日志等级 \~english Log level
817 int code; ///< \~chinese 错误码 \~english Error code
818 std::string
819 source; ///< \~chinese 发送消息的机器人别名 alias \~english Alias of the
820 ///< robot sending the message
821 ///< \~chinese 可在 /root/arcs_ws/config/aubo_control.conf
822 ///< \~english Can be found in
823 ///< /root/arcs_ws/config/aubo_control.conf
824 ///< \~chinese 配置文件中查到机器人的alias \~english The robot's
825 ///< alias can be found in the configuration file
826 ///< /root/arcs_ws/config/aubo_control.conf
827 std::vector<std::string> args; ///< \~chinese 机器人参数 \~english Robot parameters
828};
829using RobotMsgVector = std::vector<RobotMsg>;
830
832{
833 std::string name;
836 double position;
837 double velocity;
838 double force;
839 double angle;
841 double torque;
844 double voltage;
846};
847using GripperStatusVector = std::vector<GripperStatus>;
848
849/// \~chinese RTDE菜单 \~english RTDE menu
851{
852 bool to_server; ///< \~chinese 输入/输出 \~english Input/Output
853 int chanel; ///< \~chinese 通道 \~english Channel
854 double frequency; ///< \~chinese 更新频率 \~english Update frequency
855 int trigger; ///< \~chinese 触发方式(该功能暂未实现): 0 - 周期; 1 - 变化
856 ///< \~english Trigger method (this feature is not yet
857 ///< implemented): 0 - Periodic; 1 - Change
858 std::vector<std::string> segments; ///< \~chinese 字段列表 \~english segment list
859};
860
861/// \~chinese 异常类型 \~english Error type
863{
864 parse_error = -32700, ///< \~chinese 解析错误 \~english Parse error
865 invalid_request = -32600, ///< \~chinese 无效请求 \~english Invalid request
866 method_not_found = -32601, ///< \~chinese 方法未找到 \~english Method not found
867 invalid_params = -32602, ///< \~chinese 无效参数 \~english Invalid parameters
868 internal_error = -32603, ///< \~chinese 内部错误 \~english Internal error
869 server_error, ///< \~chinese 服务器错误 \~english Server error
870 invalid ///< \~chinese 无效 \~english Invalid
871};
872
873/// \~chinese 异常码 \~english Exception code
875{
876 EC_DISCONNECTED = -1, ///< \~chinese 断开连接 \~english Disconnected
877 EC_NOT_LOGINED = -2, ///< \~chinese 未登录 \~english Not logged in
878 EC_INVAL_SOCKET = -3, ///< \~chinese 无效套接字 \~english Invalid socket
879 EC_REQUEST_BUSY = -4, ///< \~chinese 请求繁忙 \~english Request busy
880 EC_SEND_FAILED = -5, ///< \~chinese 发送失败 \~english Send failed
881 EC_RECV_TIMEOUT = -6, ///< \~chinese 接收超时 \~english Receive timeout
882 EC_RECV_ERROR = -7, ///< \~chinese 接收错误 \~english Receive error
883 EC_PARSE_ERROR = -8, ///< \~chinese 解析错误 \~english Parse error
884 EC_INVALID_REQUEST = -9, ///< \~chinese 无效请求 \~english Invalid request
885 EC_METHOD_NOT_FOUND = -10, ///< \~chinese 方法未找到 \~english Method not found
886 EC_INVALID_PARAMS = -11, ///< \~chinese 无效参数 \~english Invalid parameters
887 EC_INTERNAL_ERROR = -12, ///< \~chinese 内部错误 \~english Internal error
888 EC_SERVER_ERROR = -13, ///< \~chinese 服务器错误 \~english Server error
889 EC_INVALID = -14 ///< \~chinese 无效 \~english Invalid
890};
891
892/// \~chinese 自定义异常类 AuboException \~english Custom exception class
893/// AuboException
894class AuboException : public std::exception
895{
896public:
897 AuboException(int code, const std::string &prefix,
898 const std::string &message) noexcept
899 : code_(code), message_(prefix + "-" + message)
900 {
901 }
902
903 AuboException(int code, const std::string &message) noexcept
904 : code_(code), message_(message)
905 {
906 }
907
909 {
910 if (code_ >= -32603 && code_ <= -32600) {
911 return static_cast<error_type>(code_);
912 } else if (code_ >= -32099 && code_ <= -32000) {
913 return server_error;
914 } else if (code_ == -32700) {
915 return parse_error;
916 }
917 return invalid;
918 }
919
920 int code() const { return code_; }
921 const char *what() const noexcept override { return message_.c_str(); }
922
923private:
924 int code_; ///< \~chinese 异常码 \~english Exception code
925 std::string message_; ///< \~chinese 异常消息 \~chinese Exception message
926};
927
928inline const char *returnValue2Str(int retval)
929{
930 static const char *retval_str[] = {
931#define ENUM_ITEM(n, v, s) s,
933#undef ENUM_ITEM
934 };
935
936 enum arcs_index
937 {
938#define ENUM_ITEM(n, v, s) n##_INDEX,
940#undef ENUM_ITEM
941 };
942
943 int index = -1;
944
945#define ENUM_ITEM(n, v, s) \
946 if (abs(retval) == v) \
947 index = n##_INDEX;
949#undef ENUM_ITEM
950
951 if (index == -1)
952 {
953 index = AUBO_ERR_UNKOWN_INDEX;
954 }
955
956 return retval_str[(unsigned)index];
957}
958
959} // namespace common_interface
960} // namespace arcs
961#endif
962
963// clang-format on
964
965#if defined ENABLE_JSON_TYPES
966#include "bindings/jsonrpc/json_types.h"
967#endif
AuboException(int code, const std::string &prefix, const std::string &message) noexcept
Definition type_def.h:897
const char * what() const noexcept override
Definition type_def.h:921
AuboException(int code, const std::string &message) noexcept
Definition type_def.h:903
std::tuple< std::vector< std::string >, int > ResultWithErrno2
Definition type_def.h:772
std::tuple< std::vector< std::vector< double > >, int > ResultWithErrno1
Definition type_def.h:771
std::ostream & operator<<(std::ostream &os, const RobotSafetyParameterRange &vd)
Definition type_def.h:180
std::array< float, 3 > Vector3f
Definition type_def.h:33
JointServoModeType
Joint Servo Mode.
Definition type_def.h:581
std::tuple< std::vector< double >, std::vector< double >, std::vector< double > > DynamicsModel
Definition type_def.h:789
std::tuple< double, std::vector< double >, std::vector< double >, std::vector< double > > Payload
Definition type_def.h:775
RobotControlModeType
Robot Control Mode.
Definition type_def.h:573
std::array< double, 3 > Vector3d
Definition type_def.h:31
error_type
Error type.
Definition type_def.h:863
@ parse_error
Parse error.
Definition type_def.h:864
@ method_not_found
Method not found.
Definition type_def.h:866
@ invalid_params
Invalid parameters.
Definition type_def.h:867
@ invalid_request
Invalid request.
Definition type_def.h:865
@ internal_error
Internal error.
Definition type_def.h:868
@ server_error
Server error.
Definition type_def.h:869
StandardInputAction
The StandardInputAction enum.
Definition type_def.h:605
std::tuple< std::vector< double >, std::vector< double >, double, std::vector< double >, double > ForceSensorCalibResultWithError
Definition type_def.h:784
StandardOutputRunState
Standard Output Run State.
Definition type_def.h:597
JointStateType
Joint State.
Definition type_def.h:589
std::array< float, 6 > Vector6f
Definition type_def.h:35
const char * returnValue2Str(int retval)
Definition type_def.h:928
ExceptionCode
Exception code.
Definition type_def.h:875
@ EC_INVALID_REQUEST
Invalid request.
Definition type_def.h:884
@ EC_DISCONNECTED
Disconnected.
Definition type_def.h:876
@ EC_PARSE_ERROR
Parse error.
Definition type_def.h:883
@ EC_SERVER_ERROR
Server error.
Definition type_def.h:888
@ EC_SEND_FAILED
Send failed.
Definition type_def.h:880
@ EC_INTERNAL_ERROR
Internal error.
Definition type_def.h:887
@ EC_NOT_LOGINED
Not logged in.
Definition type_def.h:877
@ EC_INVAL_SOCKET
Invalid socket.
Definition type_def.h:878
@ EC_RECV_ERROR
Receive error.
Definition type_def.h:882
@ EC_RECV_TIMEOUT
Receive timeout.
Definition type_def.h:881
@ EC_METHOD_NOT_FOUND
Method not found.
Definition type_def.h:885
@ EC_INVALID_PARAMS
Invalid parameters.
Definition type_def.h:886
@ EC_REQUEST_BUSY
Request busy.
Definition type_def.h:879
std::vector< double > Box
Definition type_def.h:798
std::array< float, 4 > Vector4f
Definition type_def.h:34
OperationalModeType
Operational Mode.
Definition type_def.h:565
SafetyModeType
Safety Mode.
Definition type_def.h:557
std::vector< double > Sphere
Definition type_def.h:810
std::array< double, 4 > Vector4d
Definition type_def.h:32
std::vector< RobotMsg > RobotMsgVector
Definition type_def.h:829
std::tuple< std::vector< double >, std::vector< double >, double, std::vector< double > > ForceSensorCalibResult
Definition type_def.h:779
std::tuple< std::vector< double >, int > ResultWithErrno
Definition type_def.h:770
@ ENUM_PayloadIdentifyMoveAxis_DECLARES
Definition type_def.h:631
@ Base
Base coordinate system.
Definition type_def.h:700
@ Path
Trajectory coordinate system.
Definition type_def.h:699
@ Tool
Tool coordinate system.
Definition type_def.h:698
std::vector< GripperStatus > GripperStatusVector
Definition type_def.h:847
std::vector< double > Cylinder
Definition type_def.h:805
Circular motion parameters definition.
Definition type_def.h:705
double duration
Running time, unit: s.
Definition type_def.h:711
double blend_radius
Blending radius, unit: m.
Definition type_def.h:710
int loop_times
Currently not supported.
Definition type_def.h:715
std::vector< double > pose_via
Pose of the intermediate point in circular motion.
Definition type_def.h:706
std::vector< double > pose_to
Pose of the end point in circular motion.
Definition type_def.h:707
double a
Acceleration, unit: m/s^2.
Definition type_def.h:708
std::vector< double > ep_args
Definition type_def.h:740
TraceLevel level
Log level.
Definition type_def.h:816
std::string source
Alias of the robot sending the message Can be found in /root/arcs_ws/config/aubo_control....
Definition type_def.h:819
uint64_t timestamp
Timestamp, i.e., system time.
Definition type_def.h:814
std::vector< std::string > args
Robot parameters.
Definition type_def.h:827
float stop_distance
stop distance in meters
Definition type_def.h:114
float power
sum of joint torques times joint angular speeds
Definition type_def.h:111
struct arcs::common_interface::RobotSafetyParameterRange::@070151221302047214074170061266121161014174036015 trigger_planes[SAFETY_PLANES_NUM]
8 trigger planes
int tp_3pe_for_handguide
Whether to use the three-position switch of the teach pendant as a hand guiding function switch.
Definition type_def.h:176
struct arcs::common_interface::RobotSafetyParameterRange::@200304151316333337122036273315265075056247006375 cubic[SAFETY_CUBIC_NUM]
10 safety spaces
Vector6f orig
origin of the cubic (x,y,z,rx,ry,rz)
Definition type_def.h:140
Vector3f size
size of the cubic (x,y,z)
Definition type_def.h:141
Vector4f tools[TOOL_CONFIGURATION_NUM]
3 tools
Definition type_def.h:146
uint32_t safety_input_emergency_stop
Configurable IO input and output safety functions.
Definition type_def.h:156
int restrict_elbow[SAFETY_PLANES_NUM]
x,y,z,displacement
Definition type_def.h:128
float reduced_entry_time
maximum time to enter reduced mode
Definition type_def.h:115
float stop_time
stop time in milliseconds
Definition type_def.h:113
struct arcs::common_interface::RobotSafetyParameterRange::@044217061130130367010137157106214062263204322065 params[SAFETY_PARAM_SELECT_NUM]
At most 2 sets of parameters can be saved, default is the 0th set.
float reduced_entry_distance
maximum distance to enter reduced mode (can be triggered by safety planes)
Definition type_def.h:116
int trigger
Trigger method (this feature is not yet implemented): 0 - Periodic; 1 - Change.
Definition type_def.h:855
std::vector< std::string > segments
segment list
Definition type_def.h:858
double frequency
Update frequency.
Definition type_def.h:854
double angle
The angle of rotation, if positive, the robot rotates counterclockwise.
Definition type_def.h:727
int plane
Reference plane selection 0-XY 1-YZ 2-ZX.
Definition type_def.h:726
std::vector< double > frame
Reference point, the center point of the spiral and the reference coordinate system.
Definition type_def.h:725
Trajectory configuration for payload identification.
Definition type_def.h:754
std::vector< double > upper_joint_bound
Definition type_def.h:758
std::vector< double > max_acceleration
Definition type_def.h:761
std::vector< double > lower_joint_bound
Definition type_def.h:759
std::vector< Enveloping > envelopings
Definition type_def.h:755
std::vector< double > init_joint
Definition type_def.h:757
PayloadIdentifyMoveAxis move_axis
Definition type_def.h:756
std::vector< double > max_velocity
Definition type_def.h:760
std::vector< double > obj_coord
tool coordinate system, based on uframe
Definition type_def.h:205
std::vector< double > user_coord
User coordinate system.
Definition type_def.h:201
bool remote_tool
Whether it is an external tool.
Definition type_def.h:190
std::string attach_frame
Coupled with the workpiece coordinate system.
Definition type_def.h:194
#define ENUM_RobotModeType_DECLARES
Definition type_def.h:332
#define ENUM_JointServoModeType_DECLARES
Definition type_def.h:394
#define TOOL_CONFIGURATION_NUM
Number of tool configurations.
Definition type_def.h:29
#define SAFETY_PLANES_NUM
Number of safety planes.
Definition type_def.h:27
#define ENUM_OperationalModeType_DECLARES
Based on ISO 10218-1:2011(E) Section 5.7 Automatic: In automatic mode, the robot shall execute the ta...
Definition type_def.h:376
#define ENUM_StandardInputAction_DECLARES
Definition type_def.h:409
#define ENUM_RuntimeState_DECLARES
The RuntimeState enum.
Definition type_def.h:309
#define DECL_TO_STRING_FUNC(ENUM)
Definition type_def.h:650
#define ENUM_SafetyOutputRunState_DECLARES
Definition type_def.h:465
#define SAFETY_PARAM_SELECT_NUM
normal + reduced
Definition type_def.h:26
#define ENUM_AxisModeType_DECLARES
Definition type_def.h:509
#define ENUM_SafetyModeType_DECLARES
Definition type_def.h:347
#define ENUM_RobotControlModeType_DECLARES
Robot control mode, the final control object.
Definition type_def.h:384
#define SAFETY_CUBIC_NUM
Number of safety cubes.
Definition type_def.h:28
#define ENUM_SafetyInputAction_DECLARES
Definition type_def.h:453
#define ENUM_StandardOutputRunState_DECLARES
Definition type_def.h:432
#define ENUM_JointStateType_DECLARES
Definition type_def.h:402