# ROS2 start\_svo\_rec and stop\_svo\_rec service calls exit abruptly after trying to recover connection

**URL:** <https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896>\
**Category:** ROS2\
**Created:** [May 24, 2025, 1:51am UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896 "2025-05-24T01:51:42Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhishekpavani](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/a/8dc957/32.png) [@abhishekpavani](https://community.stereolabs.com/u/abhishekpavani)\
**Post date:** [May 24, 2025, 1:51am UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/1 "2025-05-24T01:51:42Z")

</div>

Hi @Myzhar, I have a setup where I stream from 3 ZED Xmini cameras and I launch 3 zed ros2 nodes on my host computer. I make the start and stop svo recording service calls multiple times using a bash script. I see that when the streaming gets interrupted and is restarted again, the ros2 node which made the service calls raises the error code CAMERA\_NOT\_INITIALIZED. It is never recovers from this state and in the end the process dies.

Here are the logs from the ros2 node.  
[59059530\_rosnode\_cam.log](https://community.stereolabs.com/uploads/short-url/8HumpeJ5tdYaYCxIfpByxcgPcKl.log) (49.5 KB)

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [May 26, 2025, 7:17am UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/2 "2025-05-26T07:17:46Z")

</div>

Hi @abhishekpavani  
it seems that you are starting and stopping the recording every 13/14 seconds.  
This is not recommended behavior.  
Do you really need to perform similar tasks?

---

<div class="post-metadata">

**Author:** ![abhishekpavani](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/a/8dc957/32.png) [@abhishekpavani](https://community.stereolabs.com/u/abhishekpavani)\
**Post date:** [May 27, 2025, 12:22pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/3 "2025-05-27T12:22:14Z")

</div>

Hi @Myzhar , I was running a bash script where I request to start the SVO service recording, wait for 12 seconds and then stop the service recording and wait for a period before calling the start SVO recording again. I would have to perform similar tasks where I create SVOs of varying lengths by calling the SVO start and SVO stop services. Is the issue here calling the SVO recordings in succession? I need to reliably call the services over extended periods without them running into the issues that I shared in the logs

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [May 27, 2025, 2:04pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/4 "2025-05-27T14:04:53Z")

</div>

Please try with longer waiting periods, for example, 30 seconds.

---

<div class="post-metadata">

**Author:** ![abhishekpavani](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/a/8dc957/32.png) [@abhishekpavani](https://community.stereolabs.com/u/abhishekpavani)\
**Post date:** [May 27, 2025, 2:30pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/5 "2025-05-27T14:30:50Z")

</div>

Hi @Myzhar , Are you suggesting that after I call the start SVO service recording, I wait for 30 seconds before I call the stop SVO service recording?  
In my current scenario, I wait for 120 seconds after I call stop svo service before I call start again.

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [May 28, 2025, 8:05am UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/6 "2025-05-28T08:05:43Z")

</div>

The SDK team is working on a fix to this problem

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [May 28, 2025, 2:09pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/7 "2025-05-28T14:09:46Z")

</div>

@abhishekpavani  
Please remember to share with us the script that you are using to start/stop the recording.

> [@abhishekpavani](#):
>
> I see that when the streaming gets interrupted and is restarted again, the ros2 node which made the service calls raises the error code CAMERA\_NOT\_INITIALIZED. It is never recovers from this state and in the end the process dies.

Can you please specify what you mean by “streaming gets interrupted”?  
Are you also using the Local Streaming?

---

<div class="post-metadata">

**Author:** ![abhishekpavani](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/a/8dc957/32.png) [@abhishekpavani](https://community.stereolabs.com/u/abhishekpavani)\
**Post date:** [May 28, 2025, 2:45pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/8 "2025-05-28T14:45:37Z")

</div>

> Please remember to share with us the script that you are using to start/stop the recording

I have shared the scripts along with my setup description on `support@stereolabs.com`. Can you please acknowledge once you receive them.

> Can you please specify what you mean by “streaming gets interrupted”?  
> Are you also using the Local Streaming?

I have also answered these in the email.

---

<div class="post-metadata">

**Author:** ![abhishekpavani](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/a/8dc957/32.png) [@abhishekpavani](https://community.stereolabs.com/u/abhishekpavani)\
**Post date:** [May 29, 2025, 1:13am UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/9 "2025-05-29T01:13:28Z")

</div>

Hi @Myzhar ,

I tried another experiment to record the SVOs with the same duration(12 seconds) as before. This time I was able to record 25 SVOs before I ran into the `CAMERA_NOT_INITIALIZED` error. It is also seen that the last SVO file probably did not get the stop svo recording call and is 13.6Gb in size. All other svos are 30 MBs. I am sharing logs from all the camera rosnodes here along with the file sizes of the recorded SVOs. You can see that the GMSL rosnode logs have the `CAMERA_NOT_INITIALIZED` error, whereas the USB camera raises

```auto
[component_container_isolated-1][WARN] [1748474558.824097469] [zed_camera.base.rclcpp]: failed to send response to /zed_camera/base/start_svo_rec (timeout): client will not receive response, at ./src/rmw_response.cpp:154, at ./src/rcl/service.c:314

```

Just also wanted to bring to your attention that increasing the duration from 12 seconds to 30 seconds also caused the nodes to raise the same `CAMERA_NOT_INITIALIZED` error.

```auto
-rw-r--r-- 1 ubuntu ubuntu 82616047 May 28 18:07 left_1.svo2
-rw-r--r-- 1 ubuntu ubuntu 90303472 May 28 18:10 left_2.svo2
-rw-r--r-- 1 ubuntu ubuntu 86670196 May 28 18:14 left_3.svo2
-rw-r--r-- 1 ubuntu ubuntu 79820959 May 28 18:17 left_4.svo2
-rw-r--r-- 1 ubuntu ubuntu 90491761 May 28 18:20 left_5.svo2
-rw-r--r-- 1 ubuntu ubuntu 95425022 May 28 18:37 right_10.svo2
-rw-r--r-- 1 ubuntu ubuntu 94273681 May 28 18:40 right_11.svo2
-rw-r--r-- 1 ubuntu ubuntu 86779537 May 28 18:43 right_12.svo2
-rw-r--r-- 1 ubuntu ubuntu 95248602 May 28 18:46 right_13.svo2
-rw-r--r-- 1 ubuntu ubuntu 88313983 May 28 18:50 right_14.svo2
-rw-r--r-- 1 ubuntu ubuntu 78209166 May 28 18:53 right_15.svo2
-rw-r--r-- 1 ubuntu ubuntu 82486430 May 28 18:56 right_16.svo2
-rw-r--r-- 1 ubuntu ubuntu 89703686 May 28 18:59 right_17.svo2
-rw-r--r-- 1 ubuntu ubuntu 95531904 May 28 19:03 right_18.svo2
-rw-r--r-- 1 ubuntu ubuntu 92943708 May 28 19:06 right_19.svo2
-rw-r--r-- 1 ubuntu ubuntu 78057019 May 28 18:07 right_1.svo2
-rw-r--r-- 1 ubuntu ubuntu 87938329 May 28 19:09 right_20.svo2
-rw-r--r-- 1 ubuntu ubuntu 88785982 May 28 19:12 right_21.svo2
-rw-r--r-- 1 ubuntu ubuntu 86166925 May 28 19:16 right_22.svo2
-rw-r--r-- 1 ubuntu ubuntu 92360625 May 28 19:19 right_23.svo2
-rw-r--r-- 1 ubuntu ubuntu 88854814 May 28 19:22 right_24.svo2
-rw-r--r-- 1 ubuntu ubuntu 0 May 28 19:25 right_25.svo2
-rw-r--r-- 1 ubuntu ubuntu 88371894 May 28 18:11 right_2.svo2
-rw-r--r-- 1 ubuntu ubuntu 88663459 May 28 18:14 right_3.svo2
-rw-r--r-- 1 ubuntu ubuntu 86876725 May 28 18:17 right_4.svo2
-rw-r--r-- 1 ubuntu ubuntu 81081208 May 28 18:20 right_5.svo2
-rw-r--r-- 1 ubuntu ubuntu 88829682 May 28 18:24 right_6.svo2
-rw-r--r-- 1 ubuntu ubuntu 83682886 May 28 18:27 right_7.svo2
-rw-r--r-- 1 ubuntu ubuntu 89298246 May 28 18:30 right_8.svo2
-rw-r--r-- 1 ubuntu ubuntu 88574291 May 28 18:33 right_9.svo2
-rw-r--r-- 1 ubuntu ubuntu 34659670 May 28 18:37 base_10.svo2
-rw-r--r-- 1 ubuntu ubuntu 34717371 May 28 18:40 base_11.svo2
-rw-r--r-- 1 ubuntu ubuntu 37284268 May 28 18:43 base_12.svo2
-rw-r--r-- 1 ubuntu ubuntu 37419475 May 28 18:46 base_13.svo2
-rw-r--r-- 1 ubuntu ubuntu 37559813 May 28 18:50 base_14.svo2
-rw-r--r-- 1 ubuntu ubuntu 37564834 May 28 18:53 base_15.svo2
-rw-r--r-- 1 ubuntu ubuntu 37508270 May 28 18:56 base_16.svo2
-rw-r--r-- 1 ubuntu ubuntu 40159324 May 28 18:59 base_17.svo2
-rw-r--r-- 1 ubuntu ubuntu 40044263 May 28 19:03 base_18.svo2
-rw-r--r-- 1 ubuntu ubuntu 37378565 May 28 19:06 base_19.svo2
-rw-r--r-- 1 ubuntu ubuntu 37228513 May 28 18:07 base_1.svo2
-rw-r--r-- 1 ubuntu ubuntu 37519656 May 28 19:09 base_20.svo2
-rw-r--r-- 1 ubuntu ubuntu 37317557 May 28 19:13 base_21.svo2
-rw-r--r-- 1 ubuntu ubuntu 37611580 May 28 19:16 base_22.svo2
-rw-r--r-- 1 ubuntu ubuntu 34729828 May 28 19:19 base_23.svo2
-rw-r--r-- 1 ubuntu ubuntu 13698531328 May 28 20:48 base_24.svo2
-rw-r--r-- 1 ubuntu ubuntu 34628620 May 28 18:11 base_2.svo2
-rw-r--r-- 1 ubuntu ubuntu 35301806 May 28 18:14 base_3.svo2
-rw-r--r-- 1 ubuntu ubuntu 37321590 May 28 18:17 base_4.svo2
-rw-r--r-- 1 ubuntu ubuntu 34506992 May 28 18:20 base_5.svo2
-rw-r--r-- 1 ubuntu ubuntu 37429461 May 28 18:24 base_6.svo2
-rw-r--r-- 1 ubuntu ubuntu 37523268 May 28 18:27 base_7.svo2
-rw-r--r-- 1 ubuntu ubuntu 40188192 May 28 18:30 base_8.svo2
-rw-r--r-- 1 ubuntu ubuntu 34742378 May 28 18:33 base_9.svo2
-rw-r--r-- 1 ubuntu ubuntu 82399280 May 28 18:07 center_1.svo2
-rw-r--r-- 1 ubuntu ubuntu 92751144 May 28 18:11 center_2.svo2
-rw-r--r-- 1 ubuntu ubuntu 88674161 May 28 18:14 center_3.svo2
-rw-r--r-- 1 ubuntu ubuntu 87882775 May 28 18:17 center_4.svo2
-rw-r--r-- 1 ubuntu ubuntu 84357165 May 28 18:20 center_5.svo2

```

[32929916\_rosnode\_cam.log](https://community.stereolabs.com/uploads/short-url/Eecj4RNWde2M6o0q2rQhHjbcYb.log) (67.7 KB)  
[54832066\_rosnode\_cam.log](https://community.stereolabs.com/uploads/short-url/MmK67Q6W7inHdZWEqoNkcfWfcY.log) (48.7 KB)  
[59059530\_rosnode\_cam.log](https://community.stereolabs.com/uploads/short-url/lXayCmHgEyEu5152NL6sdcDAYZt.log) (401.1 KB)  
[59819861\_rosnode\_cam.log](https://community.stereolabs.com/uploads/short-url/b0lVBl8ACWQT1D1jCdB0XBCktMk.log) (69.7 KB)

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [May 29, 2025, 9:27am UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/10 "2025-05-29T09:27:22Z")

</div>

Thank you for the additional information, they are very useful.

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [June 3, 2025, 2:04pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/11 "2025-06-03T14:04:56Z")

</div>

Hi @abhishekpavani  
Is this problem related to this?

> [@Restarting zed\_x\_daemon and nvargus-daemon.service doesnt work when unplugging and replugging the cameras](https://community.stereolabs.com/t/restarting-zed-x-daemon-and-nvargus-daemon-service-doesnt-work-when-unplugging-and-replugging-the-cameras/8938/6):
>
> The cameras are detected by the Driver. Can you confirm that you are disconnecting the camera while it’s still open by the ZED SDK, and then you reset the Driver? Are you closing the application before resetting the driver?

If they are related, can you provide the following information:

- initialization parameters of the sender
- console log of the sender, especially when the camera\_not\_initialized appeared

We tried to stop the sender several times and then restarted it. When the sender is stopped (or the camera is unplugged), it is expected to get the `CAMERA_NOT_INITIALIZED` error on the receiver side. But when we restarted the sender, the receiver automatically recovered and run again

---

<div class="post-metadata">

**Author:** ![abhishekpavani](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/a/8dc957/32.png) [@abhishekpavani](https://community.stereolabs.com/u/abhishekpavani)\
**Post date:** [June 4, 2025, 1:03pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/13 "2025-06-04T13:03:37Z")

</div>

Hi @Myzhar , Those are two separate issues and unrelated. This thread is specifically about being able to start and stop svo calls reliably.

`CAM_NOT_INITIALIZED` error pops up even when the streaming sender is running. I sent an email to `support@stereolabs.com` with the scripts we used to start and stop the SVO recordings on May 28 2025. Could you please confirm if you received them?

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [June 4, 2025, 4:42pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/14 "2025-06-04T16:42:26Z")

</div>

Hi @abhishekpavani  
I cannot find your message to [support@stereolabs.com](mailto:support@stereolabs.com) sent on May 28.  
Please send it again.

---

<div class="post-metadata">

**Author:** ![abhishekpavani](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/a/8dc957/32.png) [@abhishekpavani](https://community.stereolabs.com/u/abhishekpavani)\
**Post date:** [June 4, 2025, 4:53pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/15 "2025-06-04T16:53:17Z")

</div>

Hi @Myzhar , I sent the email again. Can you please check and confirm that you received it?

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [June 4, 2025, 6:04pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/16 "2025-06-04T18:04:26Z")

</div>

No, I confirm that I’ve not received it again.

---

<div class="post-metadata">

**Author:** ![abhishekpavani](https://community.stereolabs.com/letter_avatar_proxy/v4/letter/a/8dc957/32.png) [@abhishekpavani](https://community.stereolabs.com/u/abhishekpavani)\
**Post date:** [June 4, 2025, 6:36pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/17 "2025-06-04T18:36:40Z")

</div>

[Here](https://drive.google.com/drive/folders/1aMSqpTMVy9qL8GkWiQc4ebcnxZbZ4c24?usp=sharing) are the scripts that we use to start and stop the svo recordings.

We run the [streaming\_sender.py](https://github.com/stereolabs/zed-sdk/blob/master/camera%20streaming/sender/python/streaming_sender.py) python script (each camera is a separate process) on the jetson side and then launch the zed ros nodes using the zed\_camera.launch.py. We then run each of the bash scripts shared in the link above to start and stop the svo recordings.

**Setup** : 4 cameras in total. 3 GMSL ZED XMini cameras (2 cameras connected to the same 4 wire port on capture card and 1 connected to the second 4 wire port) and one of them is a USB camera (ZED2i).

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [June 4, 2025, 6:38pm UTC](https://community.stereolabs.com/t/ros2-start-svo-rec-and-stop-svo-rec-service-calls-exit-abruptly-after-trying-to-recover-connection/8896/18 "2025-06-04T18:38:57Z")

</div>

Thank you.  
We’ll get back to you as soon as possible.
