예제 #1
0
 def __init__(self):
     self.bfp = True
     self.robot = robot_interface.Robot_Interface()
     self.url = 'http://172.31.76.30:80/ThinkingQ/'
     self.joint_names = ["shoulder_pan_joint",
                    "shoulder_lift_joint", "upperarm_roll_joint",
                    "elbow_flex_joint", "forearm_roll_joint",
                    "wrist_flex_joint", "wrist_roll_joint"]
     self.tf_listener = TransformListener()
     trfm = Transformer()
     self.r2b = trfm.transform_matrix_of_frames(
         'head_camera_rgb_optical_frame', 'base_link')
     self.model = load_model("./model/0.988.h5")
     self.br = TransformBroadcaster()
     self.move_group = MoveGroupInterface("arm", "base_link")
     # self.pose_group = moveit_commander.MoveGroupCommander("arm")
     self.cam = camera.RGBD()
     self.position_cloud = None
     while True:
         try:
             cam_info = self.cam.read_info_data()
             if cam_info is not None:
                 break
         except:
             rospy.logerr('camera info not recieved')
     self.pcm = PCM()
     self.pcm.fromCameraInfo(cam_info)
예제 #2
0
 def __init__(self):
     self.bfp = True
     self.br = tf.TransformBroadcaster()
     self.robot = robot_interface.Robot_Interface()
     self.cam = camera.RGBD()
     while True:
         try:
             cam_info = self.cam.read_info_data()
             if cam_info is not None:
                 break
         except:
             rospy.logerr('info not recieved')
     self.pcm = PCM()
     self.pcm.fromCameraInfo(cam_info)
예제 #3
0
 def __init__(self):
     self.bfp = True
     self.cx = 320
     self.cy = 240
     self.ax = 57.5
     self.ay = 45
     self.fx = self.cx / math.tan(self.ax * math.pi / 180.0 / 2)
     self.fy = self.cy / math.tan(self.ay * math.pi / 180.0 / 2)
     self.robot = robot_interface.Robot_Interface()
     self.br = tf.TransformBroadcaster()
     self.move_group = MoveGroupInterface("arm", "base_link")
     self.pose_group = moveit_commander.MoveGroupCommander("arm")
     self.cam = camera.RGBD()
     while True:
         try:
             cam_info = self.cam.read_info_data()
             if cam_info is not None:
                 break
         except:
             rospy.logerr('info not recieved')
     self.pcm = PCM()
     self.pcm.fromCameraInfo(cam_info)