DynamixelClient for XL motors
This node is a client for the Dynamixel motors. It is based on the Dynamixel SDK and is used to control the motors. It is a Python node that communicates with the motors via the USB port.
YAML Configuration
nodes:
- id: dynamixel_client
path: client.py # modify this to the relative path from the graph file to the client script
inputs:
pull_position: dora/timer/millis/10 # pull the present position every 10ms
pull_velocity: dora/timer/millis/10 # pull the present velocity every 10ms
pull_current: dora/timer/millis/10 # pull the present current every 10ms
# write_goal_position: some goal position from other node
# write_goal_current: some goal current from other node
# end: some end signal from other node
outputs:
- position # regarding 'pull_position' input, it will output the position every 10ms
- velocity # regarding 'pull_velocity' input, it will output the velocity every 10ms
- current # regarding 'pull_current' input, it will output the current every 10ms
env:
PORT: COM9 # e.g. /dev/ttyUSB0 or COM9
CONFIG: config.json # the configuration file for the motors
Arrow format
Outputs
Arrow StructArray with two fields, joints and values:
import pyarrow as pa
# Create a StructArray from a list of joints (py_list, numpy_array or pyarrow_array) and a list of values (py_list, numpy_array or pyarrow_array)
arrow_struct = pa.StructArray.from_arrays(
arrays=[joints, values],
names=["joints", "values"]
)
# Send the StructArray to the dataflow
node.send_output("output_name", arrow_struct, None)
# Receive the StructArray from the dataflow
event = node.next()
arrow_struct = event["value"]
joints = arrow_struct.field("joints") # PyArrow Array of Strings
values = arrow_struct.field("values") # PyArrow Array of Int32/Uint32/Float32...
Inputs
Arrow StructArray with two fields, joints and values:
import pyarrow as pa
# Create a StructArray from a list of joints (py_list, numpy_array or pyarrow_array) and a list of values (py_list, numpy_array or pyarrow_array)
arrow_struct = pa.StructArray.from_arrays(
arrays=[joints, values],
names=["joints", "values"]
)
# Send the StructArray to the dataflow
node.send_output("output_name", arrow_struct, None)
# Receive the StructArray from the dataflow
event = node.next()
arrow_struct = event["value"]
joints = arrow_struct.field("joints") # PyArrow Array of Strings
values = arrow_struct.field("values") # PyArrow Array of Int32/Uint32/Float32...
Note: The zero-copy is available for numpy arrays (with no None values) and pyarrow arrays.
Configuration
The configuration file that should be passed to the node is a JSON file that contains the configuration for the motors:
{
"shoulder_pan": {
"id": 1,
"model": "x_series",
"torque": true,
"P": 800,
"I": 0,
"D": 0,
"goal_current": null
}
}
The configuration file starts by the joint name of the servo. id: the id of the motor in the bus, model: the model of the motor, torque: whether the motor should be in torque mode or not (at the beginning), P: the proportional gain for position control mode, I: the integral gain for position control mode, D: the derivative gain for position control mode, goal_current: the goal current for the motor at the beginning, null if you don't want to set it.
License
This library is licensed under the Apache License 2.0.
Metadata
Release files for dynamixel-client 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 |
|---|---|---|---|---|
| dynamixel_client-0.1.tar.gz | 6.3 kB | Without provenance | Details for dynamixel_client-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dynamixel_client-0.1-py3-none-any.whl | Python 3 | none | any | Details for dynamixel_client-0.1-py3-none-any.whl |
Total release size: 13.9 kB
Release files / dynamixel_client-0.1.tar.gz
| Download URL | dynamixel_client-0.1.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
064e67f3f9e241aca35250f0b24a0a59fcfb3c1bbd158cac58a4383bd8df9fa0
|
|
BLAKE2b-256 checksum How to use checksums |
c130ec0faa9563197dafbe2d4cdd098acda6e7a698c1d58f8031d06f12eaf2c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.12
|
Release files / dynamixel_client-0.1-py3-none-any.whl
| Download URL | dynamixel_client-0.1-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1da85d6a63b4f5cc2429e0e2d6387dfdc978bd16fb94e70d3f3d6e7a8afa8f86
|
|
BLAKE2b-256 checksum How to use checksums |
de7ca30132bddb3d745d95e14fa0db8c87b6fa4ec0f375cd3e17ca0924c4f758
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.12
|
Security for dynamixel-client 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.