Skip to content

Commit

Permalink
fix: 修正完善文档版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
liufang-robot committed Dec 21, 2022
1 parent ecbb4b9 commit 6444259
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 42 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

option(CMAKE_EXPORT_COMPILE_COMMANDS "Export compile command" TRUE)

project(lebai VERSION 1.0.8 LANGUAGES CXX)
project(lebai VERSION 1.0.9 LANGUAGES CXX)
set(PROJECT_NAMESPACE lebai)
message(STATUS "${PROJECT_NAME} version: ${PROJECT_VERSION}")
# message(STATUS "major: ${PROJECT_VERSION_MAJOR}")
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "lebai sdk"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.0.8
PROJECT_NUMBER = 1.0.9

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# TODO

## v1.0.8
## v1.0.9

- [x] SDK版本
- [x] 系统控制-reboot
Expand Down
6 changes: 6 additions & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLog

## 1.0.9

修正文档错误

修正rpc的逻辑错误,该逻辑错误导致rpc调用可能卡死的问题。

## 1.0.8

添加关节跟随运动的接口towardj
Expand Down
90 changes: 52 additions & 38 deletions sdk/include/lebai/robot.hh
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ namespace lebai
* \brief 机械臂状态相关的接口.
*/

/** \addtogroup IO Input and Output
* \brief IO相关的接口
/** \addtogroup IO 通用输入输出
* \brief 通用输入输出相关的接口
*/

/** \defgroup CLAW 夹爪.
Expand Down Expand Up @@ -394,7 +394,7 @@ namespace lebai
* 11 | 示教中 | 机器人处于示教模式中
* 12 | 已停止 | 机器人处于停止状态,非急停状态
*
* @note See state <a href="https://help.lebai.ltd/guide/basic.html#%E6%9C%BA%E5%99%A8%E4%BA%BA%E7%8A%B6%E6%80%81">here</a>.
* @note 查看 <a href="https://help.lebai.ltd/guide/basic.html#%E6%9C%BA%E5%99%A8%E4%BA%BA%E7%8A%B6%E6%80%81">具体信息</a>.
*/
int get_robot_mode();
/**
Expand Down Expand Up @@ -447,13 +447,13 @@ namespace lebai
/**
* @brief 获取机械臂关节当前反馈力矩
*
* @return * std::vector<double>
* @return 关节当前反馈力矩
*/
std::vector<double> get_actual_joint_torques();
/**
* @brief 获取机械臂关节当前控制力矩
*
* @return * std::vector<double>
* @return 关节当前控制力矩
*/
std::vector<double> get_target_joint_torques();

