Calibrate Networked Cameras on Local Switch

I’m trying to use Zed360 to calibrate 4 cameras in the networked flow. Is there any way to do this on a LAN switch, or do they need to be connected to the internet and Zed Hub?

Hi,

With the current version of ZED 360, it is possible to calibrate using cameras on the network without zed hub, but it is quite complicated.
This will change in the next version of the ZED SDK (v4.0.7) in which we are simplifying this process.

With the current version, for streamed cameras, you need to provide an “empty” calibration file to ZED360 by clicking on the “LOAD” button at the start of the tool.

The most complicated part is that you have to manually create the calibration file.
Overall documentation is also available on our website, which might help you as well: https://www.stereolabs.com/docs/fusion/overview/#configuration-files

This JSON file contains all the information needed to have access to the cameras.
For each camera you want to calibrate, you need to add this block to the file :

“40457803”: {
“input”: {
“fusion”: {
“type”: “LOCAL_NETWORK”,
“configuration”: {
“ip”: “192.168.35.102”,
“port”: 30002
}
},
“zed”: {
“configuration”: “40457803”,
“type”: “USB_SERIAL”
}
},
“world”: {
“rotation”: [
0.0,
0.0,
0.0
],
“translation”: [
0.0,
0.0,
0.0
]
}
},

What you need to modify in this file for the calibration is :

  • The serial number of the cameras, replace " 40457803" with your own.
  • In the “fusion” field, change the Ip address with the address of the camera. For the port, make sure each camera has a different one.
  • Keep the rotation and translation to zero. The calibration process will modify it.

Stereolabs Support

Thanks for the info - this is great! Where can I find my camera serial number? It doesn’t appear to be on the exterior of the unit.

It should be written on a label on the box that contained the camera.
Otherwise, you can open the camera using our ZED Explorer tool, the serial number will be displayed on the top right corner.

Stereolabs Support

I’ve attempted to implement this, and I’m getting the following errors when I load the JSON file to setup the room:

 >./ZED360 
INIT FUSION 
Unable to subscribe to 35415565 . CONNECTION TIMED OUT
Unable to subscribe to 36205937 . BAD IP ADDRESS
Unable to subscribe to 39930155 . CONNECTION TIMED OUT
Unable to subscribe to 37926095 . BAD IP ADDRESS
START RUN FUSION 
enableSK 
ERROR : WRONG BODY FORMAT
STOP RUN FUSION

All of the computers are on the same local network, and can be pinged from the command line. All IP addresses are correct and valid. All four are Zed Box Xavier NX 8GB, and I have verified that they can run the body tracking example individually.

Not sure if I need to be running some piece of software on the publishers, or somehow specifying what port they should be publishing on. Would love any thoughts you might have!

If it helps, this is my config file:

{
    "35415565": { 
        "input": {
            "zed": {
                "type": "USB_SERIAL",
                "configuration": "35415565"
            },
            "fusion": {
                "type": "LOCAL_NETWORK",
                "configuration": {
                    "ip": "192.168.0.51", 
                    "port": 30000
                }
            }
        },
        "world": {
            "rotation": [
                0,
                0,
                0
            ],
            "translation": [
                0,
                0,
                0
            ]
        }
    },
    "36205937": { 
        "input": {
            "zed": {
                "type": "USB_SERIAL",
                "configuration": "36205937"
            },
            "fusion": {
                "type": "LOCAL_NETWORK",
                "configuration": {
                    "ip": "192.168.0.52",
                    "port": 30001
                }
            }
        },
        "world": {
            "rotation": [
                0,
                0,
                0
            ],
            "translation": [
                0,
                0,
                0
            ]
        }
    },
    "39930155": { 
        "input": {
            "zed": {
                "type": "USB_SERIAL",
                "configuration": "39930155"
            },
            "fusion": {
                "type": "LOCAL_NETWORK",
                "configuration": {
                    "ip": "192.168.0.53",
                    "port": 30002
                }
            }
        },
        "world": {
            "rotation": [
                0,
                0,
                0
            ],
            "translation": [
                0,
                0,
                0
            ]
        }
    },
    "37926095": { 
        "input": {
            "zed": {
                "type": "USB_SERIAL",
                "configuration": "37926095"
            },
            "fusion": {
                "type": "LOCAL_NETWORK",
                "configuration": {
                    "ip": "192.168.0.54",
                    "port": 30003
                }
            }
        },
        "world": {
            "rotation": [
                0,
                0,
                0
            ],
            "translation": [
                0,
                0,
                0
            ]
        }
    }
}

