Skip to main content

Lebai Robot Python SDK

Project description

乐白机器人 Python SDK

使用说明

pip install lebai

API文档

提供基于 async/await 的异步 API。

安装依赖(Python 3.7+):

pip install grpcio asyncio protobuf

示例:

import asyncio

from lebai import LebaiRobot, CartesianPose, JointPose

async def run():
    rb = LebaiRobot("192.168.3.218")

    await rb.start_sys()

    await rb.movej(JointPose(0, -0.5, math.pi/6, 0, 0, 0), 0, 0, 1, 0)

    p2 = CartesianPose(0.1, 0.2, 0, 0, 0, 0, base=base)
    await rb.movel(p2, 0, 0, 2, 0)

    print(await rb.get_actual_tcp_pose())

    await rb.stop_sys()

if __name__ == '__main__':
    asyncio.run(run())

安装 Python 和 pip

例如在 Ubuntu 下:

sudo apt install python3 python3-pip

查看 Python 版本:

python --version

如果 Python 版本小于 3.7:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.9 python3.9-distutils

如果 Python 环境配置有问题:

sudo ln -sf /usr/bin/python3.9 /usr/bin/python3
sudo ln -sf /usr/bin/python3 /usr/bin/python
sudo ln -sf /usr/bin/pip3 /usr/bin/pip
python -m pip install --upgrade pip setuptools wheel

开发人员指南

安装项目依赖

安装依赖:

pip install -r requirements.txt

运行

GRPC_TRACE=all GRPC_VERBOSITY=debug ./main.py

构建和发布

python -m pip install --user pipenv
python3 -m pip install --user --upgrade setuptools wheel twine
python3 setup.py sdist bdist_wheel
python3 -m twine upload --repository testpypi dist/*

python3 -m twine upload --repository pypi dist/*

从 PyPI 安装

python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps lebai

pip install lebai

Project details


Download files

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

Source Distribution

lebai-0.1.3.tar.gz (60.6 kB view details)

Uploaded Source

Built Distribution

lebai-0.1.3-py3-none-any.whl (63.8 kB view details)

Uploaded Python 3

File details

Details for the file lebai-0.1.3.tar.gz.

File metadata

  • Download URL: lebai-0.1.3.tar.gz
  • Upload date:
  • Size: 60.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5

File hashes

Hashes for lebai-0.1.3.tar.gz
Algorithm Hash digest
SHA256 619e0cbff897010c582b015da894499bda5e3e8ba7913820dd57bd828960fad6
MD5 144cc0ca3e11541a92857372683d7528
BLAKE2b-256 d8127e65b70adced7dbcb928f7a7b505f774dafefb7fbbf1d947d8941e7f7c23

See more details on using hashes here.

File details

Details for the file lebai-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: lebai-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 63.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.5

File hashes

Hashes for lebai-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 83657b84cce1bae2e0208a532e2168c6b18c7c488c04551a6b52044e93cbe4f4
MD5 16d70a8833900e10c7a68a4f32f5958c
BLAKE2b-256 19185871a1e8553ae76ed7488881a7ae6acb87552e2990405ccf6d9da63038c3

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