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>
</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>
</Robot>

View File

@ -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_;

View File

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