NVIDIA-ISAAC-ROS / isaac_ros_apriltag

NVIDIA-accelerated Apriltag detection and pose estimation.
https://developer.nvidia.com/isaac-ros-gems
Apache License 2.0
107 stars 19 forks source link

Jetson Xavier NX High CPU Usage #13

Closed trentatsa closed 1 year ago

trentatsa commented 2 years ago

Hi there, I followed all steps in order to run this package within the provided ROS humble docker using Jetpack 5.0.1 on a Jetson Xavier NX and all is working as should however, my CPU usage is 200% which defeats the point of using isaac_apriltag package in the first place as the CPU based packages usage is on a order of magnitude less. Is this normal and if not what could be the problem ?

Thanks for your help!

hemalshahNV commented 2 years ago

This is unexpected as there really is no significant code in isaac_ros_apriltag that executes on CPU. Is there anything else running on the NX? Running jtop might give us some insight into what's eating up the CPUs. Could you post the launch file perhaps you're using to try out isaac_ros_apriltag which shows the camera node being used? We'll attempt to reproduce this on an NX in the meantime.

trentatsa commented 2 years ago

@hemalshahNV appreciate you looking into it. By 200% I meant the isaac-apriltag package is using 200% CPU within the docker. Looking forward to seeing what you can find :)

trentatsa commented 2 years ago

Hi @hemalshahNV , any progress on reproducing the issue ?

hemalshahNV commented 2 years ago

We can reproduce top claiming CPU utilization of over 200% on an NX, AGX, and even x86 while running any of our packages it seems, but this doesn't seem to be an accurate characterization. The %cpu at the top for 13.3 us/user is more accurate, 84% id/idle). The CPU utilization shown for a process is per CPU, not core: (link). The ROS2 process is consuming time on the cores of one CPU, leaving 7 remaining idle on the NX. When running with jtop and other sysstat utilities in our benchmark framework for isaac_ros_apriltag, we don't see overall CPU usage of more than 15-30% which is more consistent with what we would expect.

avg_cpu_x86_apriltag_14%