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.

ROS-TCP-Endpoint consumes all RAM

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

  1. elanius

    elanius

    Joined:
    Oct 31, 2022
    Posts:
    2
    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

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,311
    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

    elanius

    Joined:
    Oct 31, 2022
    Posts:
    2
    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

    Luzma1330

    Joined:
    Mar 20, 2022
    Posts:
    1
    Hi!
    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