• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
ModalAI Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
    • Register
    • Login

    Cannot open RTSP stream from `tof_depth` camera

    Starling & Starling 2
    starling2 max depth sensor rtsp
    4
    10
    793
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      griffin
      last edited by 26 Feb 2025, 20:33

      Hello all,

      I am having some issues getting the TOF camera to stream it's data over RTSP.

      I have a systemd process enabled to start up a voxl-streamer instance in /etc/systemd/system/voxl-streamer-tof-depth.service

      #
      # Copyright (c) 2021 ModalAI, Inc.
      #
      
      [Unit]
      Description=voxl-streamer
      SourcePath=/usr/bin/voxl-streamer
      After=voxl-wait-for-fs.service
      Requires=voxl-wait-for-fs.service
      
      [Service]
      Restart=no
      User=root
      Type=simple
      PIDFile=/run/voxl-streamer.pid
      ExecStartPre=/bin/sleep 5
      ExecStart=/usr/bin/voxl-streamer -s -p 8902 -i tof_depth
      
      [Install]
      WantedBy=multi-user.target
      

      When I try to open this stream using a gstreamer command gst-launch-1.0 rtspsrc location=rtsp://<my-drone-ip>:8902/live latency=0 ! "application/x-rtp, encoding-name=RAW, format=(string)GRAY8" ! videoconvert ! autovideosink I get a generic gstreamer error.
      When I inspect that systemd status using systemctl status voxl-streamer-tof-depth I see internal errors of voxl-streamer:

      ● voxl-streamer-tof-depth.service - voxl-streamer
         Loaded: loaded (/usr/bin/voxl-streamer; enabled; vendor preset: enabled)
         Active: active (running) since Wed 2025-02-26 19:50:20 UTC; 14min ago
        Process: 1469 ExecStartPre=/bin/sleep 5 (code=exited, status=0/SUCCESS)
       Main PID: 1957 (voxl-streamer)
          Tasks: 0 (limit: 4915)
         CGroup: /system.slice/voxl-streamer-tof-depth.service
                 ‣ 1957 /usr/bin/voxl-streamer
      
      Feb 26 19:50:31 m0054 voxl-streamer[1958]: ERROR:   Frame size mismatch: got 43200 bytes from pipe, expected 38528
      Feb 26 19:50:31 m0054 voxl-streamer[1958]: ERROR:   Most Likely the publisher of the camera data made a mistake
      Feb 26 19:50:31 m0054 voxl-streamer[1958]: ERROR:   Shutting down voxl-streamer
      Feb 26 19:50:31 m0054 voxl-streamer[1958]: Trying to quit g main loop due to program shutdown
      Feb 26 19:50:31 m0054 voxl-streamer[1958]: cleaning up gstreamer
      Feb 26 19:50:31 m0054 voxl-streamer[1958]: gst_rtsp_media_take_pipeline: assertion 'GST_IS_PIPELINE (pipeline)' failed
      Feb 26 19:50:31 m0054 voxl-streamer[1958]: can't create pipeline
      Feb 26 19:50:31 m0054 voxl-streamer[1958]: rtsp client disconnected, total clients: 0
      Feb 26 19:50:31 m0054 voxl-streamer[1958]: no more rtsp clients, closing source pipe intentionally
      Feb 26 19:50:31 m0054 voxl-streamer[1958]: Exited Cleanly
      

      Note that when I use a similar gstreamer commands (adapted for h264) I am able to open other video streams without issues.

      Additionally, since upgrading to SDK 1.4.1 from 1.3.5 whenever I run voxl-inspect-cam -a after approx 30s of running the camera servers all disconnect and a wall of:

      Most likely the server stopped without cleaning up
      Client is cleaning up pipes for the server
      ERROR in pipe_client_open opening request pipe: No such device or address
      

      appears. Should I be concerned?

      G E 2 Replies Last reply 26 Feb 2025, 20:34 Reply Quote 0
      • G
        griffin @griffin
        last edited by 26 Feb 2025, 20:34

        pinging @tom

        1 Reply Last reply Reply Quote 0
        • E
          Eric Katzfey ModalAI Team @griffin
          last edited by 26 Feb 2025, 22:07

          @griffin Is this on a Starling 2 drone?

          G 1 Reply Last reply 26 Feb 2025, 22:34 Reply Quote 0
          • G
            griffin @Eric Katzfey
            last edited by 26 Feb 2025, 22:34

            @Eric-Katzfey yes it is on a starling 2 max SKU: MRB-D0012-4-V2-C29-T9-M24-X0

            T 1 Reply Last reply 26 Feb 2025, 23:50 Reply Quote 0
            • T
              tom admin @griffin
              last edited by 26 Feb 2025, 23:50

              @griffin Are you able to view the tof data in voxl-portal?

              G 1 Reply Last reply 27 Feb 2025, 00:04 Reply Quote 0
              • G
                griffin @tom
                last edited by 27 Feb 2025, 00:04

                @tom yes

                A 1 Reply Last reply 27 Feb 2025, 04:59 Reply Quote 0
                • A
                  Alex Kushleyev ModalAI Team @griffin
                  last edited by Alex Kushleyev 27 Feb 2025, 05:00 27 Feb 2025, 04:59

                  @griffin , please see the following post with the same symptom and fix : https://forum.modalai.com/topic/4171/frame-size-mismatch-got-43200-bytes-from-pipe-expected-38528

                  We will test this and merge to dev soon, meanwhile if you can re-build the camera server, you could test it.

                  Alex

                  G 1 Reply Last reply 1 Apr 2025, 00:59 Reply Quote 0
                  • G
                    griffin @Alex Kushleyev
                    last edited by 1 Apr 2025, 00:59

                    Hey @Alex-Kushleyev

                    I finally found some time to test out the fix and got it working, but only after some additional modification: the voxl-camera-server seems to encode the frames as 240x180 when they are actually 180x240. This led to weird aliasing issues when inspecting the resulting RTSP streams.

                    The fix was just for me to swap the WxH resolutions. I am not 100% sure if this would be necessary to do in all cases but might be worth you looking into

                    Kind regards,
                    Griffin

                    A 1 Reply Last reply 1 Apr 2025, 02:41 Reply Quote 0
                    • A
                      Alex Kushleyev ModalAI Team @griffin
                      last edited by 1 Apr 2025, 02:41

                      Hi @griffin, thank you for confirming. You are absolutely right.

                      I will make an update to the original fix and test myself. The fix should be checking the flag (configInfo.en_rotate) and rotating the output dimensions in the pipe json, if needed.

                      Alex

                      A 1 Reply Last reply 9 Apr 2025, 02:38 Reply Quote 0
                      • A
                        Alex Kushleyev ModalAI Team @Alex Kushleyev
                        last edited by 9 Apr 2025, 02:38

                        the fix has been committed to voxl-camera-server dev branch : https://gitlab.com/voxl-public/voxl-sdk/services/voxl-camera-server/-/commit/520bad13a573dde500d36cf1008e67102e0b6078 . I tested it for the rotated and non-rotated use case using voxl-streamer.

                        Alex

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB | Contributors