isaac_ros_argus_camera icon indicating copy to clipboard operation
isaac_ros_argus_camera copied to clipboard

How to set the FPS and Resolution of camera?

Open lymnxn opened this issue 2 years ago • 8 comments

Hello, I'm using a Jetson Xavier NX and a IMX219 camera for developent. I want to get high FPS video so I need to set camera output as 1280x720@60fps, I can not find any tutorials about it.

lymnxn avatar Dec 02 '22 08:12 lymnxn

You'll need to find which profiles are supported by your IMX219 sensor, by using a command like v4l2-ctl.

This should output the supported resolutions and FPS.

Then, edit these lines of the Argus configuration to use the mode and FPS values from the previous step.

jaiveersinghNV avatar Dec 06 '22 00:12 jaiveersinghNV

You'll need to find which profiles are supported by your IMX219 sensor, by using a command like v4l2-ctl.

This should output the supported resolutions and FPS.

Then, edit these lines of the Argus configuration to use the mode and FPS values from the previous step.

I follow the step, Set LIne 69 mode to 4, Line 70 framerate to 60, Set the mode 4 in launch file, and get the right size of image, but the frame rate is very low. I use ros2 topic hz /left/image_raw, It tell me that the average rate just 24Hz,and ros2 topic hz /left/camerainfo is 30Hz. I need High FPS, It is important for me. The camera can work in 60FPS very well with nvgstcapture, I use jetson_clock and the 20W power mode.

lymnxn avatar Dec 06 '22 08:12 lymnxn

