dxl_py
Simple python wrapper over the Dynamixel API. Allows commanding and receiving positions for an arbitrary number of servos.
Use
Create a config dictionary with one entry per servo:
MY_SERVOS_CONFIG = {
'test_servo': {
'id': 1, # Servo ID
'model': 'mx', # Servo model tag, one of 'MX' or 'PRO'
'min': 0, # Minimum position (MX servos go from 0 to 4095)
'max': 4095, # Maximum position
},
...
}
Create the servo object using your config dictionary.
from dxl.servos import Servos
my_servos = Servos(config = MY_SERVOS_CONFIG, action_bounds = [-1.0, 1.0])
Set the servo position. The action_bounds kwarg determines how actions relate to positions. An action of 1.0 here
sets the position of the servo to 4095.
my_servos.set({'test_servo' : 1.0, ...})
Get the servo position.
my_servos.get(['test_servo', ...])
Setup
Clone the DynamixelAPI repo into the desired directory. Install into your desired python environment (consider using Anaconda).
$ git clone https://github.com/ROBOTIS-GIT/DynamixelSDK.git .
$ cd DynamixelSDK/python/
$ pip install -e .
The wrapper can be installed as a pip package:
pip install dxl_py
This repo uses MX-28 model dynamixel servos connected via USB through a U2D2.
After connecting the device, check it exists (the name might be different from the one below):
$ ls /dev/ttyUSB*
/dev/ttyUSB0
Now configure and add a custom udev rule using the fix_udev.sh script. You might need to reboot.
$ sudo ./fix_udev.sh
If we check the devices again we should now see the dynamixel device.
$ ls /dev/dynamixel
/dev/dynamixel
Connect a servo with id=1 and run the test with python -m unittest.
Metadata
Release files for dxl-py 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dxl_py-0.1.tar.gz | 4.7 kB | Without provenance | Details for dxl_py-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dxl_py-0.1-py3-none-any.whl | Python 3 | none | any | Details for dxl_py-0.1-py3-none-any.whl |
Total release size: 14.7 kB
Release files / dxl_py-0.1.tar.gz
| Download URL | dxl_py-0.1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44b0bbc9525fdfaf8b6fa2b4e013dfe6fe52c0c67e6631e98356c7e550b239e8
|
|
BLAKE2b-256 checksum How to use checksums |
a333e5ebffb7944af444b36bdfb1c8e3d4f0cb9cfabc4bbd52805d1c5761a7b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1
|
Release files / dxl_py-0.1-py3-none-any.whl
| Download URL | dxl_py-0.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a97a995832dd921d32fbe5bcfe5266f4fd2b10ecaadfab1966c4790973feb1f3
|
|
BLAKE2b-256 checksum How to use checksums |
f97acbade1b7f9fa2bccfc9bce11b468c614c63e9ab8fc8140759e2d0d6b1661
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1
|
Security for dxl-py 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.