def __init__(self,cam):
        #topic_name = '/hsrb/head_rgbd_sensor/depth_registered/image_raw'
        


        not_read = True
        while not_read:

            try:
                cam_info = cam.read_info_data()
                if(not cam_info == None):
                    not_read = False
            except:
                rospy.logerr('info not recieved')
       

        self.pcm = PCM()

        self.cam = cam
    
        self.pcm.fromCameraInfo(cam_info)
        self.br = tf.TransformBroadcaster()
        self.tl = tf.TransformListener()

        self.xbox = XboxController()
Exemple #2
0
    def __init__(self):

        self.xbox = XboxController()
        self.robot = hsrb_interface.Robot()
        self.whole_body = self.robot.get('whole_body')
        self.gripper = self.robot.get('gripper')

        self.pubTwist = rospy.Publisher('hsrb/command_velocity',
                                        Twist,
                                        queue_size=1)
Exemple #3
0
    def __init__(self, com=None, inject_noise=False, noise_scale=1.0):

        self.alpha = noise_scale

        self.xbox = XboxController()
        self.com = com

        self.i_n = inject_noise

        if (self.i_n):
            self.cov_matrix = pickle.load(
                open(self.com.Options.stats_dir + 'cov_matrix.p', 'rb'))

        self.pubTwist = rospy.Publisher('hsrb/command_velocity',
                                        Twist,
                                        queue_size=1)
        self.record_actions = np.zeros(2)
        self.curr_action = np.zeros(3)
        self.twist_applied = None