| Name | pybravo JSON |
| Version |
0.1.1
JSON |
| download |
| home_page | |
| Summary | An easy-to-use interface for the Reach Bravo 7 manipulator |
| upload_time | 2023-09-29 08:21:25 |
| maintainer | |
| docs_url | None |
| author | |
| requires_python | >=3.8 |
| license | |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# pybravo :mechanical_arm:
pybravo is a Python interface for interacting with the [Reach Bravo
7](https://reachrobotics.com/products/manipulators/reach-bravo/) 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](https://github.com/Reach-Robotics/reach_robotics_sdk/tree/master)
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](https://pypi.org/project/pybravo/) by
running:
```bash
python3 -m pip install pybravo
```
To build pybravo from source, please refer to the following steps:
1. Clone the project [repository](https://github.com/Robotic-Decision-Making-Lab/pybravo.git)
2. Navigate to the `pybravo` base directory
```bash
cd path/to/pybravo
```
3. Install the package
```bash
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](https://github.com/Robotic-Decision-Making-Lab/pybravo/tree/main/examples).
```python
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.
Raw data
{
"_id": null,
"home_page": "",
"name": "pybravo",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "",
"author": "",
"author_email": "Evan Palmer <evanp922@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d5/a0/75b693b8f30edf59a9be756747d4f8d27dd0e40776bf0a39edd581152bc3/pybravo-0.1.1.tar.gz",
"platform": null,
"description": "# pybravo :mechanical_arm:\n\npybravo is a Python interface for interacting with the [Reach Bravo\n7](https://reachrobotics.com/products/manipulators/reach-bravo/) manipulator\nover an Ethernet connection.\n\n## :warning: Disclaimer :warning:\n\nThis is an independent project, and is not affiliated with or maintained by\nReach Robotics. Please refer to the [Reach Robotics\nSDK](https://github.com/Reach-Robotics/reach_robotics_sdk/tree/master)\nfor all official software.\n\n## Main features\n\nThe main features of pybravo include:\n\n- An easy-to-use interface for sending and receiving packets from the\n Bravo arm\n- Implements the Reach serial protocol\n- Attach callbacks for asynchronous packet handling\n\n## Installation\n\npybravo can be installed from [PyPI](https://pypi.org/project/pybravo/) by\nrunning:\n\n```bash\npython3 -m pip install pybravo\n```\n\nTo build pybravo from source, please refer to the following steps:\n\n1. Clone the project [repository](https://github.com/Robotic-Decision-Making-Lab/pybravo.git)\n2. Navigate to the `pybravo` base directory\n\n```bash\ncd path/to/pybravo\n```\n\n3. Install the package\n\n```bash\npython3 -m pip install .\n```\n\n## Quick start\n\nRefer to the following code snippet for a simple example showing how to get\nstarted with pybravo. Additional examples may be found in the project\n[examples](https://github.com/Robotic-Decision-Making-Lab/pybravo/tree/main/examples).\n\n```python\nimport struct\nimport time\n\nfrom bravo import BravoDriver, PacketID, DeviceID, Packet\n\n\ndef example_joint_positions_cb(packet: Packet) -> None:\n \"\"\"Read the joint positions from the Bravo 7.\n\n Args:\n packet: The joint position packet.\n \"\"\"\n position: float = struct.unpack(\"<f\", packet.data)[0]\n print(\n f\"The current joint position of joint {packet.device_id} is {position}\"\n )\n\n\nif __name__ == \"__main__\":\n bravo = BravoDriver()\n\n # Attempt to establish a connection with the Bravo\n bravo.connect()\n\n # Attach a callback to be executed when a packet with the POSITION ID is\n # received\n bravo.attach_callback(PacketID.POSITION, example_joint_positions_cb)\n\n # Create a request for the current joint positions\n request = Packet(\n DeviceID.ALL_JOINTS, PacketID.REQUEST, bytes([PacketID.POSITION.value])\n )\n\n # Send the request\n bravo.send(request)\n\n # Wait a second for the Bravo to respond to the request\n time.sleep(1.0)\n\n bravo.disconnect()\n```\n\n## License\n\nAny proprietary documents or software owned by Reach Robotics and used within\nthis project are subject to the Reach Robotics licensing. All other software\nis is released under the MIT license.\n\n",
"bugtrack_url": null,
"license": "",
"summary": "An easy-to-use interface for the Reach Bravo 7 manipulator",
"version": "0.1.1",
"project_urls": {
"repository": "https://github.com/Robotic-Decision-Making-Lab/pybravo"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "22edff31a13053f03e30d0f5d7bb43d8f154c5d00d2f8e31a47bdfd14305d88f",
"md5": "a0530d517e95eb6adb481d0c41f7cb80",
"sha256": "55567a060dfd4821587440c843cbf831b89f05384c2de7563c91b04e79b53854"
},
"downloads": -1,
"filename": "pybravo-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a0530d517e95eb6adb481d0c41f7cb80",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 13741,
"upload_time": "2023-09-29T08:21:24",
"upload_time_iso_8601": "2023-09-29T08:21:24.330951Z",
"url": "https://files.pythonhosted.org/packages/22/ed/ff31a13053f03e30d0f5d7bb43d8f154c5d00d2f8e31a47bdfd14305d88f/pybravo-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d5a075b693b8f30edf59a9be756747d4f8d27dd0e40776bf0a39edd581152bc3",
"md5": "beddb4e56f98738719e18de41efb7528",
"sha256": "b1956aac1c0951d559da3e4625a9eac5c7450c0eef17528869f415905e7a3727"
},
"downloads": -1,
"filename": "pybravo-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "beddb4e56f98738719e18de41efb7528",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 7998,
"upload_time": "2023-09-29T08:21:25",
"upload_time_iso_8601": "2023-09-29T08:21:25.823479Z",
"url": "https://files.pythonhosted.org/packages/d5/a0/75b693b8f30edf59a9be756747d4f8d27dd0e40776bf0a39edd581152bc3/pybravo-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-29 08:21:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Robotic-Decision-Making-Lab",
"github_project": "pybravo",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "pybravo"
}