No project description provided
Project description
RoboClaw Encoder Interface
This project provides an interface for controlling and reading encoder values from RoboClaw motor controllers. It allows you to set motor speeds, control motor movement, and read encoder values with proper handling of overflow, underflow, and direction. Features
Control Motors: Set speed for individual motors (M1, M2).
Drive Both Motors: Control both motors at the same time with forward or backward movement.
Turn Both Motors: Control turning by adjusting motor speeds in opposite directions.
Read Encoder: Accurately read encoder values, adjusting for overflow and underflow.
System Requirements
This library will only work on devices with the AArch64 architecture running linux/gnu. Here's a list of example devices:
- Raspberry PI 3/4/5 (Requires a 64-bit OS)
- Raspberry PI Zero 2 W
- NVIDIA Jetson Series
Installation
pip install roboclaw-python
Usage
Example in Python using the PyO3 bindings
from roboclaw_python import RoboClaw, Motor
Initialize RoboClaw
roboclaw = RoboClaw(port_name="/dev/ttyUSB0", baud_rate=115200, timeout=20, retries=128, address=128)
Set motor speed
roboclaw.set_speed(Motor.M1, 100)
Read encoder value
encoder_value_m1 = roboclaw.read_encoder(Motor.M1)
print(f"Motor M1 Encoder: {encoder_value_m1}")
Currently supported
set_speed() M1 + M2 Forward and Backwards
drive() Both motors forwards and backwards at the same time
turn() Turn one or the other motor
//Encoders
read_encoder() Reads the encoder of a specified motor
read_encoder_speed() Read the speed of the encoder in counts per second
reset_encoders() Resets both encoders
set_encoder() Sets the encoder value of a specified motor
//Advanced Commands
set_serial_timeout() Sets the serial timeout
read_serial_timeout() Reads the serial timeout
External links
License
This project is licensed under the MIT License.
This is an unofficial roboclaw driver for python. I'm not affiliated with Basic Micro.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file roboclaw_python-0.5.18-cp37-abi3-win_amd64.whl.
File metadata
- Download URL: roboclaw_python-0.5.18-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 167.4 kB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0540d905cda7e7ba86f1c37753ee6271643b625903ebb65d14303b0de6f60fa0
|
|
| MD5 |
eba32865a77bec83714a58466c0c4835
|
|
| BLAKE2b-256 |
597ecd9c2b9b6f9845136bcf32c0f3ee780909bd118ca2eef394b5859fd8d639
|
File details
Details for the file roboclaw_python-0.5.18-cp37-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: roboclaw_python-0.5.18-cp37-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 404.5 kB
- Tags: CPython 3.7+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70f4da46198a80b892b5aef4b5efbbfff49081ca63369c6ecca537f359c57f2b
|
|
| MD5 |
2e96d15410dd7f79b62c5e944ebd1e57
|
|
| BLAKE2b-256 |
db477c683bacd1e28b2dee6eb5dbe2fa77ff3d200b30bcdb37304a6f887caed8
|
File details
Details for the file roboclaw_python-0.5.18-cp37-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: roboclaw_python-0.5.18-cp37-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 385.3 kB
- Tags: CPython 3.7+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7c73b66ab8466fa1f006bef07b6b9c505c41655dc31ed008f9c201c78377141
|
|
| MD5 |
3545c269e338a752dd62f536414301e7
|
|
| BLAKE2b-256 |
eabeffa002ad69bd777bdd4e124f2900237f5d2ab7213262baa211601bd2f4a7
|