NVIDIA-ISAAC-ROS / isaac_ros_argus_camera

ROS 2 packages based on NVIDIA libArgus library for NVIDIA-accelerated CSI camera support.
https://developer.nvidia.com/isaac-ros-gems
Apache License 2.0
64 stars 12 forks source link

Low FPS on AR0820 #29

Closed MitchellMitch closed 6 months ago

MitchellMitch commented 10 months ago

Hello,

We are using a Leopard Imaging AR0820 camera (4K@30FPS) on a Jetson AGX Xavier (power mode 0 and jetson clocks active). We have mainly used gstreamer and deepstream so far and never encountered any performance issues. Now we have tested moving the whole pipeline to issac ros. We use the ArgusMonoNode to grab the frames from the camera and then use the h264_encoder for compressed recording as well as a ResizeNode to create an uncompressed "preview" stream for Foxglove studio.
Unfortunately, we have not yet been able to achieve more than about 15 FPS.

Should it be possible to get more FPS than this? And if yes, are there any performance debugging tools we can use, for example, whether NITROS is used properly, etc.?

Following is the launch file we are using: ` import launch from launch.actions import ExecuteProcess from launch_ros.actions import ComposableNodeContainer from launch_ros.descriptions import ComposableNode

def generate_launch_description(): argus_mono_node = ComposableNode( namespace='/sensors/camera/front_center', name='argus_mono', package='isaac_ros_argus_camera', plugin='nvidia::isaac_ros::argus::ArgusMonoNode', remappings=[ ('left/image_raw', 'image_raw'), ('left/camerainfo', 'camerainfo'), ('left/image_raw/nitros', 'image_raw/nitros'), ('left/camerainfo/nitros', 'camerainfo/nitros'), ], parameters=[{ 'camera_id': 0, 'mode': 0, 'camera_type': 0, 'camera_info_url': '', 'optical_frame_name': 'front_center', }], )

encoder_node = ComposableNode(
    namespace='/sensors/camera/front_center',
    name='encoder_node',
    package='isaac_ros_h264_encoder',
    plugin='nvidia::isaac_ros::h264_encoder::EncoderNode',
    parameters=[{
        'input_width': 3840,
        'input_height': 2160,
    }],
)

preview_video_node = ComposableNode(
    namespace='/sensors/camera/front_center',
    name='resize_node',
    package='isaac_ros_image_proc',
    plugin='nvidia::isaac_ros::image_proc::ResizeNode',
    parameters=[{
        'output_width': 480,
        'output_height': 270,
    }],
    remappings=[
        ('image', 'image_raw'),
        ('image/nitros', 'image_raw/nitros'),
        ('camera_info', 'camerainfo'),
        ('camera_info/nitros', 'camerainfo/nitros'),
        ('resize/image', 'image_preview'),
        ('resize/camera_info', 'camerainfo_preview'),
        ('resize/image/nitros', 'image_preview/nitros'),
        ('resize/camera_info/nitros', 'camerainfo_preview/nitros'),
    ],
)

# rosbag_record = ExecuteProcess(
#     cmd=['ros2', 'bag', 'record', '/left/camerainfo', '/right/camerainfo',
#          '/left/image_compressed', '/right/image_compressed'],
#     output='screen')

container = ComposableNodeContainer(
    name='encoder_container',
    namespace='',
    package='rclcpp_components',
    executable='component_container',
    composable_node_descriptions=[argus_mono_node, encoder_node, preview_video_node],
    output='screen',
    arguments=['--ros-args', '--log-level', 'info']
)

return (launch.LaunchDescription([container]))

`

Thanks!

Best Regards, Michael

jaiveersinghNV commented 9 months ago

Could you verify if your system is able to replicate the benchmark performance numbers we publish here?

This quickstart walks through how to run the Isaac ROS AprilTag Node benchmark. You can follow a very similar process and use our Isaac ROS H.264 Encoder benchmark script to make sure you match the same numbers reported on our performance summary.

If you're able to match the numbers of our benchmark but still get degraded performance on your custom graph, you can prepare and upload a corresponding custom benchmark script in the same pattern as our existing Isaac ROS benchmark graphs. We can then run that script on one of our machines and see if we get the same results.