| xCore-SDK 0.4.1 xCore SDK C# API

robot_cli.hpp
1
8#pragma once
9#ifndef XCORESDK_SRC_CLI_ROBOT_CLI_HPP_
10#define XCORESDK_SRC_CLI_ROBOT_CLI_HPP_
11
12#include <unordered_map>
13#include <any>
14#include "data_types_cli.hpp"
15#include "exception_cli.hpp"
16#include "force_control_cli.hpp"
17
18 using namespace System;
19 using namespace System::Collections::Generic;
20 using namespace System::Runtime::InteropServices;
21
22 namespace rokae {
23
24 class BaseRobot;
25 class BaseCobot;
26 template<unsigned short DoF>
27 class Model_T;
28 class StandardRobot;
29 class xMateRobot;
30 class xMateCr5Robot;
31 class xMateErProRobot;
32 class PCB3Robot;
33 class PCB4Robot;
34
35}
36
37 namespace rokae::clr {
38
42 public ref class BaseRobot {
43 protected:
44 rokae::BaseRobot* robot;
45 void _moveEventCallback(const std::unordered_map<std::string, std::any>& info);
46 void _safetyEventCallback(const std::unordered_map<std::string, std::any>& info);
47 EventCallbackNativeDelegate^ _moveNativeDelegate;
48 static EventCallbackDelegate^ _moveManagedDelegate;
49 EventCallbackNativeDelegate^ _safetyNativeDelegate;
50 static EventCallbackDelegate^ _safetyManagedDelegate;
51
52 public:
53 virtual ~BaseRobot(){}
54
59 void disconnectFromRobot([Out] ErrorCode^% ec);
60
66 Info robotInfo([Out] ErrorCode^% ec);
67
70 String^ sdkVersion();
71
77 PowerState powerState([Out] ErrorCode^% ec);
78
84 void setPowerState(Boolean on, [Out] ErrorCode^% ec);
85
91 OperateMode operateMode([Out] ErrorCode^% ec);
92
98 void setOperateMode(OperateMode mode, [Out] ErrorCode^% ec);
99
105 OperationState operationState([Out] ErrorCode^% ec);
106
119 array<double>^ posture(CoordinateType ct, [Out] ErrorCode^% ec);
120
127 CartesianPosition^ cartPosture(CoordinateType ct, [Out] ErrorCode^% ec);
128
134 array<double>^ baseFrame([Out] ErrorCode^% ec);
135
141 Toolset^ toolset([Out] ErrorCode^% ec);
142
153 void setToolset(Toolset^ toolset, [Out] ErrorCode^% ec);
154
164 void setToolset(System::String^ toolName, System::String^ wobjName, [Out] ErrorCode^% ec);
165
171 void setBaseFrame(Frame^ frame, [Out] ErrorCode^% ec);
172
178 void setMotionControlMode(MotionControlMode mode, [Out] ErrorCode^% ec);
179
187 void moveReset([Out] ErrorCode^% ec);
188
195 void stop([Out] ErrorCode^% ec);
196
204 void executeCommand(MoveCommand::Type type, List<MoveCommand^>^ cmd, [Out] ErrorCode^% ec);
205
214 void moveAppend(MoveCommand::Type type, List<MoveCommand^>^ cmd, System::String^% cmdId, [Out] ErrorCode^% ec);
215
230 void setDefaultSpeed(int speed, [Out] ErrorCode^% ec);
231
244 void setDefaultZone(int zone, [Out] ErrorCode^% ec);
245
252 void setDefaultConfOpt(bool forced, [Out] ErrorCode^% ec);
253
258 void moveStart([Out] ErrorCode^% ec);
259
266 void setMaxCacheSize(int number, [Out] ErrorCode^% ec);
267
273 void adjustSpeedOnline(double scale, [Out] ErrorCode^% ec);
274
281 void getAcceleration(double% acc, double% jerk, [Out] ErrorCode^% ec);
282
289 void adjustAcceleration(double acc, double jerk, [Out] ErrorCode^% ec);
290
297 EventInfo queryEventInfo(Event eventType, [Out] ErrorCode^% ec);
298
310 void setEventWatcher(Event eventType, EventCallbackDelegate^ callback, [Out] ErrorCode^% ec);
311
340 void startJog(JogSpace space, double rate, double step, unsigned index, bool direction, [Out] ErrorCode^% ec);
341
346 void clearServoAlarm([Out] ErrorCode^% ec);
347
355 List<LogInfo^>^ queryControllerLog(unsigned count, LogInfo::Level level, [Out] ErrorCode^% ec);
356
364 void setDI(unsigned int board, unsigned int port, bool state, [Out] ErrorCode^% ec);
365
373 bool getDI(unsigned int board, unsigned int port, [Out] ErrorCode^% ec);
374
382 void setDO(unsigned int board, unsigned int port, bool state, [Out] ErrorCode^% ec);
383
391 bool getDO(unsigned int board, unsigned int port, [Out] ErrorCode^% ec);
392
400 double getAI(unsigned board, unsigned port, [Out] ErrorCode^% ec);
401
409 void setAO(unsigned board, unsigned port, double value, [Out] ErrorCode^% ec);
410
416 void setSimulationMode(bool state, [Out] ErrorCode^% ec);
417
425 template <typename T>
426 void readRegister(System::String^ name, List<T>^% value, [Out] ErrorCode^% ec);
427
436 template<typename T>
437 void readRegister(System::String^ name, unsigned index, T% value, [Out] ErrorCode^% ec);
438
447 template<typename T>
448 void writeRegister(System::String^ name, unsigned index, T value, [Out] ErrorCode^% ec);
449
455 List<RLProjectInfo^>^ projectsInfo([Out] ErrorCode^% ec);
456
467 void loadProject(String^ name, System::Collections::Generic::List<System::String^>^ tasks, [Out] ErrorCode^% ec);
468
473 void ppToMain([Out] ErrorCode^% ec);
474
479 void runProject([Out] ErrorCode^% ec);
480
485 void pauseProject([Out] ErrorCode^% ec);
486
493 void setProjectRunningOpt(double rate, bool loop, [Out] ErrorCode^% ec);
494
500 List<WorkToolInfo^>^ toolsInfo([Out] ErrorCode^% ec);
501
507 List<WorkToolInfo^>^ wobjsInfo([Out] ErrorCode^% ec);
508
514 void recoverState(int item, [Out] ErrorCode^% ec);
515};
516
520 public ref class StandardRobot : public BaseRobot {
521 private:
522 rokae::StandardRobot* robot;
523 rokae::Model_T<6>* model;
524 public:
528 StandardRobot();
529
535 StandardRobot(String^ remoteIP);
536 ~StandardRobot();
537
542 void connectToRobot([Out] ErrorCode^% ec);
543
549 void connectToRobot(String^ remoteIP);
550
556 array<double>^ jointPos([Out] ErrorCode^% ec);
557
563 array<double>^ jointVel([Out] ErrorCode^% ec);
564
570 array<double>^ jointTorque([Out] ErrorCode^% ec);
571
578 array<double>^ calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec);
579
586 CartesianPosition^ calcFk(array<double>^ joints, [Out] ErrorCode^% ec);
587
604 FrameCalibrationResult^ calibrateFrame(FrameType type, List<array<double>^>^ points, bool is_held,
605 array<double>^ base_aux, [Out] ErrorCode^% ec);
606
613 void enableCollisionDetection(array<double>^ sensitivity, double fallback, [Out] ErrorCode^% ec);
614
619 void disableCollisionDetection([Out] ErrorCode^% ec);
620
627 bool getSoftLimit(array<double, 2>^% limits, [Out] ErrorCode^% ec);
628
645 void setSoftLimit(bool enable, array<double, 2>^ limits, [Out] ErrorCode^% ec);
646
660 void setAvoidSingularity(AvoidSingularityMethod method, bool enable, double limit, [Out] ErrorCode^% ec);
661
668 bool getAvoidSingularity(AvoidSingularityMethod method, [Out] ErrorCode^% ec);
669
670 };
671
675 public ref class Cobot : public BaseRobot {
676 protected:
677 rokae::BaseCobot* robot;
678 public:
679
686 void enableDrag(DragOpt::Space space, DragOpt::Type type, [Out] ErrorCode^% ec);
687
692 void disableDrag([Out] ErrorCode^% ec);
693
698 void disableCollisionDetection([Out] ErrorCode^% ec);
699
704 void startRecordPath([Out] ErrorCode^% ec);
705
710 void stopRecordPath([Out] ErrorCode^% ec);
711
716 void cancelRecordPath([Out] ErrorCode^% ec);
717
724 void saveRecordPath(String^ name, String^ saveAs, [Out] ErrorCode^% ec);
725
733 void replayPath(String^ name, double rate, [Out] ErrorCode^% ec);
734
741 void removePath(String^ name, bool removeAll, [Out] ErrorCode^% ec);
742
748 List<String^>^ queryPathLists([Out] ErrorCode^% ec);
749
755 void setxPanelVout(xPanelOpt::Vout opt, [Out] ErrorCode^% ec);
756
764 array<bool>^ getKeypadState([Out] ErrorCode^% ec);
765 };
766
770 public ref class xMateRobot : public Cobot {
771 private:
772 rokae::xMateRobot* robot;
773 rokae::Model_T<6>* model;
774 public:
778 xMateRobot();
779
785 xMateRobot(String^ remoteIP);
786
790 ~xMateRobot();
791
796 void connectToRobot([Out] ErrorCode^% ec);
797
803 void connectToRobot(String^ remoteIP);
804
810 array<double>^ jointPos([Out] ErrorCode^% ec);
811
817 array<double>^ jointVel([Out] ErrorCode^% ec);
818
824 array<double>^ jointTorque([Out] ErrorCode^% ec);
825
832 array<double>^ calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec);
833
840 CartesianPosition^ calcFk(array<double>^ joints, [Out] ErrorCode^% ec);
841
854 void enableCollisionDetection(array<double>^ sensitivity, StopLevel behaviour, double fallback_compliance, [Out] ErrorCode^% ec);
855
872 FrameCalibrationResult^ calibrateFrame(FrameType type, List<array<double>^>^ points, bool is_held, array<double>^ base_aux, [Out] ErrorCode^% ec);
873
881 void calibrateForceSensor(bool all_axes, int axis_index, [Out] ErrorCode^% ec);
882
900 void setAvoidSingularity(AvoidSingularityMethod method, bool enable, double limit, [Out] ErrorCode^% ec);
901
908 bool getAvoidSingularity(AvoidSingularityMethod method, [Out] ErrorCode^% ec);
909
916 bool getSoftLimit(array<double, 2>^% limits, [Out] ErrorCode^% ec);
917
934 void setSoftLimit(bool enable, array<double, 2>^ limits, [Out] ErrorCode^% ec);
935
940 ForceControl^ forceControl();
941 };
942
946 public ref class xMateCr5Robot : public Cobot {
947 private:
948 rokae::xMateCr5Robot* robot;
949 rokae::Model_T<5>* model;
950 public:
954 xMateCr5Robot();
955
961 xMateCr5Robot(String^ remoteIP);
962
966 ~xMateCr5Robot();
967
972 void connectToRobot([Out] ErrorCode^% ec);
973
979 void connectToRobot(String^ remoteIP);
980
986 array<double>^ jointPos([Out] ErrorCode^% ec);
987
993 array<double>^ jointVel([Out] ErrorCode^% ec);
994
1000 array<double>^ jointTorque([Out] ErrorCode^% ec);
1001
1008 array<double>^ calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec);
1009
1016 CartesianPosition^ calcFk(array<double>^ joints, [Out] ErrorCode^% ec);
1017
1030 void enableCollisionDetection(array<double>^ sensitivity, StopLevel behaviour, double fallback_compliance, [Out] ErrorCode^% ec);
1031
1048 FrameCalibrationResult^ calibrateFrame(FrameType type, List<array<double>^>^ points, bool is_held, array<double>^ base_aux, [Out] ErrorCode^% ec);
1049
1057 void calibrateForceSensor(bool all_axes, int axis_index, [Out] ErrorCode^% ec);
1058
1065 bool getSoftLimit(array<double, 2>^% limits, [Out] ErrorCode^% ec);
1066
1083 void setSoftLimit(bool enable, array<double, 2>^ limits, [Out] ErrorCode^% ec);
1084
1085 };
1086
1090 public ref class PCB3Robot : public BaseRobot {
1091 private:
1092 rokae::PCB3Robot* robot;
1093 rokae::Model_T<3>* model;
1094 public:
1098 PCB3Robot();
1099
1105 PCB3Robot(String^ remoteIP);
1106
1110 ~PCB3Robot();
1111
1116 void connectToRobot([Out] ErrorCode^% ec);
1117
1123 void connectToRobot(String^ remoteIP);
1124
1130 array<double>^ jointPos([Out] ErrorCode^% ec);
1131
1137 array<double>^ jointVel([Out] ErrorCode^% ec);
1138
1144 array<double>^ jointTorque([Out] ErrorCode^% ec);
1145
1152 array<double>^ calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec);
1153
1160 CartesianPosition^ calcFk(array<double>^ joints, [Out] ErrorCode^% ec);
1161
1178 FrameCalibrationResult^ calibrateFrame(FrameType type, List<array<double>^>^ points, bool is_held,
1179 array<double>^ base_aux, [Out] ErrorCode^% ec);
1180
1187 bool getSoftLimit(array<double, 2>^% limits, [Out] ErrorCode^% ec);
1188
1205 void setSoftLimit(bool enable, array<double, 2>^ limits, [Out] ErrorCode^% ec);
1206
1207
1208 };
1209
1213 public ref class PCB4Robot : public BaseRobot {
1214 private:
1215 rokae::PCB4Robot* robot;
1216 rokae::Model_T<4>* model;
1217 public:
1221 PCB4Robot();
1222
1228 PCB4Robot(String^ remoteIP);
1229
1233 ~PCB4Robot();
1234
1239 void connectToRobot([Out] ErrorCode^% ec);
1240
1246 void connectToRobot(String^ remoteIP);
1247
1253 array<double>^ jointPos([Out] ErrorCode^% ec);
1254
1260 array<double>^ jointVel([Out] ErrorCode^% ec);
1261
1267 array<double>^ jointTorque([Out] ErrorCode^% ec);
1268
1275 array<double>^ calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec);
1276
1283 CartesianPosition^ calcFk(array<double>^ joints, [Out] ErrorCode^% ec);
1284
1301 FrameCalibrationResult^ calibrateFrame(FrameType type, List<array<double>^>^ points, bool is_held,
1302 array<double>^ base_aux, [Out] ErrorCode^% ec);
1303
1310 bool getSoftLimit(array<double, 2>^% limits, [Out] ErrorCode^% ec);
1311
1328 void setSoftLimit(bool enable, array<double, 2>^ limits, [Out] ErrorCode^% ec);
1329 };
1330
1334 public ref class xMateErProRobot : public Cobot {
1335 private:
1336 rokae::xMateErProRobot* robot;
1337 rokae::Model_T<7>* model;
1338 public:
1342 xMateErProRobot();
1343
1349 xMateErProRobot(String^ remoteIP);
1350
1354 ~xMateErProRobot();
1355
1360 void connectToRobot([Out] ErrorCode^% ec);
1361
1367 void connectToRobot(String^ remoteIP);
1368
1374 array<double>^ jointPos([Out] ErrorCode^% ec);
1375
1381 array<double>^ jointVel([Out] ErrorCode^% ec);
1382
1388 array<double>^ jointTorque([Out] ErrorCode^% ec);
1389
1396 array<double>^ calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec);
1397
1404 CartesianPosition^ calcFk(array<double>^ joints, [Out] ErrorCode^% ec);
1405
1422 FrameCalibrationResult^ calibrateFrame(FrameType type, List<array<double>^>^ points, bool is_held,
1423 array<double>^ base_aux, [Out] ErrorCode^% ec);
1424
1432 void calibrateForceSensor(bool all_axes, int axis_index, [Out] ErrorCode^% ec);
1433
1446 void enableCollisionDetection(array<double>^ sensitivity, StopLevel behaviour, double fallback_compliance, [Out] ErrorCode^% ec);
1447
1453 bool getSoftLimit(array<double, 2>^% limits, [Out] ErrorCode^% ec);
1454
1471 void setSoftLimit(bool enable, array<double, 2>^ limits, [Out] ErrorCode^% ec);
1472
1477 ForceControl^ forceControl();
1478 };
1479
1480}
1481
1482
1483#endif //XCORESDK_SRC_CLI_ROBOT_CLI_HPP_
rokae::Model_T
Definition: robot_cli.hpp:27
rokae::clr::BaseRobot
机器人通用接口
Definition: robot_cli.hpp:42
rokae::clr::BaseRobot::cartPosture
CartesianPosition cartPosture(CoordinateType ct, [Out] ErrorCode^% ec)
获取机器人法兰或末端的当前位姿
rokae::clr::BaseRobot::setMotionControlMode
void setMotionControlMode(MotionControlMode mode, [Out] ErrorCode^% ec)
设置运动控制模式.
rokae::clr::BaseRobot::pauseProject
void pauseProject([Out] ErrorCode^% ec)
暂停运行工程
rokae::clr::BaseRobot::runProject
void runProject([Out] ErrorCode^% ec)
开始运行当前加载的工程
rokae::clr::BaseRobot::operationState
OperationState operationState([Out] ErrorCode^% ec)
查询机器人当前运行状态 (空闲, 运动中, 拖动开启等)
rokae::clr::BaseRobot::setToolset
void setToolset(System::String^ toolName, System::String^ wobjName, [Out] ErrorCode^% ec)
使用已创建的工具和工件，设置工具工件组信息
rokae::clr::BaseRobot::baseFrame
array< double > baseFrame([Out] ErrorCode^% ec)
读取基坐标系, 相对于世界坐标系
rokae::clr::BaseRobot::adjustSpeedOnline
void adjustSpeedOnline(double scale, [Out] ErrorCode^% ec)
动态调整机器人运动速率，非实时模式时生效。
rokae::clr::BaseRobot::setDefaultConfOpt
void setDefaultConfOpt(bool forced, [Out] ErrorCode^% ec)
设置是否使用轴配置数据(confData)计算逆解。初始值为false
rokae::clr::BaseRobot::setDO
void setDO(unsigned int board, unsigned int port, bool state, [Out] ErrorCode^% ec)
设置数字量输出信号值
rokae::clr::BaseRobot::posture
array< double > posture(CoordinateType ct, [Out] ErrorCode^% ec)
获取机器人法兰或末端的当前位姿
rokae::clr::BaseRobot::setAO
void setAO(unsigned board, unsigned port, double value, [Out] ErrorCode^% ec)
设置模拟量输出信号
rokae::clr::BaseRobot::setToolset
void setToolset(Toolset^ toolset, [Out] ErrorCode^% ec)
设置工具工件组信息。
rokae::clr::BaseRobot::setOperateMode
void setOperateMode(OperateMode mode, [Out] ErrorCode^% ec)
切换手自动模式
rokae::clr::BaseRobot::writeRegister
void writeRegister(System::String^ name, unsigned index, T value, [Out] ErrorCode^% ec)
写寄存器值。可写入单个寄存器，或按索引写入寄存器数组中某一元素。
rokae::clr::BaseRobot::wobjsInfo
List< WorkToolInfo^> wobjsInfo([Out] ErrorCode^% ec)
查询当前加载工程的工件信息
rokae::clr::BaseRobot::readRegister
void readRegister(System::String^ name, List< T >^% value, [Out] ErrorCode^% ec)
读取寄存器数组。
rokae::clr::BaseRobot::readRegister
void readRegister(System::String^ name, unsigned index, T% value, [Out] ErrorCode^% ec)
读取寄存器值。可读取单个寄存器，或按索引读取寄存器数组
rokae::clr::BaseRobot::recoverState
void recoverState(int item, [Out] ErrorCode^% ec)
根据选项恢复机器人状态
rokae::clr::BaseRobot::sdkVersion
String sdkVersion()
查询xCoreSDK版本
rokae::clr::BaseRobot::getDO
bool getDO(unsigned int board, unsigned int port, [Out] ErrorCode^% ec)
查询数字输出量信号值
rokae::clr::BaseRobot::executeCommand
void executeCommand(MoveCommand::Type type, List< MoveCommand^>^ cmd, [Out] ErrorCode^% ec)
执行单条或多条运动指令，调用后机器人立刻开始运动
rokae::clr::BaseRobot::setDefaultZone
void setDefaultZone(int zone, [Out] ErrorCode^% ec)
设定默认转弯区。初始值为为0 (fine, 无转弯区)。该数值表示运动最大转弯区半径(单位:mm), 自动计算转弯百分比 转弯百分比划分4个范围: < 1 0 (fine) 1 ~ 20 10 % 20...
rokae::clr::BaseRobot::setProjectRunningOpt
void setProjectRunningOpt(double rate, bool loop, [Out] ErrorCode^% ec)
更改工程的运行速度和循环模式
rokae::clr::BaseRobot::loadProject
void loadProject(String^ name, System::Collections::Generic::List< System::String^>^ tasks, [Out] ErrorCode^% ec)
加载工程
rokae::clr::BaseRobot::startJog
void startJog(JogSpace space, double rate, double step, unsigned index, bool direction, [Out] ErrorCode^% ec)
开始jog机器人，需要切换到手动操作模式。调用此接口并且机器人开始运动后，无论机器人是否已经自行停止，都必须调用stop()来结束jog操作，否则机器人会一直处于jog的运行状态。
rokae::clr::BaseRobot::powerState
PowerState powerState([Out] ErrorCode^% ec)
查询机器人上下电以及急停状态
rokae::clr::BaseRobot::ppToMain
void ppToMain([Out] ErrorCode^% ec)
程序指针跳转到main。调用后，等待控制器解析完工程后返回，阻塞时间视工程大小而定，超时时间设定为10秒。
rokae::clr::BaseRobot::projectsInfo
List< RLProjectInfo^> projectsInfo([Out] ErrorCode^% ec)
查询工控机中RL工程名称及任务
rokae::clr::BaseRobot::moveStart
void moveStart([Out] ErrorCode^% ec)
开始/继续运动
rokae::clr::BaseRobot::clearServoAlarm
void clearServoAlarm([Out] ErrorCode^% ec)
清除伺服报警
rokae::clr::BaseRobot::disconnectFromRobot
void disconnectFromRobot([Out] ErrorCode^% ec)
断开与机器人连接。断开前会停止机器人运动, 请注意安全。
rokae::clr::BaseRobot::toolset
Toolset toolset([Out] ErrorCode^% ec)
查询当前工具工件组信息.
rokae::clr::BaseRobot::setSimulationMode
void setSimulationMode(bool state, [Out] ErrorCode^% ec)
设置输入仿真模式
rokae::clr::BaseRobot::getAcceleration
void getAcceleration(double% acc, double% jerk, [Out] ErrorCode^% ec)
读取当前加/减速度和加加速度
rokae::clr::BaseRobot::setBaseFrame
void setBaseFrame(Frame^ frame, [Out] ErrorCode^% ec)
设置基坐标系, 设置后仅保存数值，重启控制器后生效
rokae::clr::BaseRobot::setMaxCacheSize
void setMaxCacheSize(int number, [Out] ErrorCode^% ec)
设置最大缓存指令个数，指发送到控制器待规划的路径点个数，允许的范围[1,300]，初始值为30。
rokae::clr::BaseRobot::setDI
void setDI(unsigned int board, unsigned int port, bool state, [Out] ErrorCode^% ec)
设置数字量输入信号，仅当输入仿真模式打开时可以设置(见setSimulationMode())
rokae::clr::BaseRobot::toolsInfo
List< WorkToolInfo^> toolsInfo([Out] ErrorCode^% ec)
查询当前加载工程的工具信息
rokae::clr::BaseRobot::adjustAcceleration
void adjustAcceleration(double acc, double jerk, [Out] ErrorCode^% ec)
调节运动加/减速度和加加速度。如果在机器人运动中调用，当前正在执行的指令不生效，下一条指令生效
rokae::clr::BaseRobot::moveReset
void moveReset([Out] ErrorCode^% ec)
运动重置, 清空已发送的运动指令, 清除执行信息。 Robot类在初始化时会调用一次运动重置。RL程序和SDK运动指令切换控制，需要先运动重置。
rokae::clr::BaseRobot::setEventWatcher
void setEventWatcher(Event eventType, EventCallbackDelegate^ callback, [Out] ErrorCode^% ec)
设置接收事件的回调函数。
rokae::clr::BaseRobot::moveAppend
void moveAppend(MoveCommand::Type type, List< MoveCommand^>^ cmd, System::String^% cmdId, [Out] ErrorCode^% ec)
添加单条或多条运动指令, 添加后调用moveStart()开始运动
rokae::clr::BaseRobot::setPowerState
void setPowerState(Boolean on, [Out] ErrorCode^% ec)
机器人上下电。注: 只有无外接使能开关或示教器的机器人才能手动模式上电。
rokae::clr::BaseRobot::queryControllerLog
List< LogInfo^> queryControllerLog(unsigned count, LogInfo::Level level, [Out] ErrorCode^% ec)
查询控制器最新的日志
rokae::clr::BaseRobot::getAI
double getAI(unsigned board, unsigned port, [Out] ErrorCode^% ec)
读取模拟量输入信号值
rokae::clr::BaseRobot::setDefaultSpeed
void setDefaultSpeed(int speed, [Out] ErrorCode^% ec)
设定默认运动速度，初始值为100。该数值表示末端最大线速度(单位mm/s), 自动计算对应关节速度。 关节速度百分比划分为5个的范围: < 100 10% 100 ~ 200 30% 200 ~ 500...
rokae::clr::BaseRobot::robotInfo
Info robotInfo([Out] ErrorCode^% ec)
查询机器人基本信息
rokae::clr::BaseRobot::queryEventInfo
EventInfo queryEventInfo(Event eventType, [Out] ErrorCode^% ec)
查询事件信息。
rokae::clr::BaseRobot::operateMode
OperateMode operateMode([Out] ErrorCode^% ec)
查询机器人当前操作模式
rokae::clr::BaseRobot::stop
void stop([Out] ErrorCode^% ec)
暂停机器人运动; 暂停后可调用moveStart()继续运动。若需要完全停止，不再执行已添加的指令，可调用moveReset()
rokae::clr::BaseRobot::getDI
bool getDI(unsigned int board, unsigned int port, [Out] ErrorCode^% ec)
查询数字量输入信号值
rokae::clr::CartesianPosition
笛卡尔点位
Definition: data_types_cli.hpp:306
rokae::clr::Cobot
协作机器人通用接口
Definition: robot_cli.hpp:675
rokae::clr::Cobot::startRecordPath
void startRecordPath([Out] ErrorCode^% ec)
开始录制路径。录制的时长需要限制在30分钟以内, 此接口不会阻塞等待，录制完毕调用stopRecordPath()来停止录制
rokae::clr::Cobot::enableDrag
void enableDrag(DragOpt::Space space, DragOpt::Type type, [Out] ErrorCode^% ec)
打开拖动
rokae::clr::Cobot::getKeypadState
array< bool > getKeypadState([Out] ErrorCode^% ec)
获取末端按键状态，不支持的机型会返回错误码。
rokae::clr::Cobot::queryPathLists
List< String^> queryPathLists([Out] ErrorCode^% ec)
查询已保存的所有路径名称
rokae::clr::Cobot::disableDrag
void disableDrag([Out] ErrorCode^% ec)
关闭拖动
rokae::clr::Cobot::stopRecordPath
void stopRecordPath([Out] ErrorCode^% ec)
停止录制路径, 若录制成功(无错误码)则路径数据保存在缓存中
rokae::clr::Cobot::setxPanelVout
void setxPanelVout(xPanelOpt::Vout opt, [Out] ErrorCode^% ec)
设置xPanel对外供电模式。注：仅部分机型支持xPanel功能，不支持的机型会返回错误码
rokae::clr::Cobot::removePath
void removePath(String^ name, bool removeAll, [Out] ErrorCode^% ec)
删除已保存的路径
rokae::clr::Cobot::saveRecordPath
void saveRecordPath(String^ name, String^ saveAs, [Out] ErrorCode^% ec)
保存录制好的路径
rokae::clr::Cobot::replayPath
void replayPath(String^ name, double rate, [Out] ErrorCode^% ec)
运动指令-路径回放。 和其它运动指令类似，调用replayPath之后，需调用moveStart才会开始运动。
rokae::clr::Cobot::cancelRecordPath
void cancelRecordPath([Out] ErrorCode^% ec)
取消录制, 缓存的路径数据将被删除
rokae::clr::Cobot::disableCollisionDetection
void disableCollisionDetection([Out] ErrorCode^% ec)
关闭碰撞检测功能
rokae::clr::ErrorCode
xCoreSDK错误码
Definition: data_types_cli.hpp:23
rokae::clr::ForceControl
力控指令
Definition: force_control_cli.hpp:31
rokae::clr::FrameCalibrationResult
坐标系标定结果
Definition: data_types_cli.hpp:446
rokae::clr::Frame
坐标系
Definition: data_types_cli.hpp:268
rokae::clr::LogInfo::Level
Level
日志等级
Definition: data_types_cli.hpp:462
rokae::clr::MoveCommand::Type
Type
指令类型
Definition: data_types_cli.hpp:356
rokae::clr::PCB3Robot
PCB3轴机型
Definition: robot_cli.hpp:1090
rokae::clr::PCB3Robot::~PCB3Robot
~PCB3Robot()
deconstructor
rokae::clr::PCB3Robot::calcIk
array< double > calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec)
根据位姿计算逆解
rokae::clr::PCB3Robot::jointVel
array< double > jointVel([Out] ErrorCode^% ec)
机器人当前关节速度 [rad/s]
rokae::clr::PCB3Robot::connectToRobot
void connectToRobot([Out] ErrorCode^% ec)
连接到机器人。机器人地址为创建PCB3Robot实例时传入的
rokae::clr::PCB3Robot::calibrateFrame
FrameCalibrationResult calibrateFrame(FrameType type, List< array< double >^>^ points, bool is_held, array< double >^ base_aux, [Out] ErrorCode^% ec)
坐标系标定 (N点标定).
rokae::clr::PCB3Robot::PCB3Robot
PCB3Robot()
默认构造，需调用connectToRobot(remoteIP)初始化
rokae::clr::PCB3Robot::setSoftLimit
void setSoftLimit(bool enable, array< double, 2 >^ limits, [Out] ErrorCode^% ec)
设置软限位。软限位设定要求： 打开软限位时，机械臂应下电且处于手动模式 软限位不能超过机械硬限位 机械臂当前各轴角度应在设定的限位范围内
rokae::clr::PCB3Robot::jointTorque
array< double > jointTorque([Out] ErrorCode^% ec)
关节力传感器数值 [Nm]
rokae::clr::PCB3Robot::PCB3Robot
PCB3Robot(String^ remoteIP)
创建机器人实例并建立连接
rokae::clr::PCB3Robot::jointPos
array< double > jointPos([Out] ErrorCode^% ec)
机器人当前轴角度 [rad]
rokae::clr::PCB3Robot::connectToRobot
void connectToRobot(String^ remoteIP)
建立与机器人的连接。
rokae::clr::PCB3Robot::getSoftLimit
bool getSoftLimit(array< double, 2 >^% limits, [Out] ErrorCode^% ec)
获取当前软限位数值
rokae::clr::PCB3Robot::calcFk
CartesianPosition calcFk(array< double >^ joints, [Out] ErrorCode^% ec)
根据轴角度计算正解
rokae::clr::PCB4Robot
PCB4轴机型
Definition: robot_cli.hpp:1213
rokae::clr::PCB4Robot::~PCB4Robot
~PCB4Robot()
deconstructor
rokae::clr::PCB4Robot::calcIk
array< double > calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec)
根据位姿计算逆解
rokae::clr::PCB4Robot::setSoftLimit
void setSoftLimit(bool enable, array< double, 2 >^ limits, [Out] ErrorCode^% ec)
设置软限位。软限位设定要求： 打开软限位时，机械臂应下电且处于手动模式 软限位不能超过机械硬限位 机械臂当前各轴角度应在设定的限位范围内
rokae::clr::PCB4Robot::jointVel
array< double > jointVel([Out] ErrorCode^% ec)
机器人当前关节速度 [rad/s]
rokae::clr::PCB4Robot::connectToRobot
void connectToRobot([Out] ErrorCode^% ec)
连接到机器人。机器人地址为创建PCB3Robot实例时传入的
rokae::clr::PCB4Robot::connectToRobot
void connectToRobot(String^ remoteIP)
初始化PCB4Robot，建立与机器人的连接。
rokae::clr::PCB4Robot::getSoftLimit
bool getSoftLimit(array< double, 2 >^% limits, [Out] ErrorCode^% ec)
获取当前软限位数值
rokae::clr::PCB4Robot::jointTorque
array< double > jointTorque([Out] ErrorCode^% ec)
关节力传感器数值 [Nm]
rokae::clr::PCB4Robot::PCB4Robot
PCB4Robot()
默认构造，需调用connectToRobot(remoteIP)初始化
rokae::clr::PCB4Robot::calibrateFrame
FrameCalibrationResult calibrateFrame(FrameType type, List< array< double >^>^ points, bool is_held, array< double >^ base_aux, [Out] ErrorCode^% ec)
坐标系标定 (N点标定).
rokae::clr::PCB4Robot::jointPos
array< double > jointPos([Out] ErrorCode^% ec)
机器人当前轴角度 [rad]
rokae::clr::PCB4Robot::PCB4Robot
PCB4Robot(String^ remoteIP)
创建机器人实例并建立连接
rokae::clr::PCB4Robot::calcFk
CartesianPosition calcFk(array< double >^ joints, [Out] ErrorCode^% ec)
根据轴角度计算正解
rokae::clr::StandardRobot
工业六轴机器人
Definition: robot_cli.hpp:520
rokae::clr::StandardRobot::disableCollisionDetection
void disableCollisionDetection([Out] ErrorCode^% ec)
关闭碰撞检测功能
rokae::clr::StandardRobot::setAvoidSingularity
void setAvoidSingularity(AvoidSingularityMethod method, bool enable, double limit, [Out] ErrorCode^% ec)
rokae::clr::StandardRobot::connectToRobot
void connectToRobot([Out] ErrorCode^% ec)
连接到机器人。机器人地址为创建StandardRobot实例时传入的
rokae::clr::StandardRobot::getAvoidSingularity
bool getAvoidSingularity(AvoidSingularityMethod method, [Out] ErrorCode^% ec)
查询是否处于规避奇异点的状态
rokae::clr::StandardRobot::calcIk
array< double > calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec)
根据位姿计算逆解
rokae::clr::StandardRobot::StandardRobot
StandardRobot()
默认构造，需调用connectToRobot(remoteIP)初始化
rokae::clr::StandardRobot::calcFk
CartesianPosition calcFk(array< double >^ joints, [Out] ErrorCode^% ec)
根据轴角度计算正解
rokae::clr::StandardRobot::getSoftLimit
bool getSoftLimit(array< double, 2 >^% limits, [Out] ErrorCode^% ec)
获取当前软限位数值
rokae::clr::StandardRobot::jointPos
array< double > jointPos([Out] ErrorCode^% ec)
机器人当前轴角度 [rad]
rokae::clr::StandardRobot::enableCollisionDetection
void enableCollisionDetection(array< double >^ sensitivity, double fallback, [Out] ErrorCode^% ec)
设置碰撞检测相关参数, 打开碰撞检测功能。工业机型只支持stop1（安全停止）
rokae::clr::StandardRobot::jointTorque
array< double > jointTorque([Out] ErrorCode^% ec)
关节力传感器数值 [Nm]
rokae::clr::StandardRobot::setSoftLimit
void setSoftLimit(bool enable, array< double, 2 >^ limits, [Out] ErrorCode^% ec)
设置软限位。软限位设定要求： 打开软限位时，机械臂应下电且处于手动模式 软限位不能超过机械硬限位 机械臂当前各轴角度应在设定的限位范围内
rokae::clr::StandardRobot::calibrateFrame
FrameCalibrationResult calibrateFrame(FrameType type, List< array< double >^>^ points, bool is_held, array< double >^ base_aux, [Out] ErrorCode^% ec)
坐标系标定 (N点标定).
rokae::clr::StandardRobot::connectToRobot
void connectToRobot(String^ remoteIP)
建立与机器人的连接。
rokae::clr::StandardRobot::jointVel
array< double > jointVel([Out] ErrorCode^% ec)
机器人当前关节速度 [rad/s]
rokae::clr::StandardRobot::StandardRobot
StandardRobot(String^ remoteIP)
创建机器人实例并建立连接，适用机型: 工业六轴
rokae::clr::Toolset
工具工件组信息, 根据一对工具工件的坐标、负载、机器人手持设置计算得出
Definition: data_types_cli.hpp:432
rokae::clr::xMateCr5Robot
xMate五轴机器人5轴协作机器人, 包括 XMC17_5/XMC25_5
Definition: robot_cli.hpp:946
rokae::clr::xMateCr5Robot::enableCollisionDetection
void enableCollisionDetection(array< double >^ sensitivity, StopLevel behaviour, double fallback_compliance, [Out] ErrorCode^% ec)
设置碰撞检测相关参数, 打开碰撞检测功能。
rokae::clr::xMateCr5Robot::xMateCr5Robot
xMateCr5Robot()
默认构造，需调用connectToRobot(remoteIP)初始化
rokae::clr::xMateCr5Robot::getSoftLimit
bool getSoftLimit(array< double, 2 >^% limits, [Out] ErrorCode^% ec)
获取当前软限位数值
rokae::clr::xMateCr5Robot::~xMateCr5Robot
~xMateCr5Robot()
decosntructor
rokae::clr::xMateCr5Robot::jointVel
array< double > jointVel([Out] ErrorCode^% ec)
机器人当前关节速度 [rad/s]
rokae::clr::xMateCr5Robot::jointPos
array< double > jointPos([Out] ErrorCode^% ec)
机器人当前轴角度 [rad]
rokae::clr::xMateCr5Robot::jointTorque
array< double > jointTorque([Out] ErrorCode^% ec)
关节力传感器数值 [Nm]
rokae::clr::xMateCr5Robot::calcIk
array< double > calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec)
根据位姿计算逆解
rokae::clr::xMateCr5Robot::connectToRobot
void connectToRobot(String^ remoteIP)
建立与机器人的连接。
rokae::clr::xMateCr5Robot::calibrateFrame
FrameCalibrationResult calibrateFrame(FrameType type, List< array< double >^>^ points, bool is_held, array< double >^ base_aux, [Out] ErrorCode^% ec)
坐标系标定 (N点标定).
rokae::clr::xMateCr5Robot::calibrateForceSensor
void calibrateForceSensor(bool all_axes, int axis_index, [Out] ErrorCode^% ec)
力传感器标定。标定过程需要约100ms, 该函数不会阻塞等待标定完成。 标定前需要通过setToolset()设置正确的负载(Toolset.load), 否则会影响标定结果准确性。
rokae::clr::xMateCr5Robot::xMateCr5Robot
xMateCr5Robot(String^ remoteIP)
创建机器人实例并建立连接
rokae::clr::xMateCr5Robot::setSoftLimit
void setSoftLimit(bool enable, array< double, 2 >^ limits, [Out] ErrorCode^% ec)
设置软限位。软限位设定要求： 打开软限位时，机械臂应下电且处于手动模式 软限位不能超过机械硬限位 机械臂当前各轴角度应在设定的限位范围内
rokae::clr::xMateCr5Robot::calcFk
CartesianPosition calcFk(array< double >^ joints, [Out] ErrorCode^% ec)
根据轴角度计算正解
rokae::clr::xMateCr5Robot::connectToRobot
void connectToRobot([Out] ErrorCode^% ec)
连接到机器人。机器人地址为创建xMateCr5Robot实例时传入的
rokae::clr::xMateErProRobot
协作七轴机器人, 包括 xMateER3 Pro / xMateER7 Pro
Definition: robot_cli.hpp:1334
rokae::clr::xMateErProRobot::calcFk
CartesianPosition calcFk(array< double >^ joints, [Out] ErrorCode^% ec)
根据轴角度计算正解
rokae::clr::xMateErProRobot::enableCollisionDetection
void enableCollisionDetection(array< double >^ sensitivity, StopLevel behaviour, double fallback_compliance, [Out] ErrorCode^% ec)
设置碰撞检测相关参数, 打开碰撞检测功能。
rokae::clr::xMateErProRobot::jointVel
array< double > jointVel([Out] ErrorCode^% ec)
机器人当前关节速度 [rad/s]
rokae::clr::xMateErProRobot::getSoftLimit
bool getSoftLimit(array< double, 2 >^% limits, [Out] ErrorCode^% ec)
获取当前软限位数值
rokae::clr::xMateErProRobot::jointTorque
array< double > jointTorque([Out] ErrorCode^% ec)
关节力传感器数值 [Nm]
rokae::clr::xMateErProRobot::xMateErProRobot
xMateErProRobot(String^ remoteIP)
创建机器人实例并建立连接
rokae::clr::xMateErProRobot::calcIk
array< double > calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec)
根据位姿计算逆解
rokae::clr::xMateErProRobot::connectToRobot
void connectToRobot(String^ remoteIP)
初始化xMateErProRobot，建立与机器人的连接。
rokae::clr::xMateErProRobot::xMateErProRobot
xMateErProRobot()
默认构造，需调用connectToRobot(remoteIP)初始化
rokae::clr::xMateErProRobot::calibrateForceSensor
void calibrateForceSensor(bool all_axes, int axis_index, [Out] ErrorCode^% ec)
力传感器标定。标定过程需要约100ms, 该函数不会阻塞等待标定完成。 标定前需要通过setToolset()设置正确的负载(Toolset.load), 否则会影响标定结果准确性。
rokae::clr::xMateErProRobot::connectToRobot
void connectToRobot([Out] ErrorCode^% ec)
连接到机器人。机器人地址为创建PCB3Robot实例时传入的
rokae::clr::xMateErProRobot::~xMateErProRobot
~xMateErProRobot()
decosntructor
rokae::clr::xMateErProRobot::jointPos
array< double > jointPos([Out] ErrorCode^% ec)
机器人当前轴角度 [rad]
rokae::clr::xMateErProRobot::forceControl
ForceControl forceControl()
力控指令类
rokae::clr::xMateErProRobot::setSoftLimit
void setSoftLimit(bool enable, array< double, 2 >^ limits, [Out] ErrorCode^% ec)
设置软限位。软限位设定要求： 打开软限位时，机械臂应下电且处于手动模式 软限位不能超过机械硬限位 机械臂当前各轴角度应在设定的限位范围内
rokae::clr::xMateErProRobot::calibrateFrame
FrameCalibrationResult calibrateFrame(FrameType type, List< array< double >^>^ points, bool is_held, array< double >^ base_aux, [Out] ErrorCode^% ec)
坐标系标定 (N点标定).
rokae::clr::xMateRobot
xMate六轴机器人6轴协作机器人, 包括 xMateCR7/12, xMateSR3/4, xMateER3/7
Definition: robot_cli.hpp:770
rokae::clr::xMateRobot::xMateRobot
xMateRobot()
默认构造，需调用connectToRobot(remoteIP)初始化
rokae::clr::xMateRobot::jointTorque
array< double > jointTorque([Out] ErrorCode^% ec)
关节力传感器数值 [Nm]
rokae::clr::xMateRobot::forceControl
ForceControl forceControl()
力控指令类
rokae::clr::xMateRobot::~xMateRobot
~xMateRobot()
decosntructor
rokae::clr::xMateRobot::calibrateForceSensor
void calibrateForceSensor(bool all_axes, int axis_index, [Out] ErrorCode^% ec)
力传感器标定。标定过程需要约100ms, 该函数不会阻塞等待标定完成。 标定前需要通过setToolset()设置正确的负载(Toolset.load), 否则会影响标定结果准确性。
rokae::clr::xMateRobot::setSoftLimit
void setSoftLimit(bool enable, array< double, 2 >^ limits, [Out] ErrorCode^% ec)
设置软限位。软限位设定要求： 打开软限位时，机械臂应下电且处于手动模式 软限位不能超过机械硬限位 机械臂当前各轴角度应在设定的限位范围内
rokae::clr::xMateRobot::getSoftLimit
bool getSoftLimit(array< double, 2 >^% limits, [Out] ErrorCode^% ec)
获取当前软限位数值
rokae::clr::xMateRobot::enableCollisionDetection
void enableCollisionDetection(array< double >^ sensitivity, StopLevel behaviour, double fallback_compliance, [Out] ErrorCode^% ec)
设置碰撞检测相关参数, 打开碰撞检测功能。
rokae::clr::xMateRobot::calibrateFrame
FrameCalibrationResult calibrateFrame(FrameType type, List< array< double >^>^ points, bool is_held, array< double >^ base_aux, [Out] ErrorCode^% ec)
坐标系标定 (N点标定).
rokae::clr::xMateRobot::calcIk
array< double > calcIk(CartesianPosition^ posture, [Out] ErrorCode^% ec)
根据位姿计算逆解
rokae::clr::xMateRobot::setAvoidSingularity
void setAvoidSingularity(AvoidSingularityMethod method, bool enable, double limit, [Out] ErrorCode^% ec)
打开/关闭奇异点规避功能。只适用于部分机型: 四轴锁定支持xMateCR和xMateSR机型 牺牲姿态支持所有协作六轴机型 轴空间插补不支持
rokae::clr::xMateRobot::connectToRobot
void connectToRobot(String^ remoteIP)
建立与机器人的连接。
rokae::clr::xMateRobot::jointPos
array< double > jointPos([Out] ErrorCode^% ec)
机器人当前轴角度 [rad]
rokae::clr::xMateRobot::getAvoidSingularity
bool getAvoidSingularity(AvoidSingularityMethod method, [Out] ErrorCode^% ec)
查询是否处于规避奇异点的状态
rokae::clr::xMateRobot::connectToRobot
void connectToRobot([Out] ErrorCode^% ec)
连接到机器人。机器人地址为创建xMateRobot实例时传入的
rokae::clr::xMateRobot::xMateRobot
xMateRobot(String^ remoteIP)
创建机器人实例并建立连接
rokae::clr::xMateRobot::jointVel
array< double > jointVel([Out] ErrorCode^% ec)
机器人当前关节速度 [rad/s]
rokae::clr::xMateRobot::calcFk
CartesianPosition calcFk(array< double >^ joints, [Out] ErrorCode^% ec)
根据轴角度计算正解
rokae::clr::DragOpt::Space
Space
Definition: data_types_cli.hpp:189
rokae::clr::DragOpt::Type
Type
Definition: data_types_cli.hpp:195
rokae::clr::Info
机器人基本信息，在与建立机器人连接后加载
Definition: data_types_cli.hpp:254
rokae::clr::xPanelOpt::Vout
Vout
xPanel对外供电模式
Definition: data_types_cli.hpp:212