Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image transfer delay from robot camera to visionpro under local network transmission #52

Open
obito8065 opened this issue Feb 13, 2025 · 1 comment

Comments

@obito8065
Copy link

Thank you very much for your outstanding contribution!
Excuse me,I noticed: when I use opentelevision's default local image transfer (on LAN), the video I see in visionpro will be delayed by more than 500ms compared to the robotic camera, and we found that the shared memory transferring the image also takes only 40ms, is it because visionpro's network latency is too high? How can I improve this image transfer latency problem from host to visionpro?

@obito8065
Copy link
Author

async def main_image(self, session, fps=60):
session.upsert @ Hands(fps=fps, stream=True, key="hands", showLeft=False, showRight=False)
end_time = time.time()
while True:
start = time.time()
display_image = self.img_array

        session.upsert(
        [ImageBackground(
            # Can scale the images down.
            display_image[::2, :self.img_width],
            # display_image[:self.img_height:2, ::2],
            # 'jpg' encoding is significantly faster than 'png'.
            format="jpeg",
            quality=80,
            key="left-image",
            interpolate=True,
            # fixed=True,
            aspect=1.66667,
            # distanceToCamera=0.5,
            height = 8,
            position=[0, -1, 3],
            # rotation=[0, 0, 0],
            layers=1, 
            alphaSrc="./vinette.jpg"
        ),
        ImageBackground(
            # Can scale the images down.
            display_image[::2, self.img_width:],
            # display_image[self.img_height::2, ::2],
            # 'jpg' encoding is significantly faster than 'png'.
            format="jpeg",
            quality=80,
            key="right-image",
            interpolate=True,
            # fixed=True,
            aspect=1.66667,
            # distanceToCamera=0.5,
            height = 8,
            position=[0, -1, 3],
            # rotation=[0, 0, 0],
            layers=2, 
            alphaSrc="./vinette.jpg"
        )],
        to="bgChildren",
        )
        # rest_time = 1/fps - time.time() + start
        end_time = time.time()
        await asyncio.sleep(0.03)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant