Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU use when running multiple instances of ArgusMonoNode #42

Open
SyedShayaan opened this issue May 2, 2024 · 1 comment
Open

Comments

@SyedShayaan
Copy link

SyedShayaan commented May 2, 2024

ISSUE:
I am running a 7 gmsl camera's using the argus mono camera node and I am getting high CPU usage .

SYSTEM:

  • Jetson AGX Orin Industrial
  • CPU(s): 8 core
  • RAM 30 gig

CAMERA:
LI-IMX568-GMSL2-105H

Furthermore, if I add isaac ros h264 encoder to the pipeline, my cpu utilization goes to 100% for all 8 cores, and in jtop I can see the NVENC toggle on and off.

JTOP before running 7 camera nodes:
image

JTOP after running 7 camera nodes:
image

Launch File:

import launch
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode

def generate_launch_description():    
    # Define parameters for each camera module
    camera_modules = [
        {'camera_id': 6, 'module_id': 0, 'mode': 0, 'fsync_type': 1, 'camera_type': 0, 'camera_link_frame_name': 'camera_0', 'optical_frame_name': 'left_cam_0', 'camera_info_url': ''},
        {'camera_id': 2, 'module_id': 2, 'mode': 0, 'fsync_type': 1, 'camera_type': 0, 'camera_link_frame_name': 'camera_2', 'optical_frame_name': 'left_cam_2', 'camera_info_url': ''},
        {'camera_id': 3, 'module_id': 2, 'mode': 0, 'fsync_type': 1, 'camera_type': 0, 'camera_link_frame_name': 'camera_2', 'optical_frame_name': 'left_cam_2', 'camera_info_url': ''},
        {'camera_id': 0, 'module_id': 4, 'mode': 0, 'fsync_type': 1, 'camera_type': 0, 'camera_link_frame_name': 'camera_4', 'optical_frame_name': 'left_cam_4', 'camera_info_url': ''},
        {'camera_id': 1, 'module_id': 4, 'mode': 0, 'fsync_type': 1, 'camera_type': 0, 'camera_link_frame_name': 'camera_4', 'optical_frame_name': 'left_cam_4', 'camera_info_url': ''},
        {'camera_id': 4, 'module_id': 5, 'mode': 0, 'fsync_type': 1, 'camera_type': 0, 'camera_link_frame_name': 'camera_5', 'optical_frame_name': 'left_cam_5', 'camera_info_url': ''},
        {'camera_id': 5, 'module_id': 5, 'mode': 0, 'fsync_type': 1, 'camera_type': 0, 'camera_link_frame_name': 'camera_5', 'optical_frame_name': 'left_cam_5', 'camera_info_url': ''}
    ]

    # Define nodes for each camera module
    camera_nodes = []

    for idx, module in enumerate(camera_modules):
        camera_node = ComposableNode(
            name=f'argus_mono_{idx}',
            package='isaac_ros_argus_camera',
            plugin='nvidia::isaac_ros::argus::ArgusMonoNode',
            parameters=[module],
            remappings=[
                (f'left/image_raw', f'cam{module["camera_id"]}/image'),
                (f'left/camerainfo', f'cam{module["camera_id"]}/camerainfo')
            ]
        )
        camera_nodes.append(camera_node)

    # Create a container to hold all the nodes
    container = ComposableNodeContainer(
        name='argus_pipeline_container',
        namespace='',
        package='rclcpp_components',
        executable='component_container',
        composable_node_descriptions=camera_nodes,
        output='screen',
        arguments=['--ros-args', '--log-level', 'info']
    )

    return launch.LaunchDescription([container])
@WangGangUCAS
Copy link

"Received an image, do you need to modify the code?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants