def setUpClass(cls): modelfile = '/opt/jsk/etc/HIRONX/model/main.wrl' rtm.nshost = 'hiro024' robotname = "RobotHardware0" cls.robot = hironx.HIRONX() cls.robot.init(robotname=robotname, url=modelfile)
def setUpClass(self): self.listener = tf.TransformListener() hiro = hironx_client.HIRONX() hiro.init() self.larm = actionlib.SimpleActionClient( "/larm_controller/joint_trajectory_action", JointTrajectoryAction) self.rarm = actionlib.SimpleActionClient( "/rarm_controller/joint_trajectory_action", JointTrajectoryAction) self.torso = actionlib.SimpleActionClient( "/torso_controller/joint_trajectory_action", JointTrajectoryAction) self.head = actionlib.SimpleActionClient( "/head_controller/joint_trajectory_action", JointTrajectoryAction) self.larm.wait_for_server() self.rarm.wait_for_server() self.torso.wait_for_server() self.head.wait_for_server() rospy.wait_for_service('/SequencePlayerServiceROSBridge/setTargetPose') self.set_target_pose = rospy.ServiceProxy( '/SequencePlayerServiceROSBridge/setTargetPose', OpenHRP_SequencePlayerService_setTargetPose) rospy.wait_for_service( '/SequencePlayerServiceROSBridge/waitInterpolationOfGroup') self.wait_interpolation_of_group = rospy.ServiceProxy( '/SequencePlayerServiceROSBridge/waitInterpolationOfGroup', OpenHRP_SequencePlayerService_waitInterpolationOfGroup)
def setUpClass(cls): modelfile = rospy.get_param("hironx/collada_model_filepath") rtm.nshost = 'hiro014' robotname = "RobotHardware0" cls.robot = hironx.HIRONX() cls.robot.init(robotname=robotname, url=modelfile)
def setUpClass(self): # Robot info tentatively embedded. modelfile = '/opt/jsk/etc/HIRONX/model/main.wrl' rtm.nshost = 'nxc100' robotname = "RobotHardware0" self._robot = hironx.HIRONX() self._robot.init(robotname=robotname, url=modelfile)
def setUpClass(self): #modelfile = rospy.get_param("hironx/collada_model_filepath") #rtm.nshost = 'hiro014' #robotname = "RobotHardware0" self.robot = hironx.HIRONX() #self.robot.init(robotname=robotname, url=modelfile) self.robot.init()
def setUpClass(self): modelfile = '/opt/jsk/etc/HIRONX/model/main.wrl' rtm.nshost = 'hiro024' robotname = "RobotHardware0" self._robot = hironx.HIRONX() self._robot.init(robotname=robotname, url=modelfile) self._robot.goInitial(_GOINITIAL_TIME_MIDSPEED)
def setUpClass(self): modelfile = rospy.get_param("hironx/collada_model_filepath") rtm.nshost = 'hiro024' robotname = "RobotHardware0" self._robot = hironx.HIRONX() self._robot.init(robotname=robotname, url=modelfile) self._robot.goInitial(_GOINITIAL_TIME_MIDSPEED)
def _init_hironx_rtmclient(self): MODEL_LOCATION_REALROBOT = '/opt/jsk/etc/HIRONX/model/main.wrl' CORBA_NAMESERVER_NAME = rospy.get_param( self._NAMESPACE + "/CORBA_NAMESERVER_NAME", 'hiro') CORBA_PORT = rospy.get_param(self._NAMESPACE + "/CORBA_PORT", 15005) MODELFILE_HRPSYS = rospy.get_param( self._NAMESPACE + "/MODELFILE_HRPSYS", MODEL_LOCATION_REALROBOT) ROBOTNAME_HRPSYS = rospy.get_param( self._NAMESPACE + "/ROBOTNAME_HRPSYS", 'RobotHardware') rtm.nshost = CORBA_NAMESERVER_NAME rtm.nsport = CORBA_PORT # Wait for RTM servers to come up. This allows (hopefully) RPC servers # to be launched together with the RTMs. import time _time_sleep = rospy.get_param( self._NAMESPACE + '/SLEEP_INIT_RTMCLIENT', 5.0) rospy.loginfo( 'Sleep {} seconds to wait for RTM servers'.format(_time_sleep)) time.sleep(_time_sleep) robot = hironx_client.HIRONX() robot.init(robotname=ROBOTNAME_HRPSYS, url=MODELFILE_HRPSYS) return robot
if args.host: rtm.nshost = args.host if args.port: rtm.nsport = args.port if not args.robot: args.robot = "RobotHardware0" if args.host else "HiroNX(Robot)0" if not args.modelfile: args.modelfile = "/opt/jsk/etc/HIRONX/model/main.wrl" if args.host else "" # support old style format if len(unknown) >= 2: args.robot = unknown[0] args.modelfile = unknown[1] args.collision = (unknown[4].lower() == 'true') robot = hiro = hironx_client.HIRONX() robot.init(robotname=args.robot, url=args.modelfile, collision=args.collision) # ROS Client try: ros = ROS_Client() except ROSInitException as e: print('[nextage.py] {}'.format(e)) except socket.error as e: print("\033[31m%s\n%s\033[0m" % (e.strerror, errormsg_noros)) # for simulated robot # $ ./hironx.py #