For the changes happening, refer to ChangeLog
This wrapper is intended as python library for youbot :
The major releases does not include or plan for bug fixes. The bug fix release will happen as soon as a bug is found
Month-year | Release | Functions |
---|---|---|
Jan19-2014 | V0.1 | Support for Arm |
Jan30-2014 | V0.2 | Support for Base |
Feb15-2014 | V0.3 | Whole Body Support (FSM support) |
Feb28-2014 | V1.0 | Final Release with maintanence |
Please follow the below installation instructions:
Building and Installing the wrapper:
Build and Install.
- git clone https://github.com/praman2s/youbot-py.git
- cd youbot-py
- sh configure.sh
- python setup.py build –build-base=.
- sudo bash
- python setup.py install
Now the wrapper is ready to be tested.
The whole wrapper is divided into three parts:
This sets up the communication between PC and youBot ethercat drivers:
from youbotpy import * # Imports all the modules that are being exposed
robot = robot() # Tries to establish connection, if not throws exception
robot.Calibrate() # Optional. For some users who want candle positon as initial pose.
The wrapper allows you to work with arm alone. Config files have to altered accordingly:
arm = arm() # Get the first arm connected.
arm.GetJointValues() # Returns the current joint value as 5x1 array.
arm.SetJointValues(value) # Sets joint values. value should be 5x1 array.
arm.GetVelocityValues() # Returns the current joint velocity as 5x1 array.
arm.SetVelocityValues(value) # Sets joint velocity values. value should be 5x1 array.
arm.GetTorqueValues() # Returns the current joint torque values as 5x1 array.
arm.SetTorqueValues(value) # Sets joint toruque values. value should be 5x1 array.
The wrapper allows you to work with base alone. Config files have to altered accordingly:
base = robot.GetBase() # Tries to check if the base is connected.
base.SetVelocity([x,y,theta]) # Sets the base velocity to x,y and theta.
base.GetVelocity() # Returns a 3x1 (x,y,\theta) velocity vector.
base.GetPose() # Returns the pose info based on odometry.
This is an example file where it takes three lines to get connected to youBot:
from youbotpy import * #exposes youbot_driver to python
import time
robot = arm() # Calls the constructor . Important to call at the begining
#robot.Calibrate() # Sets the robot in candle position and sets encoder to zero
joint_values = [1,1,-1,1,1] # some position that of the arm that the user demands
robot.SetArmJointValues(joint_values) # sets the joint values
time.sleep(2)
print "End of Hello World..!!!"