Skip to content

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

Open

Description

@horizoneee

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?

Activity

  1. horizoneee commented on Feb 13, 2025

    @horizoneee
    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)
    
  2. Junye-Chen commented on May 12, 2025

    @Junye-Chen

    @obito8065 I also met the same problem and my latency is even much higher than yours.
    I use the Meta Quest3 device and the LAN connection.
    Have u solve this problem?

  3. horizoneee commented on May 12, 2025

    @horizoneee
    Author

    @obito8065 I also met the same problem and my latency is even much higher than yours. I use the Meta Quest3 device and the LAN connection. Have u solve this problem?
    I didn't solve this problem completely, I harvested some experience through a lot of experiments for your reference: first of all, this network latency is related to your network, you need to check your network latency first. I encountered the problem of smooth video in the morning and laggy video in the afternoon. Also, standing closer to the signal source works a little better, all the above problems I think are due to avp's network latency issues. Secondly, when I use it, when refreshing the web page, I don't enter it immediately, but wait for the video in the window to stabilize (may be 1s, may be more than 10s) and then click ENTER, so that the video will play normally and smoothly! Hope the above suggestions help you.

  4. Junye-Chen commented on May 12, 2025

    @Junye-Chen

    @obito8065 Thank you very much for your kindness!
    The second advice is really helpful and I also find that when using a lower resolution can alleviate this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions