Skip to main content

Eva Python SDK

PyPI version

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:

$ pip install eva-sdk

# Or for a specific version, i.e the lastest compatible version 2.x.x:
$ pip install eva-sdk~=2.0.0

Pipenv

Make sure you have Python3 and Pipenv installed, then run the following command:

$ pipenv install eva-sdk

# Or for a specific version, i.e the lastest compatible version 2.x.x:
$ pipenv install eva-sdk~=2.0.0

Detail Instructions

If your 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.

eva-sdk.eva_http and eva-sdk.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 eva-sdk.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 eva-sdk.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 eva-sdk/<name-of-file-to-test> 

# some test require supplying ip and token via the `--ip` and `--token` arguements
$ python -m pytest eva-sdk/<name-of-file-to-test> --ip 172.16.16.2 --token abc-123-def-456

License

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

Metadata

Release files for eva-sdk 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eva-sdk 0.0.1
File Size Uploaded
eva-sdk-0.0.1.tar.gz 12.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eva-sdk 0.0.1
File Interpreter ABI Platform
eva_sdk-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 26.8 kB

Release files / eva-sdk-0.0.1.tar.gz

Download URL eva-sdk-0.0.1.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
db630d3b11ef7005c8f6d40422bdc8fd0217bb9a19c002c400143f1dfcc4234c
BLAKE2b-256 checksum
How to use checksums
0d1a9121f1a943daf24f3fd658e556672a1ea128ce23eb279664438f09c1a0b5
Upload date
Uploaded using Trusted Publishing?
What is 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.37.0 CPython/3.6.8

Release files / eva_sdk-0.0.1-py3-none-any.whl

Download URL eva_sdk-0.0.1-py3-none-any.whl
Size 14.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f913560e6e69b76adfc2aa9b8a5795c5f838a006c994c52846446bb82a810ee2
BLAKE2b-256 checksum
How to use checksums
166ab2c8e1d0f45a69dbd70b7cd7fcfcf2042272f7415cc7255775ad7b8a0902
Upload date
Uploaded using Trusted Publishing?
What is 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.37.0 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page