Python module for Spectral BLDC motor controllers
Project description
Source Robotics Toolbox
How to install?
pip install SourceRoboticsToolbox
How to use?
This lib was created to simplify the control of your robot with Source robotic line of motor drivers.
Pairing it the with Spectral-BLDC lib allows you to write extremely simple yet capable code for robotic control.
Some features it offers:
-
Sector homing
-
Robot joint mastering/calibration
-
Converting encoder ticks to joint position and speed
-
Converting joint position and speed to encoder ticks
-
Radian 2 degreee, degree 2 radian position and speed manipulation
Skeleton sketch
import SourceRoboticsToolbox
import time
# This is represents encoder ticks where your joint should be at 0 rad
# Usually you know that joint position from your robots DH table / kinematic diagram
Master_position = 14000
Joint_reduction_ratio = 6 # Joint has reduction ratio of 6:1
Joint = SourceRoboticsToolbox.Joint(encoder_resolution = 14,
master_position=Master_position,
gear_ratio = Joint_reduction_ratio,
offset = 0, #Change If your motor is not at 0 rad at master position
dir = 0) # Change joint direction
current_motor_encoder_position = 10000 #This emulates the data you would get from your motor encoder
# Init flag; used to run .determine_sector once
Intial = 0
while True:
# This will give you Joint position in radians
# NOTE that joint position is value after the gear reduction of your actuator
position_values = Joint.get_joint_position(current_motor_encoder_position)
print(position_values)
# This will perform sector homing and determine the sector motor is in
if Intial ==0 :
Intial = 1
Joint.determine_sector(current_motor_encoder_position)
time.sleep(0.5)
More about our projects
Liability
-
The software and hardware are still in development and may contain bugs, errors, or incomplete features.
-
Users are encouraged to use this software and hardware responsibly and at their own risk.
Support the project
The majority of this project is open source and freely available to everyone. Your assistance, whether through donations or advice, is highly valued. Thank you!
Project is under MIT Licence
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
Built Distribution
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 sourceroboticstoolbox-1.2.tar.gz.
File metadata
- Download URL: sourceroboticstoolbox-1.2.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30e9efed721bd795e00415286e4cfc20c20b752a4081a73ef8c8a28a4fb514f4
|
|
| MD5 |
cf049b28417529fe3f8961da48fe179b
|
|
| BLAKE2b-256 |
5204224ab8f4fefe8cabde4215fd32f5e0a979c5283dc7818bceacb92eb6c060
|
File details
Details for the file sourceroboticstoolbox-1.2-py3-none-any.whl.
File metadata
- Download URL: sourceroboticstoolbox-1.2-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20185f58a9023b3bb3b9fa16771259c5906c59a6e667c9fa131dd645ef002ea2
|
|
| MD5 |
e22877813580cdcb6330c053fe1bc18b
|
|
| BLAKE2b-256 |
523fc412dd0c35074ca036a08ae390d810a590b37ddf179cd7d2c4d59a5fe080
|