/PyBEAR

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

Primary LanguagePythonApache License 2.0Apache-2.0

PyBEAR

Note: We have officially stopped supporting Python2. While it is still possible to use PyBEAR with Python 2, please be aware that certain functions may no longer be functional.

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

Current version: 0.1.2

In this version, the return format is always [[[data1, data2 ...], error], [[data1, data2 ...], error] ...] no matter if returning only one register or more per BEAR.

Contact

Website: www.westwoodrobotics.io

Email: info@westwoodrobotics.io

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. CD into PyBEAR/ directory and use pip3 to install the package(Python3).
pip3 install .

3.Make sure pyserial and numpy are installed. You can check this by running:

pip3 show pyserial numpy

Othewise, install the missing package(s).

  1. Enjoy!

SDK Manual

Download the latest SDK Manual from www.westwoodrobotics.io for detailed instructions, helpful tips and various examples.

For detailed examples please refer to the SDK: https://westwoodrobotics.io/support/