Creating rig.json for multiple camera

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
1.9.3.10904
other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Hi I am trying to set up multiple camera rig.json file. Is there any reference that can help to understand the same.
The current rig.json i am able to get only one camera working. out of 4 connected on the same port.

cat rig.json
{
“rig”: {
“sensors”: [
{
“name”: “camera:sample0”,
“nominalSensor2Rig_FLU”: {
“roll-pitch-yaw”: [
0.0,
0.0,
0.0
],
“t”: [
1.8621,
-0.1939,
1.3165
]
},
“parameter”: “camera-name=F008A120RM0AV2,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216”,
“properties”: {
“Model”: “ftheta”,
“bw-poly”: “0.000000000000000 5.35356812179089e-4 4.99266072928606e-10 4.27370422037554e-12 -6.68245573791717e-16”,
“cx”: “1927.764404”,
“cy”: “1096.686646”,
“height”: “2168”,
“width”: “3848”
},
“protocol”: “camera.gmsl”
}
],
“vehicle”: {
“valid”: false
}
},
“version”: 2
}

can you please provide input to add multiple cameras for the same port using the rig.json.

You can take reference from the rig_ar0820.json file located at /usr/local/driveworks/data/samples/sensors/camera/camera/rig_ar0820.json.

Hi Vick,

I really want to understand this file. i want to see how to add multiple cameras. The one you pointed is handling only one camera, i can not see the output captured by multiple cameras when this is used.

Regards,
Sistla.

Could you provide more details and context about the specific application you are using with this rig file?

am trying to use this with sample_camera application in the driveworks samples. I want to try to see timestamp with multiple cameras on same port or different ports.

To use the Driveworks sample_camera application with multiple cameras and see timestamps, you can refer to the source code of the application located at /usr/local/driveworks/samples/src/sensors/camera/camera/ on your host system.

The source code of the application will provide you with insights into how to handle multiple cameras on the same port or different ports.

I am trying to use the same example for multiple cameras. I see that simple_camera application can be used for multiple cameras, but the right rig file should be used for the configuration. But the rig file you referenced doesnt help , i want to understand the syntax for this , how i can pass in multiple cameras . if you believe the rig file should be aiding in multiple camera output , we are not able to see it on the target, need some pointers for that.

You mentioned that one camera is already working on your side. To add two cameras, you can refer to the rig file for the necessary configuration. If you encounter any errors with the application, consider checking its source code for better understanding.

Also, DriveWorks SDK Reference: Camera should have information about the parameters you need to configure.

It’s on the target.

nvidia@tegra-ubuntu:~$ ls -l /usr/local/driveworks/data/samples/sensors/camera/camera/rig_ar0820.json
-r-xr-xr-x. 1 root root 2247 Jan 1 2000 /usr/local/driveworks/data/samples/sensors/camera/camera/rig_ar0820.json

1 Like

Yeah Vick i see that on the target or i can rcp that file , that is not my problem . I think i will have to check with this sample code why it doesnt work for multiple camera, i need to play with rig file as well as with the code to see for necessary changes.
I was thinking internally nvidia might have tested this code with multiple cameras and rig file :) .

Thanks Vick, am able to resolve this . For future discussions if any one wants to understand on this topic i can definitely help .

If you don’t mind, it would be great if you could share what you learned or the steps you took to resolve the problem. Your insights could be valuable for other developers who might encounter a similar issue in the future. Sharing your knowledge can contribute to a supportive and collaborative community. Thanks.

Hey Vick,

For some reason in the sample_camera code the cnt variable that reading the number of sensors from the json list is not getting updated to the right number. I did force this count based on my json input. Rest everything in the Json is updated with multiple cameras with different variants (both valeo and entron) on multiple ports worked as expected.

Did you mean to say that dwRig_getSensorCountOfType() consistently returns ‘1’ for the ‘cnt’ value, which does not reflect the actual number of cameras in your JSON configuration? Have you also observed the same issue with the ‘rig_ar0820.json’ file?

   CHECK_DW_ERROR(dwRig_getSensorCountOfType(&cnt, DW_SENSOR_CAMERA, m_rigConfig));

Hi Vick,

Yes with rig_ar0820.jsoni saw the same behavior.

The rig file worked on my side. The following log snippet shows that two cameras were returned by dwRig_getSensorCountOfType():

onInitialize: creating camera.gmsl with params: camera-name=F008A120RM0AV2,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216
[14-08-2023 16:51:01] SensorFactory::createSensor() → camera.gmsl, camera-name=F008A120RM0AV2,interface=csi-ab,CPHY-mode=1,link=0,output-format=processed,async-record=1,file-buffer-size=16777216
[14-08-2023 16:51:01] CameraBase: pool size set to 8
[14-08-2023 16:51:01] SensorFactory::createSensor() → camera.gmsl.master,
[14-08-2023 16:51:01] CameraMaster::parseDevBlock Getting device info list.
[14-08-2023 16:51:01] devBlock: 0 Slave = 0 Interface = csi-ab Camera_name = F008A120RM0AV2 Link = 0 GroupInit = 0 RecCfg = 1
[14-08-2023 16:51:01] Camera Match Name: F008A120RM0AV2 Description: Entron F008A120RM0A module - 120-deg FOV, 24-bit capture, MIPI-AR0820, MAX9295 linkIndex: 4294967295 serInfo.Name: MAX9295
[14-08-2023 16:51:01] Client, Setting up information for camera ID 0
[14-08-2023 16:51:01] Client, successfully found info for camera ID 0 bound to id 0
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] CameraClient: using NITO found at /usr/share/camera/F008A120RM0AV2.nito
onInitialize: creating camera.gmsl with params: camera-name=F008A120RM0AV2,interface=csi-ab,CPHY-mode=1,link=1,output-format=processed,async-record=1,file-buffer-size=16777216
[14-08-2023 16:51:01] SensorFactory::createSensor() → camera.gmsl, camera-name=F008A120RM0AV2,interface=csi-ab,CPHY-mode=1,link=1,output-format=processed,async-record=1,file-buffer-size=16777216
[14-08-2023 16:51:01] CameraBase: pool size set to 8
[14-08-2023 16:51:01] devBlock: 0 Slave = 0 Interface = csi-ab Camera_name = F008A120RM0AV2 Link = 1 GroupInit = 0 RecCfg = 1
[14-08-2023 16:51:01] Camera Match Name: F008A120RM0AV2 Description: Entron F008A120RM0A module - 120-deg FOV, 24-bit capture, MIPI-AR0820, MAX9295 linkIndex: 4294967295 serInfo.Name: MAX9295
[14-08-2023 16:51:01] Client, Setting up information for camera ID 1
[14-08-2023 16:51:01] Client, successfully found info for camera ID 1 bound to id 1
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] ImageStreamer(NvMedia → CUDA)
[14-08-2023 16:51:01] CameraClient: using NITO found at /usr/share/camera/F008A120RM0AV2.nito

This log excerpt confirms that two cameras were detected and initialized. Let me know if you need further assistance.

1 Like

thanks Vick, this is now not a blocker , it worked for me as well.

marking this topic as resolved/clarified in reference to the replied post.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.