Skip to main content

pybravo :mechanical_arm:

pybravo is a Python interface for interacting with the Reach Bravo 7 manipulator over an Ethernet connection.

:warning: Disclaimer :warning:

This is an independent project, and is not affiliated with or maintained by Reach Robotics. Please refer to the Reach Robotics SDK for all official software.

Main features

The main features of pybravo include:

  • An easy-to-use interface for sending and receiving packets from the Bravo arm
  • Implements the Reach serial protocol
  • Attach callbacks for asynchronous packet handling

Installation

pybravo can be installed from PyPI by running:

python3 -m pip install pybravo

To build pybravo from source, please refer to the following steps:

  1. Clone the project repository
  2. Navigate to the pybravo base directory
cd path/to/pybravo
  1. Install the package
python3 -m pip install .

Quick start

Refer to the following code snippet for a simple example showing how to get started with pybravo. Additional examples may be found in the project examples.

import struct
import time

from bravo import BravoDriver, PacketID, DeviceID, Packet


def example_joint_positions_cb(packet: Packet) -> None:
    """Read the joint positions from the Bravo 7.

    Args:
        packet: The joint position packet.
    """
    position: float = struct.unpack("<f", packet.data)[0]
    print(
        f"The current joint position of joint {packet.device_id} is {position}"
    )


if __name__ == "__main__":
    bravo = BravoDriver()

    # Attempt to establish a connection with the Bravo
    bravo.connect()

    # Attach a callback to be executed when a packet with the POSITION ID is
    # received
    bravo.attach_callback(PacketID.POSITION, example_joint_positions_cb)

    # Create a request for the current joint positions
    request = Packet(
        DeviceID.ALL_JOINTS, PacketID.REQUEST, bytes([PacketID.POSITION.value])
    )

    # Send the request
    bravo.send(request)

    # Wait a second for the Bravo to respond to the request
    time.sleep(1.0)

    bravo.disconnect()

License

Any proprietary documents or software owned by Reach Robotics and used within this project are subject to the Reach Robotics licensing. All other software is is released under the MIT license.

Metadata

Release files for pybravo 0.1.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 pybravo 0.1.1
File Size Uploaded
pybravo-0.1.1.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybravo 0.1.1
File Interpreter ABI Platform
pybravo-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / pybravo-0.1.1.tar.gz

Download URL pybravo-0.1.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b1956aac1c0951d559da3e4625a9eac5c7450c0eef17528869f415905e7a3727
BLAKE2b-256 checksum
How to use checksums
d5a075b693b8f30edf59a9be756747d4f8d27dd0e40776bf0a39edd581152bc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / pybravo-0.1.1-py3-none-any.whl

Download URL pybravo-0.1.1-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55567a060dfd4821587440c843cbf831b89f05384c2de7563c91b04e79b53854
BLAKE2b-256 checksum
How to use checksums
22edff31a13053f03e30d0f5d7bb43d8f154c5d00d2f8e31a47bdfd14305d88f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.0.1

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