diff --git a/config/cabin_robot.xml b/config/cabin_robot.xml index 22de6619..999536e0 100644 --- a/config/cabin_robot.xml +++ b/config/cabin_robot.xml @@ -70,7 +70,7 @@ - + diff --git a/src/devices/robot/aubo_robot/include/aubo_robot.h b/src/devices/robot/aubo_robot/include/aubo_robot.h index 83d4dc9f..777ba1cc 100644 --- a/src/devices/robot/aubo_robot/include/aubo_robot.h +++ b/src/devices/robot/aubo_robot/include/aubo_robot.h @@ -33,6 +33,7 @@ namespace cmvr::device private: static void waitForRobotMode(const RobotInterfacePtr& robot_interface, const RobotModeType& target_mode); + static int waitArrival(const RobotInterfacePtr& impl); private: std::string ip_; int port_; diff --git a/src/devices/robot/aubo_robot/src/aubo_robot.cpp b/src/devices/robot/aubo_robot/src/aubo_robot.cpp index 79c3a52b..797f0183 100644 --- a/src/devices/robot/aubo_robot/src/aubo_robot.cpp +++ b/src/devices/robot/aubo_robot/src/aubo_robot.cpp @@ -163,14 +163,6 @@ void AuboRobot::moveJ(std::vector& cmd, double vel, double acc) // 接口调用: 设置机械臂的速度比率 robot_interface->getMotionControl()->setSpeedFraction(0.3); - - /* - * 1、严格遵守公司安全规章制度,严格遵守相关的国家安全规章制度,发现隐患及时上报 - * 2、工作前按规定佩戴安全保护工具 - * 3、定期检查存在安全隐患的设备 - * 4、积极参与公司组织的安全培训 - * 5、在进行危险工作过程中相互监查,安全作业 - */ // 接口调用: 关节运动 // 关节角,单位: 弧度 (此处为6关节) std::vector joint_angle; @@ -210,8 +202,8 @@ std::vector AuboRobot::ik(const std::string &base_link, const std:: return ik; } -// 实现阻塞功能: 当机械臂运动到目标路点时,程序再往下执行 -int waitArrival(RobotInterfacePtr impl) { +template +int AuboRobot::waitArrival(const RobotInterfacePtr& impl) { const int max_retry_count = 5; int cnt = 0;