Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. Serial port for HITL and building gazebo target

Serial port for HITL and building gazebo target

Scheduled Pinned Locked Moved Ask your questions right here!
6 Posts 3 Posters 1.5k 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.
  • Youngjoo KimY Offline
    Youngjoo KimY Offline
    Youngjoo Kim
    wrote on last edited by Youngjoo Kim
    #1

    Hi

    I'm trying HITL with gazebo. It would be appreciated if you could help me with these 2 questions.

    I'm trying to make a mavlink connection directly to the serial port (not via voxl-vision-px4. I configured it to connect with QGC and ROS via mavros.).

    In voxl-px4-hitl.config, I tried

    mavlink start -d /dev/uart_esc -b 921600 -m onboard -r 80000
    

    because it seems the ESC is using J18.
    https://docs.modalai.com/voxl2-esc-configs/
    https://github.com/modalai/px4-firmware/blob/voxl-dev/boards/modalai/rb5-flight/voxl-px4.config#L124

    But running voxl-px4-hitl says

    ERROR [mavlink] Device /dev/uart_esc does not exist
    

    Which port should I put in the config?

    I was working on the voxl-dev branch because px4-firmware submodule in voxl-px4 is pointing to the latest commit in voxl-dev branch.

    But the HITL guide is using voxl-master branch. I succeeded to build the target in voxl-master:

    DONT_RUN=1 make px4_sitl_default gazebo
    

    But it fails in voxl-dev.

    I wonder if it is supposed to work or not.
    And I wonder if it is okay to run voxl-dev on VOXL2 for HITL.

    Thanks

    Eric KatzfeyE 1 Reply Last reply
    0
    • Zachary LowellZ Offline
      Zachary LowellZ Offline
      Zachary Lowell
      ModalAI Team
      wrote on last edited by Zachary Lowell
      #2

      @Youngjoo-Kim said in Serial port for HITL and building gazebo target:

      mavlink start -d /dev/uart_esc -b 921600 -m onboard -r 80000

      Hi @Youngjoo-Kim

      1. You cannot leverage that serial port to connect to QGC and run HITL at the same time. There will be conflicting mavlink packets and it will not work. You either neither connect to QGC via voxl-vision-px4 and have those serial mavlink packets be passing the gazebo packets, or not run gazebo at all and only have a serial connection going to QGC. If I put my money on it - the /dev/uart_esc actually isnt the name of the wire in the dev environment. In px4 for the voxl2 these ports are usually represented by numbers instead of paths - so I would recommend putting a value of '2' which should be the dsp port you are connected to (the 4 pin jst connector on the bottom of the voxl2).

      2. You can run any version of px4 for whichever computer is running gazebo. I always just checkout PX4-Autopilot v1.12.3 to run gazebo.

      Let me know if this helps out.
      Zach

      Youngjoo KimY 1 Reply Last reply
      0
      • Youngjoo KimY Youngjoo Kim

        Hi

        I'm trying HITL with gazebo. It would be appreciated if you could help me with these 2 questions.

        I'm trying to make a mavlink connection directly to the serial port (not via voxl-vision-px4. I configured it to connect with QGC and ROS via mavros.).

        In voxl-px4-hitl.config, I tried

        mavlink start -d /dev/uart_esc -b 921600 -m onboard -r 80000
        

        because it seems the ESC is using J18.
        https://docs.modalai.com/voxl2-esc-configs/
        https://github.com/modalai/px4-firmware/blob/voxl-dev/boards/modalai/rb5-flight/voxl-px4.config#L124

        But running voxl-px4-hitl says

        ERROR [mavlink] Device /dev/uart_esc does not exist
        

        Which port should I put in the config?

        I was working on the voxl-dev branch because px4-firmware submodule in voxl-px4 is pointing to the latest commit in voxl-dev branch.

        But the HITL guide is using voxl-master branch. I succeeded to build the target in voxl-master:

        DONT_RUN=1 make px4_sitl_default gazebo
        

        But it fails in voxl-dev.

        I wonder if it is supposed to work or not.
        And I wonder if it is okay to run voxl-dev on VOXL2 for HITL.

        Thanks

        Eric KatzfeyE Offline
        Eric KatzfeyE Offline
        Eric Katzfey
        ModalAI Team
        wrote on last edited by
        #3

        @Youngjoo-Kim Mavlink runs on the applications processor (Linux). There is no UART available to that processor without purchasing add on cards. The UART for the ESC is connected to the DSP processor which runs the real time flight control software for PX4. You cannot directly access that port from the applications processor.

        Youngjoo KimY 1 Reply Last reply
        0
        • Eric KatzfeyE Eric Katzfey

          @Youngjoo-Kim Mavlink runs on the applications processor (Linux). There is no UART available to that processor without purchasing add on cards. The UART for the ESC is connected to the DSP processor which runs the real time flight control software for PX4. You cannot directly access that port from the applications processor.

          Youngjoo KimY Offline
          Youngjoo KimY Offline
          Youngjoo Kim
          wrote on last edited by Youngjoo Kim
          #4

          @Eric-Katzfey Thank you for your answer Eric.
          Could you tell me about the J18 port, like which part of VOXL SDK is communicating with it?

          Eric KatzfeyE 1 Reply Last reply
          0
          • Zachary LowellZ Zachary Lowell

            @Youngjoo-Kim said in Serial port for HITL and building gazebo target:

            mavlink start -d /dev/uart_esc -b 921600 -m onboard -r 80000

            Hi @Youngjoo-Kim

            1. You cannot leverage that serial port to connect to QGC and run HITL at the same time. There will be conflicting mavlink packets and it will not work. You either neither connect to QGC via voxl-vision-px4 and have those serial mavlink packets be passing the gazebo packets, or not run gazebo at all and only have a serial connection going to QGC. If I put my money on it - the /dev/uart_esc actually isnt the name of the wire in the dev environment. In px4 for the voxl2 these ports are usually represented by numbers instead of paths - so I would recommend putting a value of '2' which should be the dsp port you are connected to (the 4 pin jst connector on the bottom of the voxl2).

            2. You can run any version of px4 for whichever computer is running gazebo. I always just checkout PX4-Autopilot v1.12.3 to run gazebo.

            Let me know if this helps out.
            Zach

            Youngjoo KimY Offline
            Youngjoo KimY Offline
            Youngjoo Kim
            wrote on last edited by
            #5

            @Zachary-Lowell Thank you for your answer.

            1. I'm using QGC via wifi, not the serial port. So it might be okay to use the serial port for other purposes.

            With some struggles, I found that /dev/ttyHS0 'exists' because putting this port doesn't give me any error. (But it could be some other port connected to the ARM, rather than the 4-pin JST port)
            Anyway, do you know how to figure out which port name corresponds to the port on the board?

            1. Thanks.
            1 Reply Last reply
            0
            • Youngjoo KimY Youngjoo Kim

              @Eric-Katzfey Thank you for your answer Eric.
              Could you tell me about the J18 port, like which part of VOXL SDK is communicating with it?

              Eric KatzfeyE Offline
              Eric KatzfeyE Offline
              Eric Katzfey
              ModalAI Team
              wrote on last edited by
              #6

              @Youngjoo-Kim J18 is the port normally used for the UART based ESC. It is connected to the DSP, not the Linux processor. You cannot directly access it from Linux. Why do you need to run Mavlink over a serial port? We support and recommend using UDP.

              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