Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Question Delay problem of subscribing image topic from ROS in Unity

Discussion in 'Robotics' started by wy7711, Aug 16, 2022.

  1. wy7711

    wy7711

    Joined:
    Jan 23, 2020
    Posts:
    1
    Hi, I tried to publish a sensor_msgs/Image from ROS to visualize in Unity. I installed ROS-TCP-Connector and Unity Robotics Visualization packages. My image size is 480*640. When my publishing frequency is 30 Hz in ROS, the image visualized in the HUB is like slow motion, and the delay increase as time goes by. I check the time interval of each message callback function, which is around 0.06s (Not fixed frequency). So I reduce the publishing frequency to 5 Hz in ROS, then the delay problem in Unity disappears.

    So I am wondering how to change the subscription frequency in Unity to enhance the performance.

    - Unity version: 2021.3.4 f1
    - ROS TCP Connector: 0.7.0
    - Unity Robotics Visualizations: 0.7.0
     
  2. LaurieUnity

    LaurieUnity

    Unity Technologies

    Joined:
    Oct 23, 2020
    Posts:
    77
  3. Muhammad_Faiq_Malik

    Muhammad_Faiq_Malik

    Joined:
    Sep 27, 2022
    Posts:
    1
    i am having the same lag problem when subscribing to an image topic send over to unity by ROS can u suggest a solution.