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

Connecting with multiple monocular cameras #32

Open
oncepursuit opened this issue Oct 26, 2023 · 4 comments
Open

Connecting with multiple monocular cameras #32

oncepursuit opened this issue Oct 26, 2023 · 4 comments
Assignees
Labels
needs info Needs more information

Comments

@oncepursuit
Copy link

Hello
I can connect a single monocular camera successfully , but I want to connect multiple monocular cameras.
How can I do that ?
Does this code support connecting multiple monocular cameras at the same time?
Thank you.

@jaiveersinghNV
Copy link
Contributor

Assuming you've correctly wired the monocular cameras to the Jetson using the appropriate GMSL expansion boards, you should be able to run multiple instances of the isaac_ros_argus_camera_node with the appropriate settings for device_id and module_id.

@jaiveersinghNV jaiveersinghNV self-assigned this Oct 30, 2023
@jaiveersinghNV jaiveersinghNV added the verify to close Waiting on confirm issue is resolved label Oct 30, 2023
@oncepursuit
Copy link
Author

Thanks for replay!
I tried run multiple instances of the isaac_ros_argus_camera_node in the way as below(modify in isaac_ros_argus_camera_mono.launch.py):
`def generate_launch_description():
argus_mono_node_camera1 = ComposableNode(
name='argus_mono_camera1',
package='isaac_ros_argus_camera',
plugin='nvidia::isaac_ros::argus::ArgusMonoNode',
parameters=[
{
"camera_id": 0,
}
],

)
argus_mono_node_camera2 = ComposableNode(
    name='argus_mono_camera2',
    package='isaac_ros_argus_camera',
    plugin='nvidia::isaac_ros::argus::ArgusMonoNode',
    remappings=[("left/image_raw", "right/image_raw"),
                ("left/camerainfo", "right/camerainfo"),
    ],
    parameters=[
        {
            "camera_id": 1,
        }
    ],
)
argus_mono_container = ComposableNodeContainer(
        name='argus_mono_container',
        package='rclcpp_components',
        executable='component_container_mt',
        composable_node_descriptions=[argus_mono_node_camera1, argus_mono_node_camera2],
        namespace='',
        output='screen',
        arguments=['--ros-args', '--log-level', 'info'],
    )
return launch.LaunchDescription([argus_mono_container])`

but I got this error:
[component_container_mt-1] [INFO] [1701328260.944711675] [argus_mono_camera2]: [NitrosContext] Running appliation... [component_container_mt-1] (NvCameraUtils) Error InvalidState: Mutex already initialized (in Mutex.cpp, function initialize(), line 41) [component_container_mt-1] (Argus) Error InvalidState: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function open(), line 54) [component_container_mt-1] (Argus) Error InvalidState: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function openSocketConnection(), line 262) [component_container_mt-1] (Argus) Error InvalidState: Cannot create camera provider (in src/rpc/socket/client/SocketClientDispatch.cpp, function createCameraProvider(), line 106) [component_container_mt-1] 2023-11-30 07:11:00.945 ERROR extensions/hawk/argus_camera.cpp@191: Failed to create CameraProvider [component_container_mt-1] 2023-11-30 07:11:00.945 WARN gxf/std/greedy_scheduler.cpp@221: Error while executing entity 59 named 'LVIDAILELA_argus_camera': GXF_FAILURE [component_container_mt-1] 2023-11-30 07:11:00.945 ERROR gxf/std/entity_executor.cpp@200: Entity with 82 not found! [component_container_mt-1] [ERROR] [1701328260.945881793] [argus_mono_camera2]: [NitrosPublisher] Vault ("vault_left_image/vault", eid=82) was stopped. The graph may have been terminated due to an error. [component_container_mt-1] terminate called after throwing an instance of 'std::runtime_error' [component_container_mt-1] what(): [NitrosPublisher] Vault ("vault_left_image/vault", eid=82) was stopped. The graph may have been terminated due to an error.

but if I run one instance, it is ok no matter camera_id is 0 or 1.

@jaiveersinghNV
Copy link
Contributor

Could you confirm that you are running on the latest Isaac ROS 2.1 release of Isaac ROS Argus Camera? Multi-instance support for Argus was a feature that was added recently. If you're running an older version of Isaac ROS, please update to the latest and try again.

@jaiveersinghNV jaiveersinghNV added needs info Needs more information and removed verify to close Waiting on confirm issue is resolved labels Dec 4, 2023
@WangGangUCAS
Copy link

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

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

No branches or pull requests

3 participants