Skip to content

donghunnoh/PyBEAR-WR

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyBEAR

Project Background

This is the Python SDK for the Westwood Robotics actuator module BEAR (Back-drivable Electromechanical Actuator for Robotics).

Contact

Email: [email protected]

Notes

It is advised to use the Boosted USB2BEAR/USB2RoMeLa device for maximum speed.

Disclaimer

Use at own risk when using other generic RS485 dangles.

Udev Rules

When using the Boosted USB2BEAR/USB2RoMeLa device, you can use udev rules to allow local machine to asign a unique SYMLINK according to the serial number of the USB dangle.

  1. Move 00-WestwoodRobotics.rules file into /etc/udev/rules.d/ with 'sudo cp'
  2. Reload the rules
sudo udevadm control --reload

Everytime a Boosted USB2BEAR/USB2RoMeLa device is plugged in, a symlink that is: '/dev/serial#' will be created. For example, a device with serial number UB021 will have this SYMLINK: /dev/UB021

USB2RoMeLa from RoMeLa has 3 digit hexadecimal serial numbers.

USB2BEAR from Westwood Robotics has 4 digit hexadecimal serial numbers.

Installation Procedure

  1. Modify the permissions of your computer such that PyBEAR can access the serial port.
sudo chown -R your_username /usr/local
sudo usermod -a -G dialout your_username
  1. Install dependencies.
pip install numpy pyserial
  1. Run installation on your local Python installation or your virtual environment.
python setup.py install
  1. Enjoy!

Example

# Import Manager from PyBEAR
from pybear import Manager

# Create a serial port object
bear = Manager.BEAR(port='/dev/ttyUSB0', baudrate=8000000)

# Enable torque
bear.set_torque_enable((1,1))

# Enable multiple torques
bear.set_torque_enable((1,1), (2,1))

# Enable Direct Force mode
bear.set_mode(1,3)

# Apply Direct Force D gain
bear.set_d_gain_direct_force((1,0.1))

About

PyBEAR is the Python driver for BEAR series actuator from Westwood Robotics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%