Skip to main content

Python library for the Hman robot

Project description

pyHman

License: MIT

This is a Python library for controlling and communicating with the Hman device. This library provides high-level interfaces to set and get various parameters of hman, such as motor positions, modes, currents, and so on.

Installation

This package uses setuptools for distribution. You can install it via pip:

pip install pyHman

or directly from the source code:

git clone https://github.com/Aightech/pyHman.git
cd pyHman
python setup.py install

Requirements

  • Python 3.6+
  • socket (from the Python Standard Library)
  • logging (from the Python Standard Library)

Usage

from Hman import Hman

# Create a Hman instance
hman = Hman(3, True) # '3' denotes the number of motors, 'True' enables verbose logging
# Connect to the hman
hman.connect('127.0.0.1') # Use the appropriate IP address for your setup
# Set the mode of the motors
hman.set_mode('position') # Other available modes: 'current', 'velocity', 'impedance'
# Set the articular position of the motors
positions = hman.set_articular_pos(0, 40, 30) # Enter the desired positions for each motor
# Print the positions
print(positions)

Features and Functions

The Hman class provides the following main features:

  • connect(address: str, port: int = 5000): Connect to the hman using the given IP address and port.
  • disconnect(): Disconnect from the hman.
  • set_mode(mode: str): Set the mode of the hman (available modes are: 'position', 'current', 'velocity', 'impedance').
  • set_cartesian_pos(posx: float, posy: float, posz: float): Set the cartesian position of the hman.
  • set_articular_pos(pos1: float, pos2: float, pos3: float): Set the articular position of the hman.
  • set_motors_current(cur1: float, cur2: float, cur3: float): Set the current of the hman's motors.
  • turn_off_current(): Turn off the current of the hman's motors.
  • get_pos(): Get the current position of the hman's motors.

Contributions

Feel free to submit a pull request if you want to contribute to this project.

License

This library is distributed under the MIT License. Please see the LICENSE file for more information.

Support

If you have any questions or run into any problems, please open an issue in the GitHub repository. 7

Disclaimer

Use this software at your own risk. The authors are not responsible for any damage that may be caused directly or indirectly through the use of this software.

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

pyhman-0.1.0.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

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

pyhman-0.1.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file pyhman-0.1.0.tar.gz.

File metadata

  • Download URL: pyhman-0.1.0.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for pyhman-0.1.0.tar.gz
Algorithm Hash digest
SHA256 73025e0fd9230889632071376b99c9565c8598eac4a227f9a02c251602b13cca
MD5 a4cd7bbe5febc00317484518f431e99b
BLAKE2b-256 5885458b074bd1fb12ff932525c137e98b35d7d14d3c05fe8f35f83e7747d74f

See more details on using hashes here.

File details

Details for the file pyhman-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyhman-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for pyhman-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aaf7e8d5adb383ec4045a850f04fd65bea30d0718ea3442e4b1b4fd357bec1ac
MD5 3ad9b465650bda457a86ebabdb25bc0d
BLAKE2b-256 90aad658f94f7a7995aea4e8566f68a53031b7ced0ce53f7b3217e290d06a097

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