Skip to content

Commit

Permalink
feat: is_down (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cosmoflips authored Apr 14, 2023
1 parent 1c68b3c commit b70ae1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sdk/include/lebai/robot.hh
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,12 @@ namespace lebai
* @return 是否已断开连接
*/
bool is_disconnected();
/**
* @brief 手臂是否已下电
*
* @return 是否已下电
*/
bool is_down();
/**
* @brief 获取机械臂关节当前反馈位置
*
Expand Down
5 changes: 5 additions & 0 deletions sdk/src/robot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,11 @@ bool Robot::is_disconnected()
return impl_->getRobotState() == 0;
}

bool Robot::is_down()
{
return impl_->getRobotState() < 4;
}

std::vector<double> Robot::get_actual_joint_positions()
{
std::map<std::string, double> ret;
Expand Down

0 comments on commit b70ae1e

Please sign in to comment.