I have another Question, why I have set the camera calibration data with a valid url, I still get the warning: [component_container_mt-1] 2022-12-06 07:50:10.436 WARN extensions/hawk/argus_camera.cpp@677: Failed to get calibration data from Argus! Here is the full log: [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [component_container_mt-1]: process started with pid [66891] [component_container_mt-1] [INFO] [1670313006.428758395] [argus_mono_container]: Load Library: /workspaces/isaac_ros-dev/install/isaac_ros_argus_camera/lib/libmono_node.so [component_container_mt-1] [INFO] [1670313006.961008126] [NitrosContext]: [NitrosContext] Creating a new shared context [component_container_mt-1] [INFO] [1670313006.961802563] [argus_mono_container]: Found class: rclcpp_components::NodeFactoryTemplatenvidia::isaac_ros::argus::ArgusMonoNode [component_container_mt-1] [INFO] [1670313006.961943940] [argus_mono_container]: Instantiate class: rclcpp_components::NodeFactoryTemplatenvidia::isaac_ros::argus::ArgusMonoNode [component_container_mt-1] [INFO] [1670313006.984610955] [argus_mono]: [NitrosNode] Initializing NitrosNode [component_container_mt-1] [INFO] [1670313007.142159958] [argus_mono]: camera calibration URL: package://viconros2/config/csi_cam.ini [component_container_mt-1] [INFO] [1670313007.146437647] [argus_mono]: [ArgusMonoNode] Loaded camera info from "package://viconros2/config/csi_cam.ini" [component_container_mt-1] [INFO] [1670313007.146604880] [argus_mono]: [NitrosNode] Starting NitrosNode [component_container_mt-1] [INFO] [1670313007.146663377] [argus_mono]: [NitrosNode] Loading built-in preset extension specs [component_container_mt-1] [INFO] [1670313007.158875609] [argus_mono]: [NitrosNode] Loading built-in extension specs [component_container_mt-1] [INFO] [1670313007.159147995] [argus_mono]: [NitrosNode] Loading preset extension specs [component_container_mt-1] [INFO] [1670313007.162802513] [argus_mono]: [NitrosNode] Loading extension specs [component_container_mt-1] [INFO] [1670313007.162935058] [argus_mono]: [NitrosNode] Loading generator rules [component_container_mt-1] [INFO] [1670313007.164034744] [argus_mono]: [NitrosNode] Loading extensions [component_container_mt-1] [INFO] [1670313007.165583393] [argus_mono]: [NitrosContext] Loading extension: gxf/std/libgxf_std.so [component_container_mt-1] [INFO] [1670313007.174391062] [argus_mono]: [NitrosContext] Loading extension: gxf/cuda/libgxf_cuda.so [component_container_mt-1] [INFO] [1670313007.180597723] [argus_mono]: [NitrosContext] Loading extension: gxf/serialization/libgxf_serialization.so [component_container_mt-1] [INFO] [1670313007.189290607] [argus_mono]: [NitrosContext] Loading extension: gxf/libgxf_sight.so [component_container_mt-1] [INFO] [1670313007.196021783] [argus_mono]: [NitrosContext] Loading extension: gxf/libgxf_atlas.so [component_container_mt-1] [INFO] [1670313007.204862731] [argus_mono]: [NitrosContext] Loading extension: gxf/libgxf_isaac_messages.so [component_container_mt-1] [INFO] [1670313007.212249783] [argus_mono]: [NitrosContext] Loading extension: gxf/multimedia/libgxf_multimedia.so [component_container_mt-1] [INFO] [1670313007.215058472] [argus_mono]: [NitrosContext] Loading extension: gxf/tensorops/libgxf_tensorops.so [component_container_mt-1] [INFO] [1670313007.249297972] [argus_mono]: [NitrosContext] Loading extension: gxf/libgxf_argus.so [component_container_mt-1] [INFO] [1670313007.676029571] [argus_mono]: [NitrosContext] Loading extension: gxf/libgxf_message_compositor.so [component_container_mt-1] [INFO] [1670313007.682611882] [argus_mono]: [NitrosNode] Loading graph to the optimizer [component_container_mt-1] [INFO] [1670313007.704270603] [argus_mono]: [NitrosNode] Running optimization [component_container_mt-1] [INFO] [1670313007.770941913] [argus_mono]: [NitrosNode] Obtaining graph IO group info from the optimizer [component_container_mt-1] [INFO] [1670313007.775147922] [argus_mono]: [NitrosNode] Creating negotiated publishers/subscribers [component_container_mt-1] [INFO] [1670313007.791643284] [argus_mono]: [NitrosNode] Starting negotiation... [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/argus_mono' in container '/argus_mono_container' [component_container_mt-1] [INFO] [1670313008.795292529] [argus_mono]: [NitrosNode] Starting post negotiation setup [component_container_mt-1] [INFO] [1670313008.795539411] [argus_mono]: [NitrosNode] Getting data format negotiation results [component_container_mt-1] [INFO] [1670313008.795643123] [argus_mono]: [NitrosPublisher] Negotiation failed [component_container_mt-1] [INFO] [1670313008.795717780] [argus_mono]: [NitrosPublisher] Use only the compatible publisher: topic_name="/left/image_raw", data_format="nitros_image_rgb8" [component_container_mt-1] [INFO] [1670313008.795806804] [argus_mono]: [NitrosPublisher] Negotiation failed [component_container_mt-1] [INFO] [1670313008.795862421] [argus_mono]: [NitrosPublisher] Use only the compatible publisher: topic_name="/left/camerainfo", data_format="nitros_camera_info" [component_container_mt-1] [INFO] [1670313008.796011509] [argus_mono]: [NitrosNode] Exporting the final graph based on the negotiation results [component_container_mt-1] [INFO] [1670313008.822104273] [argus_mono]: [NitrosNode] Wrote the final top level YAML graph to "/workspaces/isaac_ros-dev/install/isaac_ros_argus_camera/share/isaac_ros_argus_camera/SWTUDGPKSZ.yaml" [component_container_mt-1] [INFO] [1670313008.822285394] [argus_mono]: [NitrosNode] Calling user's pre-load-graph callback [component_container_mt-1] [INFO] [1670313008.822347026] [argus_mono]: [NitrosNode] Loading application [component_container_mt-1] [INFO] [1670313008.822596212] [argus_mono]: [NitrosContext] Loading application: '/workspaces/isaac_ros-dev/install/isaac_ros_argus_camera/share/isaac_ros_argus_camera/SWTUDGPKSZ.yaml' [component_container_mt-1] 2022-12-06 07:50:08.835 WARN gxf/std/yaml_file_loader.cpp@459: Using unregistered parameter 'left_camera_frame' in component ''. [component_container_mt-1] 2022-12-06 07:50:08.836 WARN gxf/std/yaml_file_loader.cpp@459: Using unregistered parameter 'right_camera_frame' in component ''. [component_container_mt-1] 2022-12-06 07:50:08.836 WARN gxf/std/yaml_file_loader.cpp@459: Using unregistered parameter 'transmitter' in component ''. [component_container_mt-1] [INFO] [1670313008.839293847] [argus_mono]: [NitrosNode] Linking Nitros pub/sub to the loaded application [component_container_mt-1] [INFO] [1670313008.839686906] [argus_mono]: [NitrosNode] Calling user's post-load-graph callback [component_container_mt-1] [INFO] [1670313008.839995612] [argus_mono]: [NitrosContext] Initializing applicaiton... [component_container_mt-1] [INFO] [1670313009.772959604] [argus_mono]: [NitrosContext] Running appliation... [component_container_mt-1] 2022-12-06 07:50:10.436 WARN extensions/hawk/argus_camera.cpp@677: Failed to get calibration data from Argus! [component_container_mt-1] [INFO] [1670313028.385754194] [NitrosContext]: [NitrosContext] Loading application: '/workspaces/isaac_ros-dev/install/isaac_ros_nitros/share/isaac_ros_nitros/config/type_adapter_nitros_context_graph.yaml' ^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT) [component_container_mt-1] [INFO] [1670313508.710505254] [rclcpp]: signal_handler(signum=2) [component_container_mt-1] [INFO] [1670313508.720165646] [argus_mono]: [NitrosNode] Terminating the running application [component_container_mt-1] [INFO] [1670313508.720254383] [argus_mono]: [NitrosContext] Interrupting GXF... [component_container_mt-1] [INFO] [1670313508.720330415] [argus_mono]: [NitrosContext] Waiting on GXF... [component_container_mt-1] [INFO] [1670313508.737156468] [argus_mono]: [NitrosContext] Deinitializing... [component_container_mt-1] [INFO] [1670313509.481326953] [argus_mono]: [NitrosContext] Destroying context [component_container_mt-1] [INFO] [1670313509.482107052] [argus_mono]: [NitrosNode] Application termination done [component_container_mt-1] |==================================================================================================================================================================| [component_container_mt-1] | Job Statistics Report (regular) | [component_container_mt-1] |==================================================================================================================================================================| [component_container_mt-1] | Name | Count | Time (Median - 90% - Max) [ms] | Load (%) | Exec(ms) | Variation (Median - 90% - Max) [ns] | [component_container_mt-1] |------------------------------------------------------------------------------------------------------------------------------------------------------------------| [component_container_mt-1] | SWTUDGPKSZ_vault_left_camerainfo | 20791 | 0.06 | 0.10 | 36.52 | 0.3 % | 1540.8 | 197726941409 | 361705442072 | 499860250491 | [component_container_mt-1] | SWTUDGPKSZ_vault_left_image | 15077 | 0.08 | 0.09 | 19.33 | 0.3 % | 1445.8 | 214993782415 | 385726939802 | 499860250491 | [component_container_mt-1] | SWTUDGPKSZ_splitter_left | 14881 | 0.91 | 0.99 | 143.86 | 3.1 % | 15306.7 | 221727001126 | 392260266951 | 499860250491 | [component_container_mt-1] | SWTUDGPKSZ_converter_left | 14881 | 2.74 | 3.50 | 493.27 | 9.6 % | 47881.8 | 221727001126 | 392260266951 | 499860250491 | [component_container_mt-1] | SWTUDGPKSZ_argus_camera | 14949 | 2.28 | 3.51 | 149.44 | 8.7 % | 43524.8 | 220326933580 | 390026958519 | 499860250491 | [component_container_mt-1] |==================================================================================================================================================================| [INFO] [component_container_mt-1]: process has finished cleanly [pid 66891]

lymnxn avatar Dec 06 '22 08:12 lymnxn

The warning is because Argus was unable to read a camera calibration from the camera's built-in EEPROM but your URL should override that anyway. As far as the camera frame rate is concerned, what is your system state when running this test application (running top or jtop)? Are CPUs or GPUs pegged during this application? We're working on reproducing this issue with an IMX219 and Isaac ROS Argus Camera.

hemalshahNV avatar Jan 31 '23 01:01 hemalshahNV

I have the same problem. I'm on a Xavier nx with IMX219 and from ros2 topic hz /left/image_raw I'm getting 10 fps. I have set mode to 4 and framerate to 60 in these lines. Here some screenshots of the hz and resources usage. Screenshot from 2023-02-02 11-57-56 Screenshot from 2023-02-02 11-59-03

Lanzo98 avatar Feb 02 '23 08:02 Lanzo98

Do you solve the problem,?I have the same problem with Hawk camera

sim-lab-dev avatar Aug 22 '23 07:08 sim-lab-dev

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

WangGangUCAS avatar May 22 '24 13:05 WangGangUCAS

I have the same problem. I set my camera mode to 1920x1080 and 60fps but I am still only getting around <10 fps. Has anyone found a solutions to this problem ?

HJGrant avatar Jul 26 '24 21:07 HJGrant