Skip to main content

SDK for the Automata Eva robotic arm

Project description

Eva Python SDK

The Eva Python SDK provides convenient access to the Automata Eva API from applications written in Python 3.

* This SDK is currently in beta

Installation

Requires Python 3, not compatible with Python 2

Pip

Make sure you have Python3 and pip installed, then run the following command for the latest compatible 1.x.x:

$ pip install evasdk~=1.0.0

Pipenv

Make sure you have Python3 and Pipenv installed, then run the following command for the latest compatible 1.x.x:

$ pipenv install evasdk~=1.0.0

Detailed Instructions

If you're not familiar with Python or for more detailed instructions please refer to our wiki:

Examples

The Eva object allows you to directly control an Eva robot. It provides lots of useful helper function for interacting with the robot.

Eva

Connecting

host = '<your_eva_IP_here>'
token = '<your_token_here>'

eva = Eva(host, token)

GoTo movement

eva = Eva(host_ip, token)

with eva.lock():
    eva.control_wait_for_ready()
    eva.control_go_to([0, 0, 0, 0, 0, 0])

Toolpath create and run

toolpath = {
    "metadata":{
        "default_velocity":0.7,
        "next_label_id":5,
        "analog_modes":{ "i0":"voltage", "i1":"voltage", "o0":"voltage", "o1":"voltage" }
    },
    "waypoints":[
        { "joints":[-0.68147224, 0.3648368, -1.0703622, 9.354615e-05, -2.4358354, -0.6813218], "label_id":3 },
        { "joints":[-0.6350288, 0.25192022, -1.0664424, 0.030407501, -2.2955494, -0.615318], "label_id":2 },
        { "joints":[-0.13414459, 0.5361486, -1.280493, -6.992453e-08, -2.3972468, -0.13414553], "label_id":1 },
        { "joints":[-0.4103904, 0.33332264, -1.5417944, -5.380291e-06, -1.9328799, -0.41031334], "label_id":4 }
    ],
    "timeline":[
        { "type":"home", "waypoint_id":2 },
        { "type":"trajectory", "trajectory":"joint_space", "waypoint_id":1 },
        { "type":"trajectory", "trajectory":"joint_space", "waypoint_id":0 },
        { "type":"trajectory", "trajectory":"joint_space", "waypoint_id":2 }
    ]
}

eva = Eva(host, token)

with eva.lock():
    eva.control_wait_for_ready()
    eva.toolpaths_use(toolpath)
    eva.control_home()
    eva.control_run(loop=1)

Please refer to the examples directory for more SDK usage examples.

evasdk.eva_http and evasdk.eva_ws

These can be used to interact directly with the HTTP and Websocket APIs. Useful when you don't want the managed websocket connection provided by the evasdk.Eva object.

Versioning

To determine which version of the SDK works with your Eva's software version number (found on the Choreograph config page), please use the following chart:

SDK Version Supported Eva Version
1.x.x 2.0.0 - 2.1.2
2.x.x 3.x.x

For more information on how to install a particular version of the SDK, please refer to the Installation section. We use the Semver version numbering stratergy.

Logging

The SDK uses Debug and Error level logging exclusively. Each Eva instance will log using the name evasdk.Eva:<host_name_here>. If you wish to enable the debug logging:

logging.basicConfig(level=logging.DEBUG)

Bugs and feature requests

Please raise any bugs or feature requests as a Github issues. We also gratefully accept pull requests for features and bug fixes.

Testing

$ pipenv shell
$ python -m pytest evasdk/<name-of-file-to-test> 

License

This code is free to use under the terms of the Apache 2 license. Please refer to LICENSE for more information.

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

evasdk-1.0.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evasdk-1.0.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file evasdk-1.0.0.tar.gz.

File metadata

  • Download URL: evasdk-1.0.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.7

File hashes

Hashes for evasdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a7c4c4bc48e53269d97540d044927c130938ec0d8731f8c28c4fca53e2b3cae3
MD5 6b91a354c247807bd9e2afe49b69fa80
BLAKE2b-256 b5ba6b178e958b5ad03410e17a9e6f61e7380807a156eb9eaa141fc1d025e808

See more details on using hashes here.

File details

Details for the file evasdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: evasdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.7

File hashes

Hashes for evasdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1521ee2e5d2c23a2b829eb42e16768c3c00b88f15477301f429cb3a31b433b88
MD5 e0aa523d4e2007bbebbd404e58300786
BLAKE2b-256 956e6ad1802c93df36f2b19991897bdd6e657037072b32c61393f0b30a13b56c

See more details on using hashes here.

Supported by

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