Skip to content

Commit

Permalink
1.1.8版本prerelease (#55)
Browse files Browse the repository at this point in the history
* feat: 添加LuaRobot,和机械臂采用luasocket通讯

* fix: 移除调试注释

* fix: 修正dotnet上传nuget的bug。

* fix: 修正dotnet release版本问题

* feat: 添加speedl和speedj的支持,完善文档

* fix: 修正合并错误

* fix: 更新版本号

* feat: README多语言的框架

* fix: readme错误修正

* fix: 更新版本号

* fix: 修正github action 的问题

* feat: 修正文档错误

* fix: update pip

* update linux_python_build.yml

* fix: 修正依赖问题

* fix: 修正依赖问题

* feat: 添加speedl支持reference坐标系

* fix: 版本->1.1.8
  • Loading branch information
liufang-robot authored Oct 27, 2023
1 parent 11b8570 commit a60d599
Show file tree
Hide file tree
Showing 13 changed files with 230 additions and 90 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
option(CMAKE_EXPORT_COMPILE_COMMANDS "Export compile command" TRUE)


project(lebai VERSION 1.1.7 LANGUAGES CXX)
project(lebai VERSION 1.1.8 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.1.7
PROJECT_NUMBER = 1.1.8

# 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
8 changes: 8 additions & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ChangeLog

## 1.1.8

speedl添加参考坐标系

修正.net包描述问题

修正注释和文档的一些bug

## 1.1.7

README添加多语言支持
Expand Down
2 changes: 1 addition & 1 deletion dotnet/lebai.runtime.csproj.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Version>@PROJECT_VERSION@</Version>

<!-- Nuget Properties -->
<Description>.NET native wrapper for the CMakeSwig project</Description>
<Description>.NET native wrapper for the Lebai SDK</Description>
<IncludeBuildOutput>false</IncludeBuildOutput>

<!-- Pack Option -->
Expand Down
56 changes: 56 additions & 0 deletions examples/example_speedl.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* Copyright 2022 lebai.ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include <iostream>
#include <chrono>
#include <thread>
#include <cmath>
#include <lebai/robot.hh>


int main(int argc, char ** argv)
{
if(argc < 2)
{
std::cerr<<"You must specify the IP address of the robot"<<std::endl;
std::cerr<<"Execute example as follow:"<<std::endl;
std::cerr<<"./example 192.168.1.200 sim"<<std::endl;
return 0;
}
std::string ip = argv[1];
bool sim = false;
if(argc > 2)
{
std::string sim_str = argv[2];
if(sim_str == "sim")
{
sim = true;
}
}
std::cout<<"Connecting to robot at "<<ip<<std::endl;
std::cout<<"Connecting for simulation mode is "<<sim<<std::endl;
// Create robot instance
lebai::l_master::Robot robot(ip, sim);
std::this_thread::sleep_for(std::chrono::seconds(1));
robot.movej({0.0/ 180.0 * M_PI, -45.0/ 180.0 * M_PI, 90.0/ 180.0 * M_PI, -45/ 180.0 * M_PI, 90.0/ 180.0 * M_PI, 0.0/ 180.0 * M_PI}, 1.0, 0.5, 0.0, 0.0);
robot.wait_move();
lebai::l_master::CartesianPose dir = {{"x", 0.05}, {"y", 0.0}, {"z", 0.0}, {"rx", 0.0}, {"ry", 0.0}, {"rz", 0.0}};
auto tcp = robot.get_target_tcp_pose();
robot.speedl(1.0, dir, 2.0, tcp);
std::this_thread::sleep_for(std::chrono::seconds(2));
robot.stop_move();
return 0;
}
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
swig==4.0.2
cmake==3.18.2
readme-renderer==34.0
11 changes: 5 additions & 6 deletions sdk/include/lebai/lebai.hh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
*
* # ChangeLog
* 查阅 \ref doc/changelog.md.
*
*
*
* # Python
* 查看 \ref doc/python.md 来获取使用python开发相关的内容.
*
* # .net
* 查看 \ref doc/dotnet.md 来获取在.net中使用C#开发相关的内容.
*
* 查看 \ref doc/dotnet.md 来获取在.net中使用C\#开发相关的内容.
*
* # Develop
* 如果需要开发sdk,添加新的功能,可以参考 \ref doc/develop.md.
*
Expand All @@ -33,7 +32,7 @@
*
* 界面显示的Rz,Ry,Rx为角度,将其转换为弧度后,它和旋转矩阵的关系如下:
*
* @f$RotationMatrix = \begin{bmatrix}
* \f$RotationMatrix = \begin{bmatrix}
* \cos(Rz) & -sin(Rz) & 0 \\
* sin(Rz) & cos(Rz) & 0\\
* 0 & 0 & 1
Expand All @@ -45,6 +44,6 @@
* 1 & 0 & 0 \\
* 0 & cos(Rx) & -sin(Rx) \\
* 0 & sin(Rx) & cos(Rx)
* \end{bmatrix}@f$
* \end{bmatrix}\f$
*/

35 changes: 20 additions & 15 deletions sdk/include/lebai/robot.hh
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ namespace lebai
{
DoubleVector joint_positions; /*!< 机械臂关节位置的map数据,应当包括'j1','j2','j3','j4','j5','j6'六个关节的角度值. */
bool ok = false; /*!< 计算是否成功 */
};
};




/**
Expand Down Expand Up @@ -183,13 +182,13 @@ namespace lebai
*/
void start_sys();
/**
* @brief 停止机械臂(机械臂上使能).
* @brief 停止机械臂(机械臂下使能).
*
*/

void stop_sys();
/**
* @brief 关闭机器人电源(关机.
* @brief 关闭机器人电源(关机.
*
*/
void powerdown();
Expand Down Expand Up @@ -361,10 +360,11 @@ namespace lebai
* @param[in] a 加速度.
* @param[in] v 速度矢量
* @param[in] t: 运动时间,默认t = 0,一直运动到限位.
* @param[in] reference: 参考坐标系,默认为零.
* @return >0 发送成功.返回运动号
* @return <=0 发送失败.
*/
int speedl(double a, const CartesianPose & v, double t = 0.0);
int speedl(double a, const CartesianPose & v, double t = 0.0, const CartesianPose & reference = {{"x", 0.0}, {"y", 0.0}, {"z", 0.0}, {"rx", 0.0}, {"ry", 0.0}, {"rz", 0.0}});
/**
* 示例代码:
*
Expand Down Expand Up @@ -715,11 +715,13 @@ namespace lebai
/**
* @brief 调用场景
*
* @param name: 调用场景的名字
* @param is_main: 是否以主任务方式运行(主任务会排队执行,子任务会并发执行)
* @param loop_to: 循环次数(默认0永久循环)
* @param dir: 调用场景所在的文件夹名
* @param params: 其他参数
* @param name 调用场景的名字
* @param params 其他参数
* @param dir 调用场景所在的文件夹名
* @param is_parallel 是否并行
* @param loop_to 循环次数(默认0永久循环)
*
*
*/
unsigned int start_task(const std::string &name,const std::vector<std::string> & params,const std::string & dir, bool is_parallel,unsigned int loop_to);
/**
Expand All @@ -740,6 +742,10 @@ namespace lebai
* @param wait: 是否等待
*/
void pause_task(unsigned int id,unsigned long time,bool wait);
/**
* @brief 暂停任务与运动
* @param id: 任务的ID
*/
void pause_task(unsigned int id);
/**
* @brief 恢复任务与运动
Expand Down Expand Up @@ -917,18 +923,17 @@ namespace lebai
*/
void set_payload(double mass, std::map<std::string, double> cog);
/**
* @brief 设置机器人末端负载.
* @brief 设置机器人末端负载质量.
*
* @param mass 末端负载的质量(kg).
*/
void set_payload(double mass);
void set_payload_mass(double mass);
/**
* @brief 设置机器人末端负载.
* @brief 设置机器人末端负载重心.
*
* @param mass 末端负载的质量(kg).
* @param cog 质心相对于TCP坐标系的偏移.
*/
void set_payload(std::map<std::string, double> cog);
void set_payload_cog(std::map<std::string, double> cog);
/**
* @brief 获取末端负载设置.
*
Expand Down
Loading

0 comments on commit a60d599

Please sign in to comment.