That’s my bad, I gave you incorrect guidelines, I’m sorry. I mixed up two different things.

First, on each zed box, you need to run the camera streaming sender sample (this one : https://github.com/stereolabs/zed-sdk/tree/master/camera%20streaming/sender/python)

This will stream the images on the network.

Then, for the config file, you need to use a file like that :

{
  "31624334": {
    "input": {
      "fusion": {
        "type": "INTRA_PROCESS"
      },
      "zed": {
        "configuration": "192.168.3.165:30000",
        "type": "STREAM"
      }
    },
    "world": {
      "rotation": [
        0.0,
        0.0,
        0.0
      ],
      "translation": [
        0.0,
        0.0,
        0.0
      ]
    }
  },
  "32631293": {
    "input": {
      "fusion": {
        "type": "INTRA_PROCESS"
      },
      "zed": {
        "configuration": "192.168.3.165:30010",
        "type": "STREAM"
      }
    },
    "world": {
      "rotation": [
        0.0,
        0,
        0.0
      ],
      "translation": [
        0.0,
        0.0,
        0
      ]
    }
  }
}

Also, for the port, make sure to use even ports : 30000, then 30002, …

Sorry again for the misinformation.
Let me know how it goes.

Thank you! Trying this now!

All the streamers run on the publishers successfully, but they appear to all try to use port 30000. I went to the source code, and I don’t see anywhere to specify the port of the camera stream publisher.

Edit: I managed to get a single stream working. However, the above issue is still a problem. Thanks!

If I try to set them all to 30000 in the config I get this:

/usr/local/zed/tools$ ./ZED360 
INIT FUSION 
Setup ZED 35415565
Setup ZED 36205937
Setup ZED 39930155
Setup ZED 37926095
35415565 START RUN ZED 
3792609536205937 START RUN ZED  START RUN ZED 

39930155 START RUN ZED 
START RUN FUSION 
enableSK 
STOP RUN FUSION 
STOP RUN ZED 
STOP RUN ZED 
STOP RUN ZED 
STOP RUN ZED

And on each streamer they appear to get a connection like this:

/usr/local/zed/samples/camera streaming/sender/python$ python3 streaming_sender.py 
[Sample] Using default resolution
[ZED][INFO] Logging level INFO
[ZED][INFO] Using USB input... Switched to default resolution HD720
[ZED][INFO] [Init]  Depth mode: NONE
[ZED][INFO] [Init]  Camera successfully opened.
[ZED][INFO] [Init]  Sensors FW version: 777
[ZED][INFO] [Init]  Camera FW version: 1523
[ZED][INFO] [Init]  Video mode: HD720@60
[ZED][INFO] [Init]  Serial Number: S/N 37926095
Streaming on port  30000
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
H264: Profile = 77, Level = 50 
[UDP] Multicast group join failed (setsockopt()) -1 No such device 
NVMEDIA: Need to set EMC bandwidth : 1692000 
NVMEDIA: Need to set EMC bandwidth : 1692000 
NVMEDIA_ENC: bBlitMode is set to TRUE 
[Streaming] Streaming is now running.... 
[ZED][Streaming] Adding Receiver with IP: 192.168.0.150
[ZED][Streaming] Removing Receiver with IP: 192.168.0.150

But then in the Zed360 UI, I don’t get camera icons, or skeletons.

I resolved the ports issue, and am now able to connect to all four streams for calibration. I fixed the port issue by adding:

stream_params.port = 30002

at line 69 in the streaming sender, where 30002 is the desired port number.

I am still seeing issues with successful calibration but I’ll address that in a separate thread.