示例#1
0
    def __init__(self):
        self.ORIGINAL_FORWARD = sl.Translation()
        self.ORIGINAL_FORWARD.init_vector(0,0,1)
        self.ORIGINAL_UP = sl.Translation()
        self.ORIGINAL_UP.init_vector(0,1,0)
        self.ORIGINAL_RIGHT = sl.Translation()
        self.ORIGINAL_RIGHT.init_vector(1,0,0)
        self.znear = 0.5
        self.zfar = 100.
        self.horizontalFOV = 70.
        self.orientation_ = sl.Orientation()
        self.position_ = sl.Translation()
        self.forward_ = sl.Translation()
        self.up_ = sl.Translation()
        self.right_ = sl.Translation()
        self.vertical_ = sl.Translation()
        self.vpMatrix_ = sl.Matrix4f()
        self.offset_ = sl.Translation()
        self.offset_.init_vector(0,0,5)
        self.projection_ = sl.Matrix4f()
        self.projection_.set_identity()
        self.setProjection(1.78)

        self.position_.init_vector(0., 0., 0.)
        tmp = sl.Translation()
        tmp.init_vector(0, 0, -.1)
        tmp2 = sl.Translation()
        tmp2.init_vector(0, 1, 0)
        self.setDirection(tmp, tmp2)        
示例#2
0
    def __init__(self):
        self.ORIGINAL_FORWARD = sl.Translation()
        self.ORIGINAL_FORWARD.init_vector(0, 0, 1)
        self.ORIGINAL_UP = sl.Translation()
        self.ORIGINAL_UP.init_vector(0, 1, 0)
        self.ORIGINAL_RIGHT = sl.Translation()
        self.ORIGINAL_RIGHT.init_vector(1, 0, 0)
        self.znear = 0.5
        self.zfar = 100.
        self.horizontalFOV = 70.
        self.orientation_ = sl.Orientation()
        self.position_ = sl.Translation()
        self.forward_ = sl.Translation()
        self.up_ = sl.Translation()
        self.right_ = sl.Translation()
        self.vertical_ = sl.Translation()
        self.vpMatrix_ = sl.Matrix4f()
        self.projection_ = sl.Matrix4f()
        self.projection_.set_identity()
        self.setProjection(1.78)

        self.position_.init_vector(0., 5., -3.)
        tmp = sl.Translation()
        tmp.init_vector(0, 0, -4)
        tmp2 = sl.Translation()
        tmp2.init_vector(0, 1, 0)
        self.setDirection(tmp, tmp2)
        cam_rot = sl.Rotation()
        cam_rot.set_euler_angles(-50., 180., 0., False)
        self.setRotation(cam_rot)
示例#3
0
def main():
    rospy.init_node("rosnode_zed")
    signalRecieved = True
    while not signalRecieved:
        pass
    plane = sl.Plane()
    data = np.array([0, 0, 0, 0])
    trasnform_matrix = sl.Matrix4f(data)
    transform = sl.Transform(trasnform_matrix)
    initProcessing(plane, transform)

    while True:
        grabFrames()
        time.sleep(0.1)
示例#4
0
    def __init__(self):
        self.available = False
        self.mutex = Lock()
        self.projection = sl.Matrix4f()
        self.projection.set_identity()
        self.znear = 0.1
        self.zfar = 100.
        self.image_handler = ImageHandler()
        self.pose = sl.Transform().set_identity()
        self.tracking_state = sl.POSITIONAL_TRACKING_STATE.OFF

        self.mesh_object = MeshObject()
        self.user_action = UserAction()
        self.new_data = False
        self.wnd_w = 0
        self.wnd_h = 0
示例#5
0
 def __init__(self):
     self.available = False
     self.mutex = Lock()
     self.draw_mesh = False
     self.new_chunks = False
     self.chunks_pushed = False
     self.change_state = False
     self.projection = sl.Matrix4f()
     self.projection.set_identity()
     self.znear = 0.5
     self.zfar = 100.
     self.image_handler = ImageHandler()
     self.sub_maps = []
     self.pose = sl.Transform().set_identity()
     self.tracking_state = sl.POSITIONAL_TRACKING_STATE.OFF
     self.mapping_state = sl.SPATIAL_MAPPING_STATE.NOT_ENABLED