Skip to content

A toolbox that leverages source robotics drivers to easily create robotic arm kinematic chains and communication interfaces

License

Notifications You must be signed in to change notification settings

PCrnjak/Source-Robotics-Toolbox

Source Robotics Toolbox

License: MIT Issues release

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

  1. The software and hardware are still in development and may contain bugs, errors, or incomplete features.
  2. 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!

General badge General badge

Project is under MIT Licence

About

A toolbox that leverages source robotics drivers to easily create robotic arm kinematic chains and communication interfaces

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages