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.3-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.3-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.3-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.3-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.3-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.3-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.3-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.3-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for pylebai-1.1.3-pp38-pypy38_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 73897101f4992793d8c1b31caa1049361721bc0b1a94d95ba725380fc537f894
MD5 b462772c1a94c346fee9fa7222e479f6
BLAKE2b-256 0b91c1bbd192a8bf9ad0f267642daf7c277bbd14103b3ae9a091afd34299082d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.3-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1fe348b290e0822aef028f1bc38915540e32e5bcf9321f7a7f53cbdf9067e4a1
MD5 c710d0fa48ab158b780218f58d7ae43e
BLAKE2b-256 bea1b301397e9401986c26cf9dfc17fb13e6e9d225ee1a2b0ee4899cb5e5d6ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.3-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 03ab1c6fd57e6d3c0ad7c1798ee64a345a4f8fe9872fbcd1fae15b7a75d0f467
MD5 6cda2d8902e58435d55b15a402bd681d
BLAKE2b-256 3d1103853a80320c91db030f4a9046eff471369b44ad8654555352b688fa45e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.3-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c9e0ce0a00b114043936c35c90539f77c550ad68ac5bb14f1ff0b6c1f773e033
MD5 f16ea660ab7ef09e8664c23ebeda2cb1
BLAKE2b-256 8a8772e86426c2469959f3fab92fd65da09850244408233289e10c34844507f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 441b30043be7175f44435a037562ddb593ce3e743da7cd86ee89f9b70fa7db42
MD5 faafdedade32ec2f5c461dc161efec3a
BLAKE2b-256 5fa8197b5a463efe598faad9e451659298a4cf6f16c32c226af329a9b418a607

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a6e402dffc4b957107b1b54a0d2a0a69e93a1ab89376e6ef44b2dd3b360f3df7
MD5 7b2a12ea060752c7062cf364a3872a7c
BLAKE2b-256 d124df7a33bf5ff875035e57b4e6e2492dca462700b90d0d920622ce8afe6c8f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pylebai-1.1.3-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 c825575f6434a1564164069e91b376c30bfeba6ee7c4fa2d96cab6e66d7587d3
MD5 10dacad6baa377c969e3cd4acae01fe4
BLAKE2b-256 ed71485dcb2226f3130822a5452150da823f9bdc7516765cee2c3e708fcfe0ca

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