add auborobot

This commit is contained in:
linbo 2025-11-25 11:10:28 +08:00
parent f8f940e8c8
commit 1f94a92947
3 changed files with 4 additions and 11 deletions

View File

@ -70,7 +70,7 @@
</CanManger> </CanManger>
</Humanoid> </Humanoid>
<AuboRobot id="hc02" ip="127.0.0.1" username="aubo" password="123456"> <AuboRobot id="hc02" ip="127.0.0.1" port="30004" username="aubo" password="123456">
</AuboRobot> </AuboRobot>
</Robot> </Robot>

View File

@ -33,6 +33,7 @@ namespace cmvr::device
private: private:
static void waitForRobotMode(const RobotInterfacePtr& robot_interface, static void waitForRobotMode(const RobotInterfacePtr& robot_interface,
const RobotModeType& target_mode); const RobotModeType& target_mode);
static int waitArrival(const RobotInterfacePtr& impl);
private: private:
std::string ip_; std::string ip_;
int port_; int port_;

View File

@ -163,14 +163,6 @@ void AuboRobot<DOF>::moveJ(std::vector<JointPoint>& cmd, double vel, double acc)
// 接口调用: 设置机械臂的速度比率 // 接口调用: 设置机械臂的速度比率
robot_interface->getMotionControl()->setSpeedFraction(0.3); robot_interface->getMotionControl()->setSpeedFraction(0.3);
/*
* 1
* 2
* 3
* 4
* 5
*/
// 接口调用: 关节运动 // 接口调用: 关节运动
// 关节角,单位: 弧度 (此处为6关节) // 关节角,单位: 弧度 (此处为6关节)
std::vector<double> joint_angle; std::vector<double> joint_angle;
@ -210,8 +202,8 @@ std::vector<double> AuboRobot<DOF>::ik(const std::string &base_link, const std::
return ik; return ik;
} }
// 实现阻塞功能: 当机械臂运动到目标路点时,程序再往下执行 template<int DOF>
int waitArrival(RobotInterfacePtr impl) { int AuboRobot<DOF>::waitArrival(const RobotInterfacePtr& impl) {
const int max_retry_count = 5; const int max_retry_count = 5;
int cnt = 0; int cnt = 0;