ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. DarkKnightCH
    3. Posts
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 11
    • Posts 39
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by DarkKnightCH

    • RE: Using Motion Capture Systems (Optitrack) for Position Estimation

      I tried another way to implement this. Currently my flight core is disconnected to the VOXL. I use my laptop as the companion computer, and then I add a ESP Wifi module to Flight Core TELEM1, so my laptop will get the motion capture pose by using vrpn_client_ros, the mavros will transfer the motion capture pose to mavlink data and then send to flight core.

      In this case, my EKF2 will converge. The new issue is that the modalAI cannot hover at it's height on flight mode or hold mode, and the modalAI will drift. Also, the mavros terminal will show:"RTT too high for timesync: 78 ms". I am not sure if this is the reason that the modalAI will drifting in position mode.

      Any suggestion?

      posted in Ask your questions right here!
      D
      DarkKnightCH
    • How to unplug the MCBL-00007?

      As shown in the following figure, what is the name of the J1 connector? what's the right way to unplug it? I tried to unplug it and it seems very hard to unplug it, so I didn't continue to do that since I don't want to break it.
      MCBL-00007 VOXL to Flight Core/VOXL ESC Serial Cable
      335a04fa-9ad8-47fe-ab79-2a2dec22c1e3-image.png
      790b4abd-8c14-4d0d-a5fd-aacc4c3fb237-image.png

      posted in VOXL m500 Reference Drone
      D
      DarkKnightCH
    • Flight core integrate with a Wifi module?

      Hi, is it possible that I buy a Wifi module and connect it to the Telem2 port in flight core so that the QGC in my laptop can communicate with PX4 through this Wifi? and in this case, my laptop will work as the companion computer instead of the VOXL.

      posted in Flight Core
      D
      DarkKnightCH
    • RE: PX4 disconnected from UART & QGC cannot connected to modalAI

      @Chad-Sweet Yeah. I tried the following command

      voxl-configure-opkg
      

      and

      opkg update
      

      and then try to restart the voxl-vision-px4 and it seems nothing helps.

      Since I can connect to voxl through wifi and adb, I have no idea why voxl will broken since I treat it very carefully. Indeed sometimes this QGC disconnection issue happens randomly. Could I mail back the Flight Core and VOXL to you and would you mind helping me check what is the issue?

      posted in VOXL m500 Reference Drone
      D
      DarkKnightCH
    • RE: PX4 disconnected from UART & QGC cannot connected to modalAI

      @Chad-Sweet I tried to follow your advice and it shows

      voxl:~$ voxl-px4-shell
      ERROR opening /run/mpa/vvpx4_shell/
      most likely the voxl-vision-px4 service is not running
      

      I also tried to run

      systemctl restart voxl-vision-px4
      

      and

      voxl-vision-px4 status
      

      and it shows

      voxl:~$ voxl-vision-px4 status
      loading our own config file
      =================================================================
      Parameters as loaded from config file:
      qgc_ip:                     192.168.0.121
      en_localhost_mavlink_udp    1
      en_secondary_qgc:           0
      secondary_qgc_ip:           192.168.1.214
      qgc_udp_port_number:        14550
      localhost_udp_port_number:  14551
      udp_mtu:                    512
      en_vio:                     1
      en_voa:                     1
      en_send_vio_to_qgc:         0
      en_send_voa_to_qgc:         0
      en_set_clock_from_gps:      1
      en_force_onboard_mav1_mode: 1
      en_reset_px4_on_error:      1
      qvio_auto_reset_quality:    0.000500
      horizon_cal_tolerance:      0.300000
      voa_upper_bound_m:          1.250000
      voa_lower_bound_m:          1.250000
      en_adsb:                    0
      adsb_uart_bus:              7
      adsb_uart_baudrate:         57600
      px4_uart_bus:               5
      px4_uart_baudrate:          921600
      offboard_mode:              off
      follow_tag_id:              0
      en_tag_fixed_frame:         0
      fixed_frame_filter_len:     5
      en_transform_mavlink_pos_setpoints_from_fixed_frame:0
      =================================================================
      loading extrinsics config file
      starting geometry module
      starting px4 monitor
      starting uart mavlink
      Successfully opened mavparser
      starting udp mavlink
      Adding manual QGC IP address to udp connection list: 192.168.0.121
      Added new UDP connection to 192.168.0.121
      starting px4 shell
      starting fixed pose input
      starting vio manager
      starting tag manager
      starting voa manager
      starting control input pipe
      Init complete, entering main loop
      Connected to voxl-qvio-server
      updating to use imu: imu0
      done updating transforms to use imu: imu0
      Connected to voxl-tag-detector
      Connected to voxl-dfs-server
      WARNING PX4 DISCONNECTED FROM UART
      

      any suggestion?

      posted in VOXL m500 Reference Drone
      D
      DarkKnightCH
    • RE: Warning PX4 disconnected from UART

      @mohammednaveed Hi, have you solved your issue? Do you know where the issue is from?

      posted in Ask your questions right here!
      D
      DarkKnightCH
    • RE: PX4 disconnected from UART & QGC cannot connected to modalAI

      @Chad-Sweet I would like to update my voxl-suite-ipk meta package since I doubt maybe something is wrong about the voxl-vision-px4? is there a simple way to do it except flashing a new system image of voxl? should I use the following command to do it?

      opkg update && opkg upgrade
      
      posted in VOXL m500 Reference Drone
      D
      DarkKnightCH
    • RE: PX4 disconnected from UART & QGC cannot connected to modalAI

      @Chad-Sweet Yeah. I already reload a flight core firmware and it doesn't help. Is it possible that voxl-vision-px4 server is broken? The UART wire physical connection looks pretty valid. it is hard for me to find out where the issue is from.

      posted in VOXL m500 Reference Drone
      D
      DarkKnightCH
    • RE: PX4 disconnected from UART & QGC cannot connected to modalAI

      More tests have done:
      (1) First, I can ssh into voxl through my laptop. And this means the wifi in VOXL is working.
      (2) I can adb into voxl board, which means that my voxl board is not bricked?
      (3)I can connect my flight core with my QGC via USB.
      (4)I tried to run voxl-inspect-services, and it shows
      Screenshot_2022-07-10_16-27-48.png
      (5)I also tried to run voxl-inspect-qvio, and it shows that
      Screenshot_2022-07-10_16-04-32.png

      (6)I also tried to reset the voxl-vision-px4 by running voxl-configure-vision-px4 as follows
      Screenshot_2022-07-10_16-33-19.png

      But there still is a WARNING show PX4 disconnected from UART.

      Any suggestion😧 ?

      posted in VOXL m500 Reference Drone
      D
      DarkKnightCH
    • RE: PX4 disconnected from UART & QGC cannot connected to modalAI

      @keil
      Hi, keil, Thanks for help.
      I tried to run the systemctl restart voxl-vision-px4, but it doesn't help.

      What do you mean enabling voxl-mavlink-server?

      QGC ip address is correct.

      posted in VOXL m500 Reference Drone
      D
      DarkKnightCH
    • RE: PX4 disconnected from UART & QGC cannot connected to modalAI

      HI,

      I also found this post which has the same issue with me. I tried to follow the suggestion in this post:I open a MAVLink connection over USB to the flight core, and run mavlink status from the nutshell

      
      NuttShell (NSH)
      nsh> mavlink status
      
      instance #0:
          GCS heartbeat:    267144 us ago
          mavlink chan: #0
          type:        USB CDC
          flow control: OFF
          rates:
            tx: 15.682 kB/s
            txerr: 0.000 kB/s
            tx rate mult: 1.000
            tx rate max: 800000 B/s
            rx: 0.046 kB/s
          FTP enabled: YES, TX enabled: YES
          mode: Config
          MAVLink version: 2
          transport protocol: serial (/dev/ttyACM0 @2000000)
          ping statistics:
            last: 1.72 ms
            mean: 2.18 ms
            max: 6541.72 ms
            min: 0.19 ms
            dropped packets: 5
      
      instance #1:
          mavlink chan: #1
          type:        GENERIC LINK OR RADIO
          flow control: ON
          rates:
            tx: 1.564 kB/s
            txerr: 0.000 kB/s
            tx rate mult: 1.000
            tx rate max: 2880 B/s
            rx: 0.000 kB/s
          FTP enabled: YES, TX enabled: YES
          mode: Normal
          MAVLink version: 1
          transport protocol: serial (/dev/ttyS6 @57600)
      
      instance #2:
          mavlink chan: #2
          type:        GENERIC LINK OR RADIO
          flow control: OFF
          rates:
            tx: 14.672 kB/s
            txerr: 0.000 kB/s
            tx rate mult: 1.000
            tx rate max: 46080 B/s
            rx: 0.000 kB/s
          FTP enabled: YES, TX enabled: YES
          mode: Onboard
          MAVLink version: 2
          transport protocol: serial (/dev/ttyS4 @921600)
      
      instance #3:
          mavlink chan: #3
          type:        GENERIC LINK OR RADIO
          flow control: ON
          rates:
            tx: 1.564 kB/s
            txerr: 0.000 kB/s
            tx rate mult: 1.000
            tx rate max: 2880 B/s
            rx: 0.000 kB/s
          FTP enabled: YES, TX enabled: YES
          mode: Normal
          MAVLink version: 1
          transport protocol: serial (/dev/ttyS1 @57600)
      

      From above information, I cannot track where the issue is, any suggestion?

      posted in VOXL m500 Reference Drone
      D
      DarkKnightCH
    • RE: PX4 UART Warning

      @Steve-Turner
      hey, Steven, have you solved your issue?I am currently facing the same issue with you .
      https://forum.modalai.com/topic/1103/px4-disconnected-from-uart-qgc-cannot-connected-to-modalai?_=1657381522102

      posted in Ask your questions right here!
      D
      DarkKnightCH
    • PX4 disconnected from UART & QGC cannot connected to modalAI

      Hi,
      As you can see from the first figure, when I run:voxl_vision_px4 status, it shows that WARNING PX4 DISCONNECTED FROM UART, do you know how to address this issue? The firmware version is 1.11.3.
      7c8bbe5d-58bb-4dd7-9107-d2d18a2807c5.png

      I have noticed that this post have the same issue with mine. However, my ModalAI's MAV_1_MODE is already set to Onboard. https://forum.modalai.com/topic/70/warning-px4-disconnected-error-message-from-voxl-vision-px4?_=1657322074175

      Meanwhile, right now the QGC cannot connect to ModalAI.
      5f33bd94-aca5-4343-8ec5-f03c39e91654.png

      Any suggestion? Thanks in advance!

      posted in VOXL m500 Reference Drone
      D
      DarkKnightCH
    • RE: what is the ESC signal to control the motor?

      @Alex-Kushleyev @modaltb
      Hi, Thanks for your help. The following is my update:
      (1) The ModalAI is using DShoot600 ESC protocal. This can be verified by DSHOT_CONFIG parameter in QGC. Also, by checking the Dshot.h source code, I can find the following information.
      https://github.com/PX4/PX4-Autopilot/blob/main/src/drivers/dshot/DShot.h

      /** Dshot PWM frequency, Hz */
      static constexpr unsigned int DSHOT150  =  150000u;
      static constexpr unsigned int DSHOT300  =  300000u;
      static constexpr unsigned int DSHOT600  =  600000u;
      static constexpr unsigned int DSHOT1200 = 1200000u;
      
      static constexpr int DSHOT_DISARM_VALUE = 0;
      static constexpr int DSHOT_MIN_THROTTLE = 1;
      static constexpr int DSHOT_MAX_THROTTLE = 1999;
      

      The Dshot frequency is f= 6*10^5Hz, so the time period is 1/f=1.6 us, and 1.6 us matches the time period of signal which is form my oscilloscope. Again, this verifies the Dshot600 is the right one.

      For the the logged data from acturator_outputs, the value is around 800-1000 when quadcopter is hovering, which is makes sense to me since I guess the value range for acturator_outputs is [1,1999] according to DSHOT_MIN_THROTTLE = 1 and DSHOT_MAX_THROTTLE = 1999. According to acturator_outputs commands, right now I can verify my own thrust models.

      Although right now I didn't fully understand how mixer works, however there are a few things that I can make sure is: The modalAI airframe type is quadcopter x, the vehicle is generic Quadcopter, therefore I go there https://github.com/modalai/px4-firmware/tree/1.11.3/ROMFS/px4fmu_common/init.d/airframes and trying to find the airframe source file, but I didn't find a file named xxxx_generic_quadcopter. I found this file which is called: 4001_quad_x, https://github.com/modalai/px4-firmware/blob/1.11.3/ROMFS/px4fmu_common/init.d/airframes/4001_quad_x, is this the airframe file that ModalAI using?

      I assume it is, since it mentioned that @name Generic Quadcopter @type Quadrotor x, which matches the airframe type in QGC.

      #!/bin/sh
      #
      # @name Generic Quadcopter
      #
      # @type Quadrotor x
      # @class Copter
      #
      # @output MAIN1 motor 1
      # @output MAIN2 motor 2
      # @output MAIN3 motor 3
      # @output MAIN4 motor 4
      # @output MAIN5 feed-through of RC AUX1 channel
      # @output MAIN6 feed-through of RC AUX2 channel
      #
      # @output AUX1 feed-through of RC AUX1 channel
      # @output AUX2 feed-through of RC AUX2 channel
      # @output AUX3 feed-through of RC AUX3 channel
      # @output AUX4 feed-through of RC FLAPS channel
      #
      # @maintainer Lorenz Meier <lorenz@px4.io>
      #
      
      . ${R}etc/init.d/rc.mc_defaults
      
      set MIXER quad_x
      
      set PWM_OUT 1234
      

      In above file, it set MIXER =quad_x, so I go there https://github.com/modalai/px4-firmware/tree/1.11.3/ROMFS/px4fmu_common, and find quad_x.main.mix(https://github.com/modalai/px4-firmware/blob/1.11.3/ROMFS/px4fmu_common/mixers/quad_x.main.mix). According to the mixer file, is there anyone who can help to explain it?(I tried to syntax of mixer file in https://docs.px4.io/master/en/concept/mixing.html, but it is still confusing.) And also why it is only defines the AUX1 and AUX2 mixer instead of Main mixer?

      R: 4x
      
      AUX1 Passthrough
      M: 1
      S: 3 5  10000  10000      0 -10000  10000
      
      AUX2 Passthrough
      M: 1
      S: 3 6  10000  10000      0 -10000  10000
      
      Failsafe outputs
      The following outputs are set to their disarmed value
      during normal operation and to their failsafe falue in case
      of flight termination.
      Z:
      Z:
      

      Will keep update once I know more about mixer~

      posted in ESCs
      D
      DarkKnightCH
    • RE: Using Motion Capture Systems (Optitrack) for Position Estimation

      e18f2a44-1d98-4f75-b3b5-5cb14b2680f6-image.png

      According to this post which is about checking the PX4 received external message, https://docs.px4.io/master/en/computer_vision/visual_inertial_odometry.html

      I set the PX4 parameter MAV_ODOM_LP to 1. Then PX4 will stream back the received external pose as MAVLink ODOMETRY messages. As you can see in the above Figure, the left side is the Odometry which shows quadcopter's pose in NED frame, and the right side is the Mocap pose in the ENU frame, and they match pretty well. Therefore, it seems the EKF2 can receive the Mocap pose.

      This is one of my logged data,
      https://review.px4.io/plot_app?log=7f27f736-8ea9-4678-80cc-e97801608610
      and according to the below report, it starts to show an error at 5 seconds: EV Data drop frame, and I doubt this is the reason that the EKF2 will diverge. Still need some time to figure out why the EV data will drop. Is there anyone can give me some suggestion?
      1b3e2e3c-20c3-4390-a69a-f6a8b2c14337-image.png

      Thanks

      posted in Ask your questions right here!
      D
      DarkKnightCH
    • How to integrate the external vision(Mocap) pose into M500 correctly?

      Hello, I am trying to integrate the Mocap pose into EKF2 in PX4 instead of VIO pose. The following post includes the details about how I implement it and the issue that I am facing now.

      https://forum.modalai.com/topic/919/using-motion-capture-systems-optitrack-for-position-estimation?_=1656684369047

      Since there are two pose sources: Mocap pose and VIO pose, therefore I have to disable the VIO pose. I tried to set the parameter "en_vio: false" which is in voxl-vision-px4.conf file, but once I have done that, the server voxl-vision-px4 seems been disabled(when I enable the en_vio, then I use voxl-inspect-pose command to check the pose data, it works fine; However, when I disable the en_vio, then I use voxl-inspect-pose command to check the pose data, it shows ‘waiting for server at /run/mpa/vvpx4_body_wrt_fixed/’).

      Therefore, I can conclude that once I disable the en_vio, the server voxl_vision_px4 server is also been disabled, and then my Mocap_pose is also been disabled? How can I disable the VIO pose but meanwhile the Mocap pose can be sent to PX4?

      posted in VOXL m500 Reference Drone
      D
      DarkKnightCH
    • RE: Using another external Visual System for Localization

      @vmassague Hi, I am pretty much doing the same thing and I faced a similar issue with you.
      have you solved this issue?
      https://forum.modalai.com/topic/919/using-motion-capture-systems-optitrack-for-position-estimation/2?_=1656684369036

      posted in Ask your questions right here!
      D
      DarkKnightCH
    • RE: x&y values zero in odometry

      @Adrian-Hidalgo Hi, do you know why when VIO hasn't started up, then x&y are zeroed out but z still has values?

      Recently I am trying to use the Motion Capture(Mocap) to provide pose information to EKF2 instead of VIO pose. Therefore, I run the vrpn_client_ros and mavros to get the Mocap data and meanwhile I disabled the VIO by setting "en_vio=false". Then the EKF2 will diverge and after about 50 seconds, x & y are zeroed out but z still has values.

      https://forum.modalai.com/topic/919/using-motion-capture-systems-optitrack-for-position-estimation?_=1656684369036

      posted in Ask your questions right here!
      D
      DarkKnightCH
    • RE: Using Motion Capture Systems (Optitrack) for Position Estimation

      @IC @Chad-Sweet The Mocap_ModalAI_QGC_communication graph

      Hi, the above graph is my understanding about how whole system is communicating, please feel free to point out if there is any mistake. Thanks

      posted in Ask your questions right here!
      D
      DarkKnightCH