Camera grab error: CAMERA NOT INITIALIZED

Hi,
My Zedx camera always have the initialization problem, after running on ROS1 driver for around 10 minutes, it generates:

[ INFO] [1717065229.176830219]: +++ ZED Node started +++
[ INFO] [1717065229.177909428]: Published static transform 'zedx_imu_link' -> 'zedx_left_camera_frame'
[ INFO] [1717065259.717879915]: *** Starting Positional Tracking ***
[ INFO] [1717065259.718101107]:  * Waiting for valid static transformations...
[ INFO] [1717065259.718417888]: Static transform Sensor to Base [zedx_left_camera_frame -> base_link]
[ INFO] [1717065259.718546757]:  * Translation: {0.010,-0.060,-0.016}
[ INFO] [1717065259.718672233]:  * Rotation: {0.000,-0.000,0.000}
[ INFO] [1717065259.718831023]: Static transform Sensor to Camera Center [zedx_left_camera_frame -> zedx_camera_center]
[ INFO] [1717065259.718920915]:  * Translation: {0.010,-0.060,0.000}
[ INFO] [1717065259.719023927]:  * Rotation: {0.000,-0.000,0.000}
[ INFO] [1717065259.719180573]: Static transform Camera Center to Base [zedx_camera_center -> base_link]
[ INFO] [1717065259.719284481]:  * Translation: {0.000,0.000,-0.016}
[ INFO] [1717065259.719372612]:  * Rotation: {0.000,-0.000,0.000}
[ INFO] [1717065260.219671112]: Initial ZED left camera pose (ZED pos. tracking): 
[ INFO] [1717065260.219892592]:  * T: [-0.01,0.06,0.016]
[ INFO] [1717065260.220020533]:  * Q: [0,0,0,1]
[2024-05-30 10:39:49 UTC][ZED][WARNING] CAMERA NOT INITIALIZED in sl::ERROR_CODE sl::Camera::grab(sl::RuntimeParameters)
[ INFO] [1717065589.693021800]: Camera grab error: CAMERA NOT INITIALIZED

Log file from dmesg:
dmesg_3.log (17.5 KB)

Zed SDK version:
ZED_SDK_Tegra_L4T35.3_v4.1.2
This problem happened after updating the ZED SDK.

Please help me what happened here, thank you.

Please update the ZED X Driver to the latest v1.0.5. You are using the very old version 0.5.4.
Please remove the old driver before installing the new one: sudo dpkg -r stereolabs-zedx

1 Like

Hi,
Thanks for the quick reply.
After updating the ZED X Driver to the [latest v1.0.5], dmeg log file looks like:
dmesg_4.log (27.6 KB)
Is there any errors still existing?

No, your camera is correctly detected and initialized.

Can you open it with ZED Explorer and ZED Depth Viewer?

Hi,
unfortunately, the ROS node still generates the same initialization problem. ZED Explorer and ZED Depth Viewer work with no problems.
Here is the dmesg file record after the initialization problem happened.
dmesg_2.log (29.6 KB)

Add more info from sudo dmesg | grep zedx [sudo] password for user: [ 21.612729] sl_max96712 30-0029: print_sensor_info: camera zedx [ 21.612763] sl_max96712 30-0029: print_sensor_info: camera zedx [ 21.612808] sl_max96712 30-0029: print_sensor_info: camera zedx [ 21.612837] sl_max96712 30-0029: print_sensor_info: camera zedx [ 22.120268] sl_max96712 30-0029: sl_max96712_get_camera_model: zedx camera connected to this port [ 22.134293] sl_max96712 30-0029: print_sensor_info: camera zedx [ 22.148275] sl_max96712 30-0029: print_sensor_info: camera zedx [ 22.698426] zedx 30-0062: Driver Version : v1.0.5 [ 22.698433] zedx 30-0062: Probing v4l2 sensor. [ 22.698436] zedx 30-0062: Driver Version : v1.0.5 [ 22.809775] zedx 30-0062: ZED-X serializer detect success [ 22.809946] zedx 30-0018: Driver Version : v1.0.5 [ 22.809948] zedx 30-0018: Probing v4l2 sensor. [ 22.810123] zedx 30-0018: tegracam sensor driver:video0_v2.0.6 [ 22.902367] tegra-camrtc-capture-vi tegra-capture-vi: subdev zedx 30-0018 bound [ 22.903302] zedx 30-0018: Detected ZED-X sensor [ 22.903440] zedx 30-0010: Driver Version : v1.0.5 [ 22.903442] zedx 30-0010: Probing v4l2 sensor. [ 22.903590] zedx 30-0010: tegracam sensor driver:video1_v2.0.6 [ 22.911471] zedx 30-0018: zedx_open: Accessing the camera [ 22.997502] tegra-camrtc-capture-vi tegra-capture-vi: subdev zedx 30-0010 bound [ 22.998277] zedx 30-0010: Detected ZED-X sensor [ 22.998407] zedx 31-0062: Driver Version : v1.0.5 [ 22.998409] zedx 31-0062: Probing v4l2 sensor. [ 22.998411] zedx 31-0062: Driver Version : v1.0.5 [ 22.999011] zedx 31-0062: ser_write_reg:i2c write failed: dev. 0x62, reg. 0x10, val. 0x21 [ 23.001132] zedx 30-0010: zedx_open: Accessing the camera [ 23.007562] zedx 31-0062: ser_write_table: try 4 [ 23.024375] zedx 31-0062: ser_write_reg:i2c write failed: dev. 0x62, reg. 0x10, val. 0x21 [ 23.033010] zedx 31-0062: ser_write_table: try 3 [ 23.048337] zedx 31-0062: ser_write_reg:i2c write failed: dev. 0x62, reg. 0x10, val. 0x21 [ 23.056779] zedx 31-0062: ser_write_table: try 2 [ 23.072382] zedx 31-0062: ser_write_reg:i2c write failed: dev. 0x62, reg. 0x311, val. 0x41 [ 23.081237] zedx 31-0062: Single ZED-X detect error [ 23.081243] zedx 31-0062: zedx_probe: serializer initialization failed [ 23.088300] zedx: probe of 31-0062 failed with error -1 [ 23.093972] zedx 31-0018: Driver Version : v1.0.5 [ 23.093975] zedx 31-0018: Probing v4l2 sensor. [ 23.093981] zedx 31-0018: zedx_probe: ar0234 initialization failed [ 23.100630] zedx 31-0010: Driver Version : v1.0.5 [ 23.100633] zedx 31-0010: Probing v4l2 sensor. [ 23.100637] zedx 31-0010: zedx_probe: ar0234 initialization failed [ 90.952040] zedx 30-0018: zedx_set_mode: setting the device mode [ 91.872627] zedx 30-0010: zedx_set_mode: setting the device mode [ 292.471351] zedx 30-0018: zedx_set_mode: setting the device mode [ 295.140701] zedx 30-0010: zedx_set_mode: setting the device mode

