51 This class holds methods that are specific to Kawada Industries' dual-arm 52 robot called Nextage Open. 56 ''' Overriding a variable in the superclass to set the arms at higher 58 OffPose = [[0], [0, 0],
59 [25, -140, -150, 45, 0, 0],
60 [-25, -140, -150, -45, 0, 0],
67 _DI_PORTS_L = [25, 21, 22, 23, 24]
68 _DI_PORTS_R = [20, 16, 17, 18, 19]
70 HAND_VER_0_4_2 =
'0.4.2' 71 HAND_VER_0_5_1 =
'0.5.1' 77 Do not get confused that there is also a method called 78 'init' (without trailing underscores) that is succeeded from the 79 super class as the tradition there. 82 if rospy.has_param(
'/gazebo'):
84 print(
"\033[32m[INFO] Assuming Gazebo Simulator, so do not connect to CORBA systmes\033[0m")
90 print(
"ROS Master not found running. If you intended to use it (either for rosbridge or for Gazebo purposes, make sure you run necessary nodes.")
93 super(NextageClient, self).
__init__()
98 def init(self, robotname="HiroNX(Robot)0
", url=""): 100 Calls init from its superclass, which tries to connect RTCManager, 101 looks for ModelLoader, and starts necessary RTC components. Also runs 103 Also internally calls setSelfGroups(). 109 HIRONX.init(self, robotname=robotname, url=url)
116 return 'Hand module not set yet.' 129 @type name_method: str 130 @param name_method: Name of the method that calls this method if available. 132 rospy.logerr(
"You're likely to have called a deprecated method." +
133 " Use self._hands.{} instead".format(name_method))
137 @deprecated: Won't be functional after package version 0.5.1. 138 Use self._hands.%FUNCTION_NAME% instead. 141 return self._hands.handlight_r(is_on)
142 except AttributeError:
147 @deprecated: Won't be functional after package version 0.5.1. 148 Use self._hands.%FUNCTION_NAME% instead. 151 return self._hands.handlight_r(is_on)
152 except AttributeError:
157 @deprecated: Won't be functional after package version 0.5.1. 158 Use self._hands.%FUNCTION_NAME% instead. 161 return self._hands.handlight_both(is_on)
162 except AttributeError:
167 @deprecated: Won't be functional after package version 0.5.1. 168 Use self._hands.%FUNCTION_NAME% instead. 171 return self._hands.toolchanger_l_command.execute(
172 self._hands.toolchanger_l_command.HAND_TOOLCHANGE_OFF)
173 except AttributeError:
178 @deprecated: Won't be functional after package version 0.5.1. 179 Use self._hands.%FUNCTION_NAME% instead. 182 return self._hands.toolchanger_r_command.execute(
183 self._hands.toolchanger_r_command.HAND_TOOLCHANGE_OFF)
184 except AttributeError:
189 @deprecated: Won't be functional after package version 0.5.1. 190 Use self._hands.%FUNCTION_NAME% instead. 193 return self._hands.toolchanger_l_command.execute(
194 self._hands.toolchanger_l_command.HAND_TOOLCHANGE_ON)
195 except AttributeError:
200 @deprecated: Won't be functional after package version 0.5.1. 201 Use self._hands.%FUNCTION_NAME% instead. 204 return self._hands.toolchanger_r_command.execute(
205 self._hands.toolchanger_r_command.HAND_TOOLCHANGE_ON)
206 except AttributeError:
211 @deprecated: Won't be functional after package version 0.5.1. 212 Use self._hands.%FUNCTION_NAME% instead. 215 return self._hands.gripper_l_command.execute(
216 self._hands.gripper_l_command.GRIPPER_CLOSE)
217 except AttributeError:
222 @deprecated: Won't be functional after package version 0.5.1. 223 Use self._hands.%FUNCTION_NAME% instead. 226 return self._hands.gripper_r_command.execute(
227 self._hands.gripper_r_command.GRIPPER_CLOSE)
228 except AttributeError:
233 @deprecated: Won't be functional after package version 0.5.1. 234 Use self._hands.%FUNCTION_NAME% instead. 237 return self._hands.gripper_l_command.execute(
238 self._hands.gripper_r_command.GRIPPER_OPEN)
239 except AttributeError:
244 @deprecated: Won't be functional after package version 0.5.1. 245 Use self._hands.%FUNCTION_NAME% instead. 248 return self._hands.gripper_r_command.execute(
249 self._hands.gripper_r_command.GRIPPER_OPEN)
250 except AttributeError:
255 @deprecated: Won't be functional after package version 0.5.1. 256 Use self._hands.%FUNCTION_NAME% instead. 259 return self._hands.airhand_l_command.execute(
260 self._hands.airhand_l_command.AIRHAND_DRAWIN)
261 except AttributeError:
266 @deprecated: Won't be functional after package version 0.5.1. 267 Use self._hands.%FUNCTION_NAME% instead. 270 return self._hands.airhand_r_command.execute(
271 self._hands.airhand_r_command.AIRHAND_DRAWIN)
272 except AttributeError:
277 @deprecated: Won't be functional after package version 0.5.1. 278 Use self._hands.%FUNCTION_NAME% instead. 281 return self._hands.airhand_l_command.execute(
282 self._hands.airhand_l_command.AIRHAND_KEEP)
283 except AttributeError:
288 @deprecated: Won't be functional after package version 0.5.1. 289 Use self._hands.%FUNCTION_NAME% instead. 292 return self._hands.airhand_r_command.execute(
293 self._hands.airhand_r_command.AIRHAND_KEEP)
294 except AttributeError:
299 @deprecated: Won't be functional after package version 0.5.1. 300 Use self._hands.%FUNCTION_NAME% instead. 303 return self._hands.airhand_l_command.execute(
304 self._hands.airhand_l_command.AIRHAND_RELEASE)
305 except AttributeError:
310 @deprecated: Won't be functional after package version 0.5.1. 311 Use self._hands.%FUNCTION_NAME% instead. 314 return self._hands.airhand_r_command.execute(
315 self._hands.airhand_r_command.AIRHAND_RELEASE)
316 except AttributeError:
321 @deprecated: Won't be functional after package version 0.5.1. 322 Use self._hands.%FUNCTION_NAME% instead. 324 Reset all DIO channels to "off" state except for toolchanger lockers 325 (if they are turned off the attached tools will fall). 327 self._hands.init_dio()
331 Overwriting HrpsysConfigurator.getRTCList 332 Returning predefined list of RT components. 334 @return List of available components. Each element consists of a list 335 of abbreviated and full names of the component. 338 [
'seq',
"SequencePlayer"],
339 [
'sh',
"StateHolder"],
340 [
'fk',
"ForwardKinematics"],
341 [
'el',
"SoftErrorLimiter"],
344 [
'ic',
"ImpedanceController"],
345 [
'log',
"DataLogger"]
350 @see: HIRONX.goInitial 352 if not init_pose_type:
354 init_pose_type = HIRONX.INITPOS_TYPE_EVEN
355 return HIRONX.goInitial(self, tm, wait, init_pose_type)
359 Print the currently set values of digital input registry. Print output order is tailored 360 for the hands' functional group; DIO spec that is disloseable as of 7/17/2014 is: 363 DI26: Tool changer attached or not. 365 DI24, 25: Compliance. 368 DI21: Tool changer attached or not. 370 DI19, 20: Compliance. 372 Example output, for the right hand: 376 In [1]: robot.printDin([20, 16, 17, 18, 19]) 382 Out[1]: [(20, 0), (16, 0), (17, 0), (18, 0), (19, 0)] 384 Hand attached, fingers closed: 386 In [1]: robot.printDin([20, 16, 17, 18, 19]) 392 Out[1]: [(20, 0), (16, 0), (17, 0), (18, 0), (19, 0)] 394 @author: Koichi Nagashima 396 @type ports: int or [int]. 397 @param dumpFlag: Print each pin if True. 398 @param ports: A port number or a list of port numbers in D-in registry. 400 @return: List of tuples of port and din value. If the arg ports was an int value, 401 this could be a list with single tuple in it. 403 if isinstance(ports, int):
408 din = self.readDigitalInput();
412 if (dumpFlag): print(
"DI%02d is %d"%(port+1,res));
413 resAry.append((port, res));
def handtool_l_attach(self)
def readDinGroup(self, ports, dumpFlag=True)
def init(self, robotname="HiroNX(Robot)0", url="")
def airhand_r_drawin(self)
def readDinGroupR(self, dumpFlag=True)
def handlight_l(self, is_on=True)
def set_hand_version(self, version=HAND_VER_0_5_1)
def _print_msg_deprecated_dio_methods(self, name_method=None)
def readDinGroupL(self, dumpFlag=True)
def airhand_l_release(self)
def initialize_hand_dio(self)
def airhand_r_release(self)
def get_hand_version(self)
def handtool_r_attach(self)
def goInitial(self, tm=7, wait=True, init_pose_type=0)
def handtool_l_eject(self)
def gripper_l_close(self)
def airhand_l_drawin(self)
def handlight_both(self, is_on=True)
def gripper_r_close(self)
def handlight_r(self, is_on=True)
def handtool_r_eject(self)