Python interface for controlling various robotic actuators
Project description
actuator
Defines a package to make it easy and performant to control actuators.
Getting Started
Install Build Dependencies
Ubuntu
sudo apt install pkg-config libudev-dev
Install the Package
pip install actuator
Alternatively, to install the bleeding edge version from Github:
pip install 'actuator @ git+https://github.com/kscalelabs/actuator.git@master'
Motor-Specific Examples
Robstride
The following example can be used to move a Robstride motor in a sinusoidal pattern.
python -m actuator.examples.sinusoidal_movement
Note that there are some additional steps needed before the Robstride USB controller will work on Linux:
- Install this driver for the CH341 USB controller.
- This should create a
/dev/ttyUSB0
or/dev/ttyCH341USB0
device - you should check which one by doingls /dev/tty*
. You might need to the change the permissions:
sudo chmod 666 /dev/ttyCH341USB0
- Run the following command to configure the baud rate of the controller:
sudo stty -F /dev/ttyUSB0 921600
- Alternatively, you can add the following line to your
/etc/udev/rules.d/51-ch340.rules
file to automatically configure the baud rate:
KERNEL=="ttyCH341USB[0-9]", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="ttyUSB%n", RUN+="/bin/stty -F /dev/ttyCH341USB0 921600"
KERNEL=="ttyUSB[0-9]", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", RUN+="/bin/stty -F /dev/ttyUSB0 921600"
- After adding the above rule, you should run
sudo udevadm control --reload-rules
to reload the rules.
Supported Actuators
ATTRS{idVendor}=="1a86" ATTRS{idProduct}=="7523"
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 Distribution
actuator-0.0.13.tar.gz
(5.9 MB
view hashes)