Skip to main content

Python library to control 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-1.0.3.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

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

pyhman-1.0.3-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyhman-1.0.3.tar.gz
  • Upload date:
  • Size: 17.2 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.12

File hashes

Hashes for pyhman-1.0.3.tar.gz
Algorithm Hash digest
SHA256 f8b359d07d26365b24de95161aa9b006eefb39a01c10616ff38aa628c92163f9
MD5 76ff1755ab813310ee608424781461c0
BLAKE2b-256 a45ad47c5b6f2790e6a79842896cfaab4c45b93b08a31960fa8c728677abe98d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyhman-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.0 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.12

File hashes

Hashes for pyhman-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 69816c08001e482939aec5c465154901bcd102edc7d36567900953b18c85442c
MD5 245c096a8b59b78a7641d1c5c5990c55
BLAKE2b-256 ff242a79d2a7d03cefe36ec4f96b373991b0b9183fe53808f8975efe5d4a1ccd

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