42 from abs_hand_command
import AbsractHandCommand
47 With airhand, to release by blowing air needs to be stopped after certain 48 amount of time. Usually a few seconds, not too short for the air compressor 49 to have ample time for a reaction, is a good idea. This thread is used 50 in order to do so without letting the computer program halt. 54 @type command: AirhandCommand 56 threading.Thread.__init__(self)
62 self._command.execute(self._command.AIRHAND_KEEP)
67 Following Command design pattern, this class represents command for 68 an Airhand of NEXTAGE OPEN. 70 As of 2/1/2014, it's only implemented for a right arm (since there's no 71 testing environment for left arm). 76 AIRHAND_DRAWIN =
'drawin' 78 AIRHAND_RELEASE =
'release' 82 AIRHAND_DANGER =
'danger' 86 @see nextage_ros_bridge.command.abs_hand_command.AbsractHandCommand 87 @type hands: nextage_ros_bridge.base_hands.BaseHands 89 @param hand: Side of hand. Variables that are defined in 90 nextage_ros_bridge.base_hands.BaseHands can be used { HAND_L, HAND_R }. 92 super(AirhandCommand, self).
__init__(hands, hand, dio_pins)
97 @see abs_hand_command.AbsractHandCommand._assign_dio_names 107 @see abs_hand_command.AbsractHandCommand.execute 115 if self._hands.HAND_L == self._hand:
117 elif self._hands.HAND_R == self._hand:
120 raise RuntimeError(
'Make sure _hands object, _hand value are set.')
123 if self._hands.HAND_L == self._hand:
125 elif self._hands.HAND_R == self._hand:
128 if self._hands.HAND_L == self._hand:
130 elif self._hands.HAND_R == self._hand:
133 if self._hands.HAND_L == self._hand:
135 elif self._hands.HAND_R == self._hand:
144 rospy.logwarn(
'No gripper specified. Do nothing.')
146 return self._hands._dio_writer(dout, mask)
def _assign_dio_names(self, dio_pins)
def execute(self, operation)
def __init__(self, hands, hand, dio_pins)
def __init__(self, command, sleeptime)