diff --git a/sdk/include/lebai/robot.hh b/sdk/include/lebai/robot.hh index 32da580..b068e5f 100644 --- a/sdk/include/lebai/robot.hh +++ b/sdk/include/lebai/robot.hh @@ -407,6 +407,12 @@ namespace lebai * @return 是否已断开连接 */ bool is_disconnected(); + /** + * @brief 手臂是否已下电 + * + * @return 是否已下电 + */ + bool is_down(); /** * @brief 获取机械臂关节当前反馈位置 * diff --git a/sdk/src/robot.cc b/sdk/src/robot.cc index 4c45e17..4ed9313 100644 --- a/sdk/src/robot.cc +++ b/sdk/src/robot.cc @@ -454,6 +454,11 @@ bool Robot::is_disconnected() return impl_->getRobotState() == 0; } +bool Robot::is_down() +{ + return impl_->getRobotState() < 4; +} + std::vector Robot::get_actual_joint_positions() { std::map ret;