Expand All @@ -462,74 +462,88 @@ namespace lebai
* @{
*/
/**
* @brief 设置控制箱数字输出
*
* @brief 设置数字输出
* @param device 设备类型,以字符串形式传入,包括 `ROBOT`, `FLANGE`, `EXTRA`, `SHOULDER`, `FLANGE_BTN`
* 查看 <a href="https://help.lebai.ltd/sdk/io.html#io-%E8%AE%BE%E5%A4%87%E7%B1%BB%E5%9E%8B">详细信息</a>.
* @param pin 端口,从 0 开始
* @param value 待设置的值
*/
void set_do(std::string device, unsigned int pin, unsigned int value);
/**
* @brief 获取控制箱数字输出
*
* @brief 获取数字输出
* @param device 设备类型,以字符串形式传入,包括 `ROBOT`, `FLANGE`, `EXTRA`, `SHOULDER`, `FLANGE_BTN`
* 查看 <a href="https://help.lebai.ltd/sdk/io.html#io-%E8%AE%BE%E5%A4%87%E7%B1%BB%E5%9E%8B">详细信息</a>.
* @param pin 端口,从 0 开始
* @return 返回输入数值
* @return 返回数字输出数值
*/
unsigned int get_do(std::string device, unsigned int pin);
/**
* @brief 获取控制箱数字输出
*
* @param pin 端口,从 0 开始
* @return 返回输入数值
* @brief 获取多个数字输出
* @param device 设备类型,以字符串形式传入,包括 `ROBOT`, `FLANGE`, `EXTRA`, `SHOULDER`, `FLANGE_BTN`
* 查看 <a href="https://help.lebai.ltd/sdk/io.html#io-%E8%AE%BE%E5%A4%87%E7%B1%BB%E5%9E%8B">详细信息</a>.
* @param pin 起始数字输出端口,从 0 开始
* @param num 连续的数字输出个数
* @return 返回多个数字输出数值
*/
std::vector<unsigned int> get_dos(std::string device, unsigned int pin, unsigned int num);
/**
* @brief 获取控制箱数字输入
*
* @brief 获取数字输入
* @param device 设备类型,以字符串形式传入,包括 `ROBOT`, `FLANGE`, `EXTRA`, `SHOULDER`, `FLANGE_BTN`
* 查看 <a href="https://help.lebai.ltd/sdk/io.html#io-%E8%AE%BE%E5%A4%87%E7%B1%BB%E5%9E%8B">详细信息</a>.
* @param pin 端口,从 0 开始
* @return 返回输入数值
*/
unsigned int get_di(std::string device, unsigned int pin);
/**
* @brief 获取控制箱数字输入
*
* @param pin 端口,从 0 开始
* @return 返回输入数值
* @brief 获取多个数字输入
* @param device 设备类型,以字符串形式传入,包括 `ROBOT`, `FLANGE`, `EXTRA`, `SHOULDER`, `FLANGE_BTN`
* 查看 <a href="https://help.lebai.ltd/sdk/io.html#io-%E8%AE%BE%E5%A4%87%E7%B1%BB%E5%9E%8B">详细信息</a>.
* @param pin 起始数字输入端口,从 0 开始
* @param num 连续的数字输入个数
* @return 返回多个数字输入
*/
std::vector<unsigned int> get_dis(std::string device, unsigned int pin, unsigned int num);

/**
* @brief 设置控制箱数字输出
*
* @param pin: 端口,从 0 开始
* @param value: 待设置的值
* @brief 设置模拟输出
* @param device 设备类型,以字符串形式传入,包括 `ROBOT`, `FLANGE`, `EXTRA`, `SHOULDER`, `FLANGE_BTN`
* 查看 <a href="https://help.lebai.ltd/sdk/io.html#io-%E8%AE%BE%E5%A4%87%E7%B1%BB%E5%9E%8B">详细信息</a>.
* @param pin: 模拟输出端口,从 0 开始
* @param value: 待设置的模拟输出值
*/
void set_ao(std::string device, unsigned int pin, double value);
/**
* @brief 获取控制箱模拟输入
*
* @brief 获取模拟输出
* @param device 设备类型,以字符串形式传入,包括 `ROBOT`, `FLANGE`, `EXTRA`, `SHOULDER`, `FLANGE_BTN`
* 查看 <a href="https://help.lebai.ltd/sdk/io.html#io-%E8%AE%BE%E5%A4%87%E7%B1%BB%E5%9E%8B">详细信息</a>.
* @param pin: 端口,从 0 开始
* @return 返回输入数值
* @return 返回模拟输入数值
*/
double get_ao(std::string device, unsigned int pin);
/**
* @brief 获取控制箱模拟输入
*
* @param pin: 端口,从 0 开始
* @return 返回输入数值
* @brief 获取多个模拟输出
* @param device 设备类型,以字符串形式传入,包括 `ROBOT`, `FLANGE`, `EXTRA`, `SHOULDER`, `FLANGE_BTN`
* 查看 <a href="https://help.lebai.ltd/sdk/io.html#io-%E8%AE%BE%E5%A4%87%E7%B1%BB%E5%9E%8B">详细信息</a>.
* @param pin: 起始模拟输出端口,从 0 开始
* @param num 连续的模拟输出个数
* @return 返回模拟输出数值
*/
std::vector<double> get_aos(std::string device, unsigned int pin, unsigned int num);
/**
* @brief 获取控制箱模拟输入
*
* @brief 获取模拟输入
* @param device 设备类型,以字符串形式传入,包括 `ROBOT`, `FLANGE`, `EXTRA`, `SHOULDER`, `FLANGE_BTN`
* 查看 <a href="https://help.lebai.ltd/sdk/io.html#io-%E8%AE%BE%E5%A4%87%E7%B1%BB%E5%9E%8B">详细信息</a>.
* @param pin: 端口,从 0 开始
* @return 返回输入数值
* @return 返回模拟输入数值
*/
double get_ai(std::string device, unsigned int pin);
/**
* @brief 获取控制箱模拟输入
*
* @param pin: 端口,从 0 开始
* @return 返回输入数值
* @brief 获取多个模拟输入
* @param device 设备类型,以字符串形式传入,包括 `ROBOT`, `FLANGE`, `EXTRA`, `SHOULDER`, `FLANGE_BTN`
* 查看 <a href="https://help.lebai.ltd/sdk/io.html#io-%E8%AE%BE%E5%A4%87%E7%B1%BB%E5%9E%8B">详细信息</a>.
* @param pin: 起始模拟输入端口,从 0 开始
* @param num 连续的模拟输入个数
* @return 返回多个模拟输入数值
*/
std::vector<double> get_ais(std::string device, unsigned int pin, unsigned int num);
/** @}*/
Expand Down
6 changes: 5 additions & 1 deletion sdk/test/test_robot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,11 @@ namespace lebai
robot_.get_di("EXTRA", 0);
robot_.set_do("EXTRA", 0, static_cast<unsigned int>(1));
robot_.get_ai("EXTRA", 0);
robot_.set_ao("EXTRA", 0, 0.0);
robot_.set_ao("EXTRA", 0, 0.0);
for(unsigned int i = 0; i < 100; ++i)
{
robot_.get_di("EXTRA", 0);
}
}
TEST_F(RobotTest, TestClaw)
{
Expand Down

0 comments on commit 6444259

Please sign in to comment.