@ -346,37 +346,36 @@ class TeleVuer:
to = " bgChildren " ,
to = " bgChildren " ,
)
)
while True :
while True :
session . upsert (
[
ImageBackground (
self . img2display [ : , : self . img_width ] ,
aspect = self . aspect_ratio ,
height = 1 ,
distanceToCamera = 1 ,
# The underlying rendering engine supported a layer binary bitmask for both objects and the camera.
# Below we set the two image planes, left and right, to layers=1 and layers=2.
# Note that these two masks are associated with left eye’s camera and the right eye’s camera.
layers = 1 ,
format = " jpeg " ,
quality = 50 ,
key = " background-left " ,
interpolate = True ,
) ,
ImageBackground (
self . img2display [ : , self . img_width : ] ,
aspect = self . aspect_ratio ,
height = 1 ,
distanceToCamera = 1 ,
layers = 2 ,
format = " jpeg " ,
quality = 50 ,
key = " background-right " ,
interpolate = True ,
) ,
] ,
to = " bgChildren " ,
)
# 'jpeg' encoding should give you about 30fps with a 16ms wait in-between.
try :
session . upsert (
[
ImageBackground (
self . img2display [ : , : self . img_width ] ,
aspect = self . aspect_ratio ,
height = 1 ,
distanceToCamera = 1 ,
layers = 1 ,
format = " jpeg " ,
quality = 50 ,
key = " background-left " ,
interpolate = True ,
) ,
ImageBackground (
self . img2display [ : , self . img_width : ] ,
aspect = self . aspect_ratio ,
height = 1 ,
distanceToCamera = 1 ,
layers = 2 ,
format = " jpeg " ,
quality = 50 ,
key = " background-right " ,
interpolate = True ,
) ,
] ,
to = " bgChildren " ,
)
except Exception :
pass # Session dropped; coroutine stays alive for reconnect
await asyncio . sleep ( 1.0 / self . display_fps )
await asyncio . sleep ( 1.0 / self . display_fps )
async def main_image_monocular_zmq ( self , session ) :
async def main_image_monocular_zmq ( self , session ) :
@ -393,7 +392,7 @@ class TeleVuer:
else :
else :
session . upsert (
session . upsert (
MotionControllers (
MotionControllers (
stream = True ,
stream = True ,
key = " motionControllers " ,
key = " motionControllers " ,
left = True ,
left = True ,
right = True ,
right = True ,
@ -402,21 +401,24 @@ class TeleVuer:
)
)
while True :
while True :
session . upsert (
[
ImageBackground (
self . img2display ,
aspect = self . aspect_ratio ,
height = 1 ,
distanceToCamera = 1 ,
format = " jpeg " ,
quality = 50 ,
key = " background-mono " ,
interpolate = True ,
) ,
] ,
to = " bgChildren " ,
)
try :
session . upsert (
[
ImageBackground (
self . img2display ,
aspect = self . aspect_ratio ,
height = 1 ,
distanceToCamera = 1 ,
format = " jpeg " ,
quality = 50 ,
key = " background-mono " ,
interpolate = True ,
) ,
] ,
to = " bgChildren " ,
)
except Exception :
pass # Session dropped; coroutine stays alive for reconnect
await asyncio . sleep ( 1.0 / self . display_fps )
await asyncio . sleep ( 1.0 / self . display_fps )
async def main_image_binocular_webrtc ( self , session ) :
async def main_image_binocular_webrtc ( self , session ) :
@ -515,37 +517,36 @@ class TeleVuer:
to = " bgChildren " ,
to = " bgChildren " ,
)
)
while True :
while True :
session . upsert (
[
ImageBackground (
self . img2display [ : , : self . img_width ] ,
aspect = self . aspect_ratio ,
height = 0.75 ,
distanceToCamera = 2 ,
# The underlying rendering engine supported a layer binary bitmask for both objects and the camera.
# Below we set the two image planes, left and right, to layers=1 and layers=2.
# Note that these two masks are associated with left eye’s camera and the right eye’s camera.
layers = 1 ,
format = " jpeg " ,
quality = 50 ,
key = " background-left " ,
interpolate = True ,
) ,
ImageBackground (
self . img2display [ : , self . img_width : ] ,
aspect = self . aspect_ratio ,
height = 0.75 ,
distanceToCamera = 2 ,
layers = 2 ,
format = " jpeg " ,
quality = 50 ,
key = " background-right " ,
interpolate = True ,
) ,
] ,
to = " bgChildren " ,
)
# 'jpeg' encoding should give you about 30fps with a 16ms wait in-between.
try :
session . upsert (
[
ImageBackground (
self . img2display [ : , : self . img_width ] ,
aspect = self . aspect_ratio ,
height = 0.75 ,
distanceToCamera = 2 ,
layers = 1 ,
format = " jpeg " ,
quality = 50 ,
key = " background-left " ,
interpolate = True ,
) ,
ImageBackground (
self . img2display [ : , self . img_width : ] ,
aspect = self . aspect_ratio ,
height = 0.75 ,
distanceToCamera = 2 ,
layers = 2 ,
format = " jpeg " ,
quality = 50 ,
key = " background-right " ,
interpolate = True ,
) ,
] ,
to = " bgChildren " ,
)
except Exception :
pass
await asyncio . sleep ( 1.0 / self . display_fps )
await asyncio . sleep ( 1.0 / self . display_fps )
async def main_image_monocular_zmq_ego ( self , session ) :
async def main_image_monocular_zmq_ego ( self , session ) :
@ -571,21 +572,24 @@ class TeleVuer:
)
)
while True :
while True :
session . upsert (
[
ImageBackground (
self . img2display ,
aspect = self . aspect_ratio ,
height = 0.75 ,
distanceToCamera = 2 ,
format = " jpeg " ,
quality = 50 ,
key = " background-mono " ,
interpolate = True ,
) ,
] ,
to = " bgChildren " ,
)
try :
session . upsert (
[
ImageBackground (
self . img2display ,
aspect = self . aspect_ratio ,
height = 0.75 ,
distanceToCamera = 2 ,
format = " jpeg " ,
quality = 50 ,
key = " background-mono " ,
interpolate = True ,
) ,
] ,
to = " bgChildren " ,
)
except Exception :
pass
await asyncio . sleep ( 1.0 / self . display_fps )
await asyncio . sleep ( 1.0 / self . display_fps )
async def main_image_binocular_webrtc_ego ( self , session ) :
async def main_image_binocular_webrtc_ego ( self , session ) :