Skip to content

DRV90L Class documentation

Remco Kuijpers edited this page Feb 3, 2020 · 3 revisions

Use shift + scroll to scroll from left to right

<title>Python: module DRV90L</title>
 
 
DRV90L
index
/home/remco/catkin_ws/src/delta/arm_driver/src/DRV90L.py

 
Modules
        
getpass
numpy
rospy
struct
time
yaml

 
Classes
        
DRV90L

 
class DRV90L
    The "DRV90L" class contains methods to control the robot.
 
  Methods defined here:
__init__(self)
disableRobot(self)
This function disables the robot. After this function is called, the robot can't move. The motors aren't powered anymore.
enableRobot(self)
This function enables the robot. After this function is called, the robot is ready to move.
!!!Be aware the motors get enabled after calling this function!!!
getJointPositions(self)
With this function it's possible to get the joint positions
 
Returns:
    [list] -- [1, 2, 3, 4, 5, 6] joint angles in radians
getSavedToolPose(self, name)
Load a position from the poses.yaml yaml file.
 
Arguments:
    name {string} -- Position name to load
 
Returns:
    [list] -- [x,y,z,rx,ry,rz] position in mm /degrees
getToolPosition(self)
With this function it's possible to get the tool position.
 
Returns:
    [list] -- [x,y,z,rx,ry,rz] in mm / degrees
getUserDigitalInputs(self)
With this function it's possible to get the states of all user digital inputs.
 
Returns:
    [list] -- [Containing all states of the digital inputs [0 or 1]]
getUserDigitalOutputs(self)
With this function it's possible to get the states of all user digital outputs.
 
Returns:
    [list] -- [Containing all states of the digital outputs [0 or 1]]
goHome(self)
This function moves the robot to the home position that is set in the robot software.
!!!The robot needs to be enables for this function to work!!!
jogRobot(self, direction, stop=False)
With this function it's possible to jog the robot in a certain direction.
 
Arguments:
    direction {string} -- "X+", "Y+", "Z+", "RX+", "RY+", "RZ+", "X-", "Y-", "Z-", "RX-", "RY-", "RZ-"
 
Keyword Arguments:
    stop {bool} -- if True the robot will stop jogging (default: {False})
powerCallback(self, msg)
resetErrors(self, msg)
With this function it's possible to reset all errors.
!!!ONLY USE THIS FUNCTION WHEN IT'S SAFE!!!
resetUserDigitalOutputs(self)
With this function it's possible to reset all user digital outputs to 0.
saveToolPose(self, name, pose)
With this function it's possible to save a position to the poses.yaml yaml file.
 
Arguments:
    name {string} -- Position name
    pose {[type]} -- [x,y,z,rx,ry,rz] position in mm / degrees
 
Returns:
    [type] -- [description]
sendArcMove(self, p1, p2)
With this function it's possible to do a arc move. The arm will move to p2 through p1.
 
Arguments:
    p1 {list} -- 1st position [x,y,z,rx,ry,rz]
    p2 {list} -- 2nd position [x,y,z,rx,ry,rz]
sendPositionMove(self, x, y, z, rx, ry, rz, speed, frame)
This function is used to move the end effector of the robot to a certain position.
!!!The robot needs to be enables for this function to work!!!
 
Arguments:
    x {int} -- [x position in mm]
    y {int} -- [y position in mm]
    z {int} -- [z position in mm]
    rx {int} -- [rotation around x axis in degrees]
    ry {int} -- [rotation around y axis in degrees]
    rz {int} -- [rotation around z axis in degrees]
    speed {int} -- [speed in % [0 to 100]]
    frame {string} -- [Reference frame (world is base of robot)]
teachCurrentToolPose(self, msg)
With this function it's possible to save the current robot position to the poses.yaml yaml file.
 
Arguments:
    msg {teach_position.srv} -- Name = position name
 
Returns:
    [bool] -- True if succesfull
waitForEndMove(self, pos)
writeDigitalOutput(self, output, state)
With this function it's possible to control the user digital outputs of the robot.
 
Arguments:
    output {int} -- [The user digital output number that needs to be used [1 to 12]
    state {boolean} -- [The state that the output needs to be [True=HIGH (24V), False=LOW (0V)]]

 
Functions
        
radians(...)
radians(x)
 
Convert angle x from degrees to radians.
Clone this wiki locally