Hi, new error appears after reinstall ros wrapper package:

[ INFO] [1717331993.593882914]: +++ ZED Node started +++
[ INFO] [1717331993.601479497]: Published static transform 'zedx_imu_link' -> 'zedx_left_camera_frame'
(Argus) Error FileOperationFailed: Failed socket read: Connection reset by peer (in src/rpc/socket/common/SocketUtils.cpp, function readSocket(), line 79)
(Argus) Error FileOperationFailed: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 277)
(Argus) Error FileOperationFailed: Receive worker failure, notifying 1 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 350)
(Argus) Error InvalidState: Argus client is exiting with 1 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 366)
(Argus) Error FileOperationFailed: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 379)
(Argus) Error FileOperationFailed: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error FileOperationFailed:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)

If you stop the node not correctly the ZED X Driver can remain in pending status for ~20 seconds.
You can manually force a reset by using the commands
sudo service zed_x_daemon restart
and
sudo service nvargus-daemon restart

Hi, I found that another Ublox driver might cause “Connection reset by peer”, Ublox created a socket to abstract RTK GPS data (port 3503):

if (pm.input_rtcm)
        {
            // socket.reset(new SocketHandler("localhost", pm.rtcm_tcp_port));
            // socket->addCallback(std::bind(&SerialHandler::writeRaw, serial.get(), 
            //     std::placeholders::_1, std::placeholders::_2, pm.IO_TIMEOUT_MS));
            // socket->startRead();
            if (!socket || !socket->isConnected()) {
                socket.reset(new SocketHandler("localhost", pm.rtcm_tcp_port));
                socket->addCallback(std::bind(&SerialHandler::writeRaw, serial.get(),
                                            std::placeholders::_1, std::placeholders::_2, pm.IO_TIMEOUT_MS));
                socket->startRead();
            }
        }

From observation, each time ublox rosnode starts, zedx will generates errors.
Is there any solution to avoid conflictions, sorry I’m not familiar with TCP communication. I just checked all ports used and didn’t see any overlapped ports.

Thank you.

Hey I tried doing
sudo service zed_x_daemon restart
and
sudo service nvargus-daemon restart

but still the error persists
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found nvbuf_utils: dmabuf_fd -1 mapped entry NOT found (Argus) Error Timeout: (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137) (Argus) Error Timeout: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91) (Argus) Error FileOperationFailed: Failed socket read: Connection reset by peer (in src/rpc/socket/common/SocketUtils.cpp, function readSocket(), line 79) (Argus) Error FileOperationFailed: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 277) (Argus) Error FileOperationFailed: Receive worker failure, notifying 2 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 350) (Argus) Error InvalidState: Argus client is exiting with 2 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 366) (Argus) Error FileOperationFailed: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 379) (Argus) Error FileOperationFailed: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145) (Argus) Error FileOperationFailed: (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)

Hey @Myzhar, can you say a solution to the above issue

Hi @maheshreddy
To assist you better, we need additional information regarding your device’s condition and system setup.

Please open a terminal console (Ctrl+Alt+t) and run these commands:

  • sudo ZED_Diagnostic --dmesg
  • ZED_Diagnostic -c

After executing the commands, kindly send me the files dmesg.log and ZED_Diagnostic_Results.json located in the folder where the commands were run.

dmesg_1.log (61.5 KB)
ZED_Diagnostic_Results.json (22.9 KB)