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

    VOXL2 HITL

    VOXL 2
    3
    10
    168
    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.
    • M
      MikeD
      last edited by

      Hi -
      I'm having issues getting HITL running with ModalAI's Gazebo Docker container while following the instructions below:
      https://docs.modalai.com/voxl2-PX4-hitl/#gazebo-setup

      1. FTDI cable is connected to J18 and linux host (Ubuntu 22.04)
      2. Starting the Docker Gazebo instance reports the following:
        Opened serial device /dev/ttyUSB0
        libcurl: (28) Failed to connect to fuel.ignitionrobotics.org port 443: Connection timed out
        libcurl: (28) Failed to connect to fuel.gazebosim.org port 443: Connection timed out
        ** Gazebo appears to start successfully.
      3. In adb shell I run: voxl-px4-hitl
      4. Here is an excerpt from that output:

      INFO [mavlink] mode: Normal, data rate: 100000 B/s on udp port 14558 remote port 14559
      INFO [muorb] SLPI: Marking DeviceNode(telemetry_status) as advertised in process_remote_topic
      INFO [muorb] SLPI: Too many arming check events (1, 14 > 14). Not reporting all
      INFO [muorb] SLPI: Preflight Fail: No valid data from Accel 0
      INFO [muorb] SLPI: Preflight Fail: barometer 0 missing
      INFO [muorb] SLPI: Preflight Fail: ekf2 missing data
      INFO [muorb] SLPI: Preflight Fail: No valid data from Gyro 0
      INFO [muorb] SLPI: Preflight Fail: Compass Sensor 0 missing
      INFO [mavlink] MAVLink only on localhost (set param MAV_{i}_BROADCAST = 1 to enable network)
      INFO [px4] Startup script returned successfully

      ==> Note that there are many Preflight check failures.

      1. Running dsp_hitl status returns this:
        INFO [muorb] SLPI: Running: yes
        INFO [muorb] SLPI: Status of IMU_Data counter: 0
        INFO [muorb] SLPI: Value of current accel x, y, z data: 0.000000, 0.000000, 0.000000
        INFO [muorb] SLPI: Value of current gyro x, y, z data: 0.000000, 0.000000, 0.000000
        INFO [muorb] SLPI: Value of HIL_Sensor counter: 0
        INFO [muorb] SLPI: Value of Heartbeat counter: 15
        INFO [muorb] SLPI: Value of Vision data counter: 0
        INFO [muorb] SLPI: Value of odometry counter: 0
        INFO [muorb] SLPI: Value of GPS Data counter: 0
        INFO [muorb] SLPI: Ok executing command: dsp_hitl status

      ==> Note that accel & gyro data are always zero AND only the heartbeat counter is incrementing.

      1. Inspection via Wireshark reveals that only heartbeat messages are flowing.

      Any help would be greatly appreciated

      Eric KatzfeyE 1 Reply Last reply Reply Quote 0
      • Eric KatzfeyE
        Eric Katzfey ModalAI Team @MikeD
        last edited by

        @MikeD It doesn't look like the serial link is working. That count of heartbeats is just the heartbeats sent out from HITL on the VOXL2, it doesn't mean that there is anything coming back from the PC running Gazebo. it's possible that your cable isn't correct. You also get some odd messages from Gazebo. Here's what I see when I launch it:

        modalai@modalai-XPS-15-9570:~$ xhost +
        access control disabled, clients can connect from any host
        modalai@modalai-XPS-15-9570:~$ docker run --rm -it --net=host --privileged -e DISPLAY=$DISPLAY -v /dev/input:/dev/input:rw -v /tmp/.X11-unix:/tmp/.X11-unix:ro voxl-gazebo-docker ./run_gazebo.bash
        GAZEBO_PLUGIN_PATH :/usr/workspace/voxl2_hitl_gazebo
        GAZEBO_MODEL_PATH :/usr/workspace/voxl2_hitl_gazebo/models
        LD_LIBRARY_PATH :/usr/workspace/voxl2_hitl_gazebo/build
        Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
        Warning [parser.cc:833] XML Attribute[version] in element[sdf] not defined in SDF, ignoring.
        Opened serial device /dev/ttyUSB0
        
        M 1 Reply Last reply Reply Quote 0
        • M
          MikeD @Eric Katzfey
          last edited by

          @Eric-Katzfey
          The only difference I see is that I'm getting these status messages and you do not:
          libcurl: (28) Failed to connect to fuel.ignitionrobotics.org port 443: Connection timed out
          libcurl: (28) Failed to connect to fuel.gazebosim.org port 443: Connection timed out

          Could this be a problem? Those websites do not appear to exist any longer. Also, if the serial cable was bad how would Wireshark be able to pick up heartbeats from HITL on VOXL2?

          Eric KatzfeyE 1 Reply Last reply Reply Quote 0
          • Eric KatzfeyE
            Eric Katzfey ModalAI Team @MikeD
            last edited by

            @MikeD Ah, I see, Wireshark on PC sees heartbeats coming over serial line from VOXL 2. So that's a good sign. I am worried about those extra messages you get, I've never seen that so probably an indication that something isn't correct.

            M 1 Reply Last reply Reply Quote 0
            • M
              MikeD @Eric Katzfey
              last edited by

              @Eric-Katzfey We finally determined that the heart beat messages were going over an ethernet port and not from the FTDI cable. If I unplug the ethernet connection then we don't get heartbeats any longer. Is there a way to configure the VOXL2 to always use the FTDI connection via J18 on the board or should it just work?

              Eric KatzfeyE 1 Reply Last reply Reply Quote 0
              • Eric KatzfeyE
                Eric Katzfey ModalAI Team @MikeD
                last edited by

                @MikeD The HITL driver runs on the DSP and only uses the serial port. There is no way to make it use Ethernet. What you were seeing was the standard heartbeats being sent out by the Mavlink module in PX4, not related to HITL. That allows you to connect a ground control station while using HITL.

                M 1 Reply Last reply Reply Quote 0
                • M
                  MikeD @Eric Katzfey
                  last edited by MikeD

                  @Eric-Katzfey We think that Gazebo is transmitting over the serial link based on the following observation. While running Gazebo,
                  if we power off the VOXL2 FlightDeck Gazebo reports the following:
                  Exception sending a multicast message:Network is unreachable
                  If we unplug the FTDI cable from the host Gazebo reports the following:
                  Tx queue overflow
                  By the way, the FTDI cable we are using is the MODAL AI MCBL-00091 - we tried two different cables with the same results.
                  The hardware configuration is a VOXL2 FlightDeck. Could there be anything special we need to do to configure the FlightDeck?

                  Eric KatzfeyE 2 Replies Last reply Reply Quote 0
                  • Eric KatzfeyE
                    Eric Katzfey ModalAI Team @MikeD
                    last edited by

                    @MikeD Yes, Gazebo is transmitting over the serial link but it doesn't appear that PX4 receives anything based on dsp_hitl status.

                    1 Reply Last reply Reply Quote 0
                    • Eric KatzfeyE
                      Eric Katzfey ModalAI Team @MikeD
                      last edited by

                      @MikeD said in VOXL2 HITL:

                      MCBL-00091

                      I haven't had much luck with that cable for HITL. I use this: https://www.sparkfun.com/products/12977 and add this: https://www.sparkfun.com/products/17240

                      R 1 Reply Last reply Reply Quote 0
                      • R
                        RyanH @Eric Katzfey
                        last edited by

                        @Eric-Katzfey , @MikeD and I were able to resolve the issue by swapping pins 2 and 3 on the MCBL-00091.

                        We found the following post on the forum: https://forum.modalai.com/topic/3511/serial-port-closed-and-other-hitl-errors. One of the posts notes that in order to use the MCBL-00091, pins 2 and 3 need to be swapped. This appears to be documented here: https://docs.modalai.com/cable-userguides/#m0163-4-pin-jst-to-4-pin-jst-cross-over-example.

                        Thanks for your help!

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