Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Software Development
  3. VOXL SDK
  4. Question on developing custom services

Question on developing custom services

Scheduled Pinned Locked Moved VOXL SDK
3 Posts 2 Posters 1.4k Views 1 Watching
  • 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.
  • J Offline
    J Offline
    jmltt
    Regular
    wrote on last edited by
    #1

    I've developed, deployed and tested a mocap-server on the Sentinel dev drone by using voxl-cross to build a deb package. I'm still fairly new to software development so I've been learning a lot just by reading the source code in the sdk.

    I have this mocap-server working, but I've only run it as an executable and I was wondering how to get it running as a background service and how to use a config file to replace some of the variable values I'm hard-coding in like socket addresses. Can someone point me to some example code or recommend the simplest service in the sdk to try to learn how that works on voxl2 (both for setting up a program as a background service and integrating config files)?

    Also, generally speaking when I just kill power to the drone is that bypassing the ability of the services that are running to "close cleanly"? I have zmq pub/sub sockets to get mocap data from the host pc to the drone so if I do get it running as a background service I want to make sure I tear down the sockets and context every time before I power down. Would systemctl stop <service-name> be caught by a signal handler or would I have to figure out a different way to close cleanly? If that's already being done for another service/program in the sdk can someone point me to that?

    tomT 1 Reply Last reply
    0
    • J jmltt

      I've developed, deployed and tested a mocap-server on the Sentinel dev drone by using voxl-cross to build a deb package. I'm still fairly new to software development so I've been learning a lot just by reading the source code in the sdk.

      I have this mocap-server working, but I've only run it as an executable and I was wondering how to get it running as a background service and how to use a config file to replace some of the variable values I'm hard-coding in like socket addresses. Can someone point me to some example code or recommend the simplest service in the sdk to try to learn how that works on voxl2 (both for setting up a program as a background service and integrating config files)?

      Also, generally speaking when I just kill power to the drone is that bypassing the ability of the services that are running to "close cleanly"? I have zmq pub/sub sockets to get mocap data from the host pc to the drone so if I do get it running as a background service I want to make sure I tear down the sockets and context every time before I power down. Would systemctl stop <service-name> be caught by a signal handler or would I have to figure out a different way to close cleanly? If that's already being done for another service/program in the sdk can someone point me to that?

      tomT Offline
      tomT Offline
      tom
      admin
      wrote on last edited by
      #2

      @josephmlullo Here is an example of how voxl-camera-server uses a systemd service to run as a background service on boot:

      Link Preview Image
      services/voxl-camera-server.service · master · voxl / VOXL SDK / Services / voxl-camera-server · GitLab

      GitLab.com

      favicon

      GitLab (gitlab.com)

      Our make_package.sh script installs this file into /etc/systemd/system/: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-camera-server/-/blob/master/make_package.sh?ref_type=heads#L149

      and the service can be enabled on boot with: systemctl enable voxl-camera-server

      Here is an example of how we generate a config file using a one-time "configure" script that all of our services have: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-vision-hub/-/blob/master/scripts/voxl-configure-vision-hub?ref_type=heads

      This allows us to generate a JSON file that lives in /etc/modalai that the service can then read from at run-time

      J 1 Reply Last reply
      0
      • tomT tom

        @josephmlullo Here is an example of how voxl-camera-server uses a systemd service to run as a background service on boot:

        Link Preview Image
        services/voxl-camera-server.service · master · voxl / VOXL SDK / Services / voxl-camera-server · GitLab

        GitLab.com

        favicon

        GitLab (gitlab.com)

        Our make_package.sh script installs this file into /etc/systemd/system/: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-camera-server/-/blob/master/make_package.sh?ref_type=heads#L149

        and the service can be enabled on boot with: systemctl enable voxl-camera-server

        Here is an example of how we generate a config file using a one-time "configure" script that all of our services have: https://gitlab.com/voxl-public/voxl-sdk/services/voxl-vision-hub/-/blob/master/scripts/voxl-configure-vision-hub?ref_type=heads

        This allows us to generate a JSON file that lives in /etc/modalai that the service can then read from at run-time

        J Offline
        J Offline
        jmltt
        Regular
        wrote on last edited by
        #3

        @tom Perfect, thanks! I'll check these out

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        ModalAI
        Categories Recent Tags ModalAI.com Docs
        © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups