Skip to main content

Stretch Body low level Python API

Project description

Stretch Body

The stretch_body package provides a low level Python API to the Hello Robot Stretch hardware. This package comes pre-installed on Stretch robots. Tutorials for using this package can be found on the docs.

Installing

This package comes pre-installed on Stretch robots. To install or upgrade to a stable Stretch Body for Python3, run:

$ python3 -m pip install --upgrade hello-robot-stretch-body

To install or upgrade to a pre-release of Stretch Body for Python3, run:

$ python3 -m pip install --upgrade --pre hello-robot-stretch-body

Please report feedback on the Issue Tracker or the Forum.

Running tests

There are a number of unit, functional, and performance tests within the test/ folder, separated into test suites by different files. Suites are separated by a device or functionality within Stretch Body that is being tested.

In Python3, run python3 -m unittest test.test_<suite-name>.

For example, to run the stretch_body.robot.Robot functional tests, run:

$ git clone https://github.com/hello-robot/stretch_body.git
$ cd stretch_body/body
$ python3 -m unittest test.test_robot

Developing

The source code for Stretch Body resides within the stretch_body/ folder. You can install Stretch Body as "editable", and directly edit the source code to test changes.

In Python3, run python3 -m pip install -e .

For example, to test changes to stretch_body.robot.Robot, run:

$ python3 -m pip uninstall hello-robot-stretch-body # ensure previous Stretch Body installations are removed
$ git clone https://github.com/hello-robot/stretch_body.git
$ cd stretch_body/body
$ python3 -m pip install -e .

Now, make desired edits to the stretch_body/body/stretch_body/robot.py file. Software using Stretch Body is now using the modified stretch_body.robot.Robot class.

Deploying

Increment the version number and run the deploy.sh script. Verify the new release is reflected on PyPI.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

hello_robot_stretch_body-0.7.9.tar.gz (155.8 kB view hashes)

Uploaded Source

Built Distribution

hello_robot_stretch_body-0.7.9-py3-none-any.whl (178.3 kB view hashes)

Uploaded Python 3

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