Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

ROS-TCP-Endpoint consumes all RAM

Discussion in 'Robotics' started by elanius, Dec 21, 2022.

  1. elanius


    Oct 31, 2022
    Hi there.
    I am trying to visualize a point cloud from a depth camera mounted on a drone. Currently, I am using just a gazebo to produce a point cloud. However, when I tried to use ROS-TCP-Endpoint to send data to unity. It quickly consumed all my RAM, and when the system started to use swap it became unresponsive.

    I am slightly disappointed because I hoped to use unity as my ground station to control the drone and visualize a captured 3D scene.

    I also tried to reduce the frequency of a point cloud topic, but the result was the same.
    Are there some settings for ROS-TCP-Endpoint which could change the behaviour of this node? e.g. drop not delivered messages or choose topics which should be distributed to unity. Or turn on some logs or statistics to see what exactly is using all the memory?

    Any guidances for my problem are welcome.
  2. Antypodish


    Apr 29, 2014
    Unity has a memory profiler.
    Capture some memory snapshots and check, what eats your memory.
    Generally processing point clouds it is relative expensive for computing.

    Maybe you are overloading your ground station with data?

    How much memory you have?
  3. elanius


    Oct 31, 2022
    I think this is not directly the problem of unity, but it is related to ROS-TCP-Endpoint, which is the python ROS node. It is running inside a Linux docker environment. I can see in htop that this process (node) is consuming a lot of memory and is steadily growing.
    I have 16GB of RAM. I am somewhere around 10GB when I start ROS-TCP-Endpoint, and from this point, all remaining memory is consumed, and then the swap begins to grow too. But at this time, my computer became unworkable, and I must kill the ROS-TCP-Endpoint process.
  4. Luzma1330


    Mar 20, 2022
    it is completely true that ROS-TCP-Endpoint consumes all the RAM.
    Has anyone found a solution?
    I am working with ROS2 and ubuntu.
    Thanks in advance