No project description provided
Project description
async def future():
from robusdk import robusdk, Logger, Sequence, Coroutine, Awaitable
Client = await robusdk(
url='http://192.168.192.168:6680/',
username='admin',
password='elite2014',
)
rpc = Client('RPC')
pipeline = Client('PIPELINE')
options = {'repeat': 4, 'delay': 1000}
Logger.info(await anext(rpc.get_joint_pos()))
Logger.info(await anext(pipeline.machinePos()))
async for result in rpc.get_joint_pos():
Logger.info(result)
async for result in pipeline.machinePos():
Logger.info(result)
Logger.info(await Coroutine([
Sequence(lambda: rpc.get_joint_pos(), Logger.debug, Logger.error, options),
Sequence(lambda: pipeline.machinePos(), Logger.debug, Logger.error, options),
Sequence(lambda: pipeline.motorSpeed(), Logger.debug, Logger.error, options),
]))
Logger.info(await Coroutine([
*list(map(lambda addr: Sequence(lambda: rpc.getSysVarP(addr=addr), Logger.debug, Logger.error, options), range(4))),
*list(map(lambda addr: Sequence(lambda: rpc.getSysVarB(addr=addr), Logger.debug, Logger.error, options), range(4))),
]))
Logger.info(await Coroutine([
Awaitable(lambda: pipeline(['machinePos', 'machinePose']), Logger.info, Logger.error),
]))
from asyncio import run
run(future())
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
robusdk-0.4.7.tar.gz
(13.7 kB
view details)
File details
Details for the file robusdk-0.4.7.tar.gz.
File metadata
- Download URL: robusdk-0.4.7.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d8032db9749143e2a677a81c3670fe0334ce6e39d506d05aa0785328ca4f6c8
|
|
| MD5 |
9e1d3fef7ac8b1726ca271690ad07e30
|
|
| BLAKE2b-256 |
3956329e33c52bbcdba477aab73ab30ce730eb6fcffed87b70e48358a12a4f56
|