Skip to main content

lebai controller python sdk

Project description

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_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 Boost 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.4-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.4-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.4-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.4-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.4-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.4-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.4-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.4-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pylebai-1.1.4-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0dd234af79b96b5fc0afb6bee6be2d4698c73b5cf5d4ccf771da72a219208248
MD5 0bd736169a0aab1304703da78558a97f
BLAKE2b-256 6dbabf619611c5766eb648575766fa29000c67044a81ccb5b4da84d505479c2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.4-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 6ae3ef472217fc96c11cc36ba2303f832e57fd0dbea7fdedc7b317d05e76cb00
MD5 1f12885faeb9293334a4d7aeb4671b35
BLAKE2b-256 dd807331552d1d67f00174b9e0a7ac8eadc6cc0c7bc87ecd3d0f3f6b27955fe4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d18eb3bf7382e8e1ef64b486c6382084b83b56c1b41b4abfec9af2caf9f40b04
MD5 dab0d1842d41807e862654f4a489c2cd
BLAKE2b-256 639028fc4108e027619521fa96b71d9cf79b34c277fb2e671872acdc3dc7922b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 cf1a55730de919bb59da49ea504db314c5e839bff2dcb88f31a6d8b18c19a4eb
MD5 f35dfe54739a7f35675f3ce1bcb5a778
BLAKE2b-256 8256aa9f08464b6cde774c66549e28f5a37959fd7d2df4d53a669fe6b7fe46d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f28511e1f42ba46523450d4a9beaedc932372860d3ded596a83c527bfd6b0c58
MD5 4ff4ca06195e3e1034dc355a8447d9bb
BLAKE2b-256 da9343664ea87c2308e7b92b90e7a72069403191160630ff1c9273738b7bca21

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 b77b926256ebfb0f5f52ec4d798c221a2cc699eb8eeedc1c15243b675cb0f974
MD5 c81814ef9f630cd8a54428f97fdd91e3
BLAKE2b-256 c94cc74f1ea77cdb2df8e7d0c29b3795b3dba25c4fadbb39ac085d32b21d3151

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.4-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 54e3efc01ba734625fe7fc8cec456aee42a692c89d5f3bf283d304aebe388f2a
MD5 f660ea13c5a3add5a10d845e10543f55
BLAKE2b-256 d7b4cfa6dc4687b4ced70b5924a0aeeb64a69d5e31a377ba94b2daac3cdbb55b

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