Unable to access px4 with qgc in voxl 2 using usb-jst cable



  • I am trying to access px4 with qgc using usb-jst cable using cable no 10 by connecting the jst to J18 port of voxl 2 IMG_20220817_154802.jpg.

    The host pc is not detecting anything. What should be done to solve the issue?


  • Dev Team

    Hi @Tamas-Pal-0 ,

    On VOXL2 J18 is a UART that connects to the DSP that is used for ESCs --> https://docs.modalai.com/voxl2-connectors/#j18-uart-esc

    At this time, you need to use an IP connection to get to QGC.... Here's some options that I use on my bench:

    https://docs.modalai.com/voxl2-hardware-setup/#wi-fi-connectivity
    https://docs.modalai.com/voxl2-hardware-setup/#ethernet-connectivity

    That cable above works with the STM32 based flight controller (Flight Core and VOXL Flight) but not on J18 of VOXL2.



  • @MODALTB could you please share a dedicated manual for running hitl with voxl 2 only ?
    https://docs.modalai.com/voxl2-PX4-hitl/
    The docs webpage is a bit confusing



  • Hi Tamas, this video is how to get the voxl2 running with HITL: https://www.youtube.com/watch?v=ysvpJdXFWaM&ab_channel=AscendEngineering

    Also - unless you are running the voxl-dev branch, then you will not be able to do a SERIAL connection from the voxl2 to QGC, you can only leverage a UDP connection. If you are running the voxl-dev branch and flashed the board, then you can leverage the voxl-px4-hitl executable and connect to QGC. However, you cannot have gazebo open simultaneously because the serial connection will then be interrupted.

    If you wish to run HITL while running QGC, then run this using an FTDI cable and then turn on the required services (voxl-vision-px4, voxl-mavlink-server) and then connect to gazebo serially, and QGC via UDP signal.

    Let me know if this makes sense.



  • I have flashed the voxl-dev branch files to the voxl 2's /etc/modalai/ folder. It seems like voxl-dev branch's voxl-px4-hitl is not an executable file. I am facing this issue.
    voxl2:~$ voxl-px4-hitl
    bash: voxl-px4-hitl: command not found

    How to fix the problem?


  • Dev Team

    @Tamas-Pal-0 You can get a voxl-dev branch package from here: http://voxl-packages.modalai.com/dists/qrb5165/dev/binary-arm64/voxl-px4_1.4.19-202208111710_arm64.deb. Install that package instead of trying to copy files over manually.



  • @Eric-Katzfey
    The voxl-px4-hitl is still missing in the package. I have installed it and tried to run voxl-px4-hitl command. It is not working. I have shared the terminal syntax below. How to fix it?

    voxl2:/$ sudo dpkg -i voxl-px4_1.4.19-202208111710_arm64.deb
    (Reading database ... 81777 files and directories currently installed.)
    Preparing to unpack voxl-px4_1.4.19-202208111710_arm64.deb ...
    Unpacking voxl-px4 (1.4.19-202208111710) over (1.4.19-202208111710) ...
    Setting up voxl-px4 (1.4.19-202208111710) ...
    Found DSP signature file
    /
    voxl2:/$ sudo apt-get install -f
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
    voxl2:/$ voxl-px4-hitl
    bash: /usr/bin/voxl-px4-hitl: Permission denied
    voxl2:/$ sudo voxl-px4-hitl
    sudo: voxl-px4-hitl: command not found



  • Hi Tamas - please run a chmod +x /usr/bin/voxl-px4-hitl and that will enable permissions. After running that, you can run voxl-px4-hitl from any directory and it will work.



  • @Zachary-Lowell
    Aftert running the voxl-px4-hitl command I am still gettting an output like this. Is it fine? If not how to solve the problem?

    voxl2:/usr/bin$ chmod +x /usr/bin/voxl-px4-hitl
    voxl2:/usr/bin$ voxl-px4-hitl 
    Found DSP signature file
    Setting GPS Parameters for HITL
    INFO  [px4] mlockall() enabled. PX4's virtual address space is locked into RAM.
    INFO  [px4] PX4 daemon already running for instance 0 (Success)
    INFO  [px4] mlockall() enabled. PX4's virtual address space is locked into RAM.
    INFO  [px4] PX4 daemon already running for instance 0 (Success)
    voxl2:/usr/bin$
    
    

  • Dev Team

    @Tamas-Pal-0 Looks like px4 was already running. It was probably automatically started on system bootup using the systemd service. What is the output from voxl-inspect-services?



  • @Eric-Katzfey

    voxl2:/$ voxl-inspect-services 
     Service Name         |  Enabled  |   Running   |  CPU Usage
    ---------------------------------------------------------------
     docker-autorun       | Disabled  | Not Running |  
     docker-daemon        | Disabled  | Not Running |  
     modallink-relink     |  Enabled  | Not Running |  
     voxl-camera-server   |  Enabled  | Not Running |  
     voxl-cpu-monitor     |  Enabled  |   Running   |     0.0
     voxl-dfs-server      |  Enabled  | Not Running |  
     voxl-imu-server      |  Enabled  |   Running   |     0.0
     voxl-mavlink-server  |  Enabled  |   Running   |     0.0
     voxl-modem           | Disabled  | Not Running |  
     voxl-portal          |  Enabled  |   Running   |     0.0
     voxl-px4-imu-server  |  Enabled  |   Running   |     0.0
     voxl-px4             |  Enabled  |   Running   |     0.0
     voxl-qvio-server     |  Enabled  | Not Running |  
     voxl-softap          | Disabled  | Not Running |  
     voxl-static-ip       |  Enabled  | Not Running |  
     voxl-streamer        |  Enabled  |   Running   |     0.0
     voxl-tag-detector    |  Enabled  | Not Running |  
     voxl-tflite-server   |  Enabled  |   Running   |     0.0
     voxl-time-sync       | Disabled  | Not Running |  
     voxl-vision-px4      |  Enabled  |   Running   |     0.0
     voxl-wait-for-fs     |  Enabled  |  Completed  |  
    voxl2:/$ 
    

    As mentioned by @Zachary-Lowell the voxl-px4-hitl file is not executable as shown in the youtube video https://www.youtube.com/watch?v=ysvpJdXFWaM&ab_channel=AscendEngineering
    how to get the voxl-px4-hitl executable file?


  • Dev Team

    @Tamas-Pal-0 sudo chmod +x /usr/bin/voxl-px4-hitl



  • @Eric-Katzfey The voxl-px4-hitl is still missing. I followed all the steps but the executable file voxl-px4-hitl is still not there

    voxl2:/$ wget  http://voxl-packages.modalai.com/dists/qrb5165/dev/binary-arm64/voxl-px4_1.4.19-202208111710_arm64.deb
    --2022-08-25 10:05:37--  http://voxl-packages.modalai.com/dists/qrb5165/dev/binary-arm64/voxl-px4_1.4.19-202208111710_arm64.deb
    Resolving voxl-packages.modalai.com (voxl-packages.modalai.com)... 35.215.116.197
    Connecting to voxl-packages.modalai.com (voxl-packages.modalai.com)|35.215.116.197|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 5093080 (4.9M) [application/octet-stream]
    Saving to: 'voxl-px4_1.4.19-202208111710_arm64.deb'
    
    voxl-px4_1.4.19-202 100%[===================>]   4.86M  1.86MB/s    in 2.6s    
    
    2022-08-25 10:05:41 (1.86 MB/s) - 'voxl-px4_1.4.19-202208111710_arm64.deb' saved [5093080/5093080]
    
    voxl2:/$ dpkg -i voxl-px4_1.4.19-202208111710_arm64.deb 
    (Reading database ... 81777 files and directories currently installed.)
    Preparing to unpack voxl-px4_1.4.19-202208111710_arm64.deb ...
    Unpacking voxl-px4 (1.4.19-202208111710) over (1.4.19-202208111710) ...
    Setting up voxl-px4 (1.4.19-202208111710) ...
    Found DSP signature file
    /
    voxl2:/$ apt-get install -f
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
    voxl2:/$ sudo chmod +x /usr/bin/voxl-px4-hitl
    voxl2:/$ voxl-px4-hitl 
    Found DSP signature file
    Setting GPS Parameters for HITL
    INFO  [px4] mlockall() enabled. PX4's virtual address space is locked into RAM.
    INFO  [px4] PX4 daemon already running for instance 0 (Success)
    INFO  [px4] mlockall() enabled. PX4's virtual address space is locked into RAM.
    INFO  [px4] PX4 daemon already running for instance 0 (Success)
    voxl2:/$ 
    

    how to fix this ?


  • Dev Team

    @Tamas-Pal-0 voxl-px4-hitl isn't missing. Your screen shot shows you executing it. But as I said in the earlier response you already have px4 running and when you execute the command it won't allow you to run a second instance of px4.


  • Dev Team

    @Tamas-Pal-0 In order to prevent px4 from running automatically in the background as a daemon on system startup use systemctl disable voxl-px4 and then sync. Reboot voxl 2 and then try voxl-px4-hitl again.


Log in to reply