I’m launching a nvidia::isaac_ros::h264_decoder::DecoderNode from the isaac_ros_h264_decoder package, using the launch file below which should be identical to the getting started guide.
Can somebody explain a high CPU usage pattern which I’m observing?
On x86 / RTX 4090 / Isaac ROS docker containers I’m observing an unexpected high CPU usage of 100% of a core, in addition to the expected low <10% “DEC” usage (reported in nvtop). CPU rises from just 1% to 100% only when the first h.264 message is decoded, but does not drop even if there are no more h.264 messages to be decoded.
Note, I’m experiencing almost zero CPU usage when decoding the same h.264 stream using a gstreamer pipeline which decodes the frames using h264parse ! nvh264dec ! video/x-raw(memory:CUDAMemory), format=(string)NV12 ! fakesink sync=false. This makes me wonder if I’m missing anything important about Nitros node’s internal operation theory.
Pipeline launched using ros2 launch test test_h264_decoder.launch.py:
import launch
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode
def generate_launch_description():
"""Launch the H.264 Decoder Node."""
decoder_node = ComposableNode(
name='decoder',
package='isaac_ros_h264_decoder',
plugin='nvidia::isaac_ros::h264_decoder::DecoderNode'
)
container = ComposableNodeContainer(
name='decoder_container',
namespace='',
package='rclcpp_components',
executable='component_container_mt',
composable_node_descriptions=[decoder_node],
output='screen',
arguments=['--ros-args', '--log-level', 'info']
)
return (launch.LaunchDescription([container]))