Skip to main content

lebai controller python sdk

Project description

Languages

zh en

lebai-sdk的源代码仓库,可以用于控制乐白机械臂.

OS C++ Python C# Java
Linux Status Status Status TODO
Windows TODO TODO Status TODO

上图中显示TODO的地方表示该平台该语言的实现还存在问题,没有完全测试通过,后续会陆续完成。

SDK使用需要乐白机械臂的控制器软件版本大于等于3.1.5,您可以在机械臂WEB界面左上方查看当前版本号.

SDK在线文档中包含了lua语言的接口(本项目参考了lua语言进行接口设置,但是本项目和lua语言的接口无直接关系)

包管理直接安装

python

python开发可以直接从PyPI安装.

目前python仅支持linux平台,windows平台还存在问题.

pip install pylebai

目前支持的Python版本有

  • 3.6
  • 3.7
  • 3.8
  • 3.9
  • 3.10

python开发可以直接从PyPI安装.

.net

.net平台开发可以直接从Nuget安装,使用C#进行开发.

dotnet add package lebai

目前支持的.net版本有

  • 6.0

从源代码构建安装

Ubuntu&&Debian平台

依赖

  • gcc or clang support c++14
  • cmake >= 3.18
  • swig >= 4.0
  • python3 >= 3.5 (可选,如果需要生成python的接口库)
  • doxygen (可选,如果需要C++文档)
  • jdk, maven(可选,如果需要生成java的接口库)

相对旧的发行版系统cmake和swig版本过低,不能使用,可以通过pip安装较新的版本:

sudo apt install build-essential python3-pip dpkg-dev
sudo pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
# 如果需要生成文档,还需要安装doxygen
sudo apt install doxygen graphviz
# 如果需要生成python3的wrapper包
sudo apt install python3-dev python3-setuptools
# 如果需要生成python2的wrapper包
sudo apt install python-dev python-setuptools

编译

# 生成编译配置
cmake -S. -Bbuild -DBUILD_PYTHON=ON -DBUILD_DEB=ON -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF
# 生成编译配置,只C++,同时生成DEB包
cmake -S. -Bbuild -DBUILD_PYTHON=OFF -DBUILD_DEB=ON -DBUILD_TESTING=OFF 
# 编译
cmake --build build
# 运行单元测试
cmake --build build --target test
## 生成DEB包
cd build
cpack

Windows平台 Visual Studio

依赖

  • Visual Studio(C++ Support)
  • CMake >= 3.18
  • python3 >= 3.5 (可选,如果需要生成python的接口库)

安装python库时,选择 Download debug binaries

在Visual Studio中载入CMake工程,即可以生成构建运行测试等.

目前Windows平台下python的binding部分还存在问题无法工作.

编译选项

  • BUILD_PYTHON: 是否编译python3接口 默认为OFF
  • BUILD_PYTHON2: 是否编译python2接口 默认为OFF
  • PYTHONPATH: PYTHON的安装目录
  • BUILD_DOTNET: 是否编译.NET接口 默认为OFF(请先安装好.NET的开发环境)
  • BUILD_JAVA: 是否编译JAVA接口 默认为OFF(请先安装好JDK和Maven)
  • BUILD_TESTING: 是否编译C++测试程序 默认为ON
  • TEST_ROBOT_IP: 测试程序的机器人IP地址,正确的设置该值用于单元测试 默认为127.0.0.1
  • BUILD_EXAMPLES: 是否编译示例程序 默认为ON
  • BUILD_DEB: 是否生成DEB包的构建 默认为OFF
  • ENABLE_TSAN: 编译是否启用Thread sanitizer检查 默认为OFF

使用

您可以通过docs目录下的文档了解更多各语言的信息.

Python

build目录下会生成python的whl包,可以直接使用:

cd build/python/dist
## 安装
pip3 install pylebai-xxx.whl
### XXX取决于您的sdk版本,python版本,操作系统平台.
## 卸载
pip3 uninstall pylebai

第三方库

lebai-sdk使用如下第三方软件:

软件名 协议 官方网站
Asio MPL2 https://think-async.com/Asio/
rapidjson MIT https://rapidjson.org/
websocketpp BSD https://www.zaphoyd.com/websocketpp
mdns public domain https://github.com/mjansson/mdns

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pylebai-1.1.8-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.0 MB view details)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

pylebai-1.1.8-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.0 MB view details)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

pylebai-1.1.8-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

pylebai-1.1.8-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

pylebai-1.1.8-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

pylebai-1.1.8-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

pylebai-1.1.8-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

File details

Details for the file pylebai-1.1.8-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pylebai-1.1.8-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c5743175b89d05ad92af456209c6b6ac0dc1d68e3ec7804e7ff0c8f8319059c7
MD5 4753ad3b88eb8b5b5137d22c7bb9cf69
BLAKE2b-256 a511ad03e061dfc30128cd769a14c8e0713bf3e5361d0195c39d2245011fd32a

See more details on using hashes here.

File details

Details for the file pylebai-1.1.8-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pylebai-1.1.8-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1ac8fbff39e5e7279d0bb73b6d0feb41d1faec7e3e82d09b6af656eaf4511604
MD5 48f89d02eda8ec1a5518db5f1eee898c
BLAKE2b-256 a425f2b3b2ac962835e2b8c2560e5c85a1325d68a6b0f4c74ecb6d1c78d3d8bf

See more details on using hashes here.

File details

Details for the file pylebai-1.1.8-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pylebai-1.1.8-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9ef58b0e6bcec038e3e1a6ce6b04035cd3c043f4a34c996ba2a89ef8ec0ed4de
MD5 6a9f2608817c86f539d6d8eff3e75ee0
BLAKE2b-256 cf5361c82e20c3c973e94f12f9c21b5a352e751a52335789a707d0060a7f8eba

See more details on using hashes here.

File details

Details for the file pylebai-1.1.8-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pylebai-1.1.8-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f9f689a9be73ee7f2bd0f554e3bef597ad455b65049c5c888e173c499772ebcd
MD5 c75ea09c792598b36e70b610e0856ed6
BLAKE2b-256 62b0b16229a50081af6e6a830b2d43c1b148d50ed72099d81ab6263af03f8481

See more details on using hashes here.

File details

Details for the file pylebai-1.1.8-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pylebai-1.1.8-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 bca0a0ada0193ad922abdacd05b4fce1a35c2f2618cbda59de8c44e2d54e376a
MD5 bdecdb52731eafc3fc4dd2b9f84289ed
BLAKE2b-256 eb2b65878fd6b786e7019729bee7d12b100b1f9889bcc520e7bb5860931ede9c

See more details on using hashes here.

File details

Details for the file pylebai-1.1.8-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pylebai-1.1.8-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 43bb8522260e8840b5516ab2b652a78d71c97f527bab2094df2351aadb94065e
MD5 97e635f4a0be6460cfad1e0f1aaccb1e
BLAKE2b-256 93a2433681cdaa6330a8ad373b1ad6e7ffa6dfae350588dbe6debeac65724cb7

See more details on using hashes here.

File details

Details for the file pylebai-1.1.8-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pylebai-1.1.8-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 66af9da61b9a55ab23934052863fa0cf7f6f873e27a068fe45393ff0bf2f1257
MD5 b77faea671f57eb944cd734bdff1d378
BLAKE2b-256 14bd546426330cd49627a9d0030defdbedb798ca9f6295ae23775a463aa935de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page