def __init__(self, jointNames, poseData, cameraInfoDict, cameraSerialNumber=1112170110, poseFilename=None, cameraInfoFilename=None, tfBuffer=None): self.jointNames = jointNames self.poseData = poseData self.cameraInfoDict = cameraInfoDict self.tfBuffer = tfBuffer self.poseFilename = poseFilename self.cameraInfoFilename = cameraInfoFilename self.robotService = rosUtils.RobotService(self.jointNames) self.cameraSerialNumber = cameraSerialNumber self.setupConfig() self.setup() if USING_DIRECTOR: self.taskRunner = TaskRunner() self.taskRunner.callOnThread(self.setupTF) else: self.setupTF()
def __init__(self): self.bagging = False self.rosbag_proc = None storedPosesFile = os.path.join(spartanUtils.getSpartanSourceDir(), 'src', 'catkin_projects', 'station_config','RLG_iiwa_1','stored_poses.yaml') self.storedPoses = spartanUtils.getDictFromYamlFilename(storedPosesFile) self.robotService = rosUtils.RobotService(self.storedPoses['header']['joint_names']) self.setupConfig()
def __init__(self, camera_serial_number="carmine_1"): self.camera_serial_number = camera_serial_number self.bagging = False self.rosbag_proc = None self.tfBuffer = None storedPosesFile = os.path.join(spartanUtils.getSpartanSourceDir(), 'src', 'catkin_projects', 'station_config','RLG_iiwa_1','stored_poses.yaml') self.storedPoses = spartanUtils.getDictFromYamlFilename(storedPosesFile) self.robotService = rosUtils.RobotService(self.storedPoses['header']['joint_names']) self.setupConfig() self.setupSubscribers() self.setupPublishers() self.setupTF() self.setupCache()
def __init__(self, homeCartesianPoint, touchCartesianPoints): self.jointNames = (u'iiwa_joint_1', u'iiwa_joint_2', u'iiwa_joint_3', u'iiwa_joint_4', u'iiwa_joint_5', u'iiwa_joint_6', u'iiwa_joint_7') self.robotService = spartanROSUtils.RobotService(self.jointNames) self.currentJointPosition = [0] * len(self.jointNames) self.maxJointDegreesPerSecond = 15 self.homeJointPosition = self.getJointPositions(homeCartesianPoint) self.touchJointPositions = [ self.getJointPositions(point) for point in touchCartesianPoints ] rospy.Subscriber("/joint_states", sensor_msgs.msg.JointState, self.storeCurrentJointPosition) rospy.Subscriber("/stop", std_msgs.msg.Bool, self.stopCurrentPoint)
def __init__(self, robotSystem, handFrame='palm', stopChannel="/stop", removeFloatingBase=True, cameraSerialNumber=1112170110): self.robotSystem = robotSystem self.jointNames = self.robotSystem.ikPlanner.robotModel.model.getJointNames( ) print self.jointNames if removeFloatingBase: self.jointNames = self.jointNames[6:] self.robotService = spartanROSUtils.RobotService(self.jointNames) self.handFrame = handFrame self.cameraSerialNumber = cameraSerialNumber self.removeFloatingBase = removeFloatingBase self.maxJointDegreesPerSecond = 15 rospy.Subscriber(stopChannel, std_msgs.msg.Bool, self.stopCurrentPoint) self.taskRunner = TaskRunner()
def __init__(self, storedPosesFile=None, cameraSerialNumber=1112170110): self.storedPoses = spartanUtils.getDictFromYamlFilename( storedPosesFile) self.cameraSerialNumber = cameraSerialNumber self.cameraName = 'camera_' + str(cameraSerialNumber) self.pointCloudTopic = '/' + str(self.cameraName) + '/depth/points' self.graspFrameName = 'base' self.depthOpticalFrameName = self.cameraName + "_depth_optical_frame" self.robotService = rosUtils.RobotService( self.storedPoses['header']['joint_names']) self.usingDirector = True self.setupConfig() if USING_DIRECTOR: self.taskRunner = TaskRunner() self.taskRunner.callOnThread(self.setupSubscribers) self.taskRunner.callOnThread(self.setupTF) else: self.setupSubscribers() self.setupTF()