HITL on VOXL 2 : Preflight fail EKF couldn't get status



  • Re: Unable to access px4 with qgc in voxl 2 using usb-jst cable
    That problem with voxl-px4-hitl is solved. Thank you.
    When I am trying to run the voxl-px4-hitl, I am having this issue -

    INFO  [PreFlightCheck] Preflight Fail: Compass Sensor missing
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Preflight fail EKF couldn't get status
    INFO  [PreFlightCheck] Preflight fail EKF couldn't get status
    INFO  [PreFlightCheck] Failed EKF health preflight check
    INFO  [PreFlightCheck] Preflight Fail: Compass Sensor missing
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Preflight fail EKF couldn't get status
    INFO  [PreFlightCheck] Preflight fail EKF couldn't get status
    INFO  [PreFlightCheck] Failed EKF health preflight check
    INFO  [PreFlightCheck] Preflight Fail: Compass Sensor missing
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Preflight fail EKF couldn't get status
    INFO  [PreFlightCheck] Preflight fail EKF couldn't get status
    INFO  [PreFlightCheck] Failed EKF health preflight check
    

    Why it is there and how to solve this issue?



  • @Tamas-Pal-0 said in HITL on VOXL 2 : Preflight fail EKF couldn't get status:

    Why it is there and how to solve this issue?

    Hi Tamas - can you please post the entire log from PX4 shell when you run hitl - my biggest inclination is that you have a bad connection or that you are not using the proper flags when you execute px4 in HITL mode.



  • @Tamas-Pal-0 the more I think about this, the more I believe you are running HITL in VIO while the drone is expecting GPS or vice versa, you are running HITL in GPS mode but the drone is in VIO mode.



  • I am getting this after running voxl-px4-hitl

    voxl2:/etc/modalai$ 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] assuming working directory is rootfs, no symlinks needed.
    
    ______  __   __    ___ 
    | ___ \ \ \ / /   /   |
    | |_/ /  \ V /   / /| |
    |  __/   /   \  / /_| |
    | |     / /^\ \ \___  |
    \_|     \/   \/     |_/
    
    px4 starting.
    
    INFO  [px4] Calling startup script: /bin/sh /etc/modalai/voxl-px4-hitl-gps-parameters.config 0
      CBRK_SUPPLY_CHK: curr: 0 -> new: 894281
    ERROR [parameters] Timeout waiting for parameter_client_set_value_response for CBRK_SUPPLY_CHK
      COM_DISARM_PRFLT: curr: 10.0000 -> new: -1.0000
    ERROR [parameters] Timeout waiting for parameter_client_set_value_response for COM_DISARM_PRFLT
      COM_RC_IN_MODE: curr: 0 -> new: 1
    ERROR [parameters] Timeout waiting for parameter_client_set_value_response for COM_RC_IN_MODE
      NAV_RCL_ACT: curr: 2 -> new: 0
    ERROR [parameters] Timeout waiting for parameter_client_set_value_response for NAV_RCL_ACT
      EKF2_RNG_AID: curr: 0 -> new: 1
    ERROR [parameters] Timeout waiting for parameter_client_set_value_response for EKF2_RNG_AID
    Exiting NOW.
    INFO  [px4] mlockall() enabled. PX4's virtual address space is locked into RAM.
    INFO  [px4] assuming working directory is rootfs, no symlinks needed.
    
    ______  __   __    ___ 
    | ___ \ \ \ / /   /   |
    | |_/ /  \ V /   / /| |
    |  __/   /   \  / /_| |
    | |     / /^\ \ \___  |
    \_|     \/   \/     |_/
    
    px4 starting.
    
    INFO  [px4] Calling startup script: /bin/sh /etc/modalai/voxl-px4-hitl.config 0
    INFO  [muorb] SLPI: Creating qurt thread hpwork
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_hpwork with tid 83
    INFO  [muorb] SLPI: Creating qurt thread lpwork
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_lpwork with tid 82
    INFO  [muorb] SLPI: Creating qurt thread wkr_hrt
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_wkr_hrt with tid 81
    INFO  [muorb] SLPI: Creating qurt thread client_sync_thread
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_client_sync_thread with tid 80
    INFO  [muorb] SLPI: Creating qurt thread wq_manager
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_wq_manager with tid 79
    INFO  [muorb] SLPI: Creating qurt thread qshell
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_qshell with tid 78
    INFO  [logger] logger started (mode=all)
    INFO  [logger] Start file log (type: full)
    INFO  [logger] [logger] /data/px4/log/sess014/log001.ulg
    INFO  [logger] Opened full log file: /data/px4/log/sess014/log001.ulg
    INFO  [muorb] SLPI: Advertising remote topic mavlink_log
    ERROR [logger] No subscriptions added
    INFO  [muorb] SLPI: Advertising remote topic logger_status
    INFO  [qshell] Send cmd: 'icm42688p start -s -h'
    INFO  [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic
    INFO  [muorb] SLPI: qshell gotten: icm42688p start -s -h
    INFO  [muorb] SLPI: Creating qurt thread wq_SPI1
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_wq_SPI1 with tid 77
    INFO  [muorb] SLPI: *** SPI Device ID 0x26000a 2490378
    INFO  [muorb] SLPI: on SPI bus 1
    INFO  [muorb] SLPI: icm42688p #0 on SPI bus 1 (devid=0x0)
    INFO  [muorb] SLPI: 
    
    INFO  [muorb] SLPI: Ok executing command: icm42688p start -s -h
    INFO  [muorb] SLPI: Sending qshell retval with timestamp 624404183, current timestamp 624404183
    INFO  [uorb] Advertising remote topic qshell_retval
    INFO  [qshell] qshell return value timestamp: 624404183, local time: 624407992
    INFO  [muorb] SLPI: Marking DeviceNode(parameter_client_reset_request) as advertised in process_remote_topic
    ERROR [muorb] SLPI: Cannot reset all parameters on client side
    INFO  [uorb] Marking DeviceNode(parameter_client_reset_response) as advertised in process_remote_topic
    INFO  [muorb] SLPI: Advertising remote topic parameter_update
    INFO  [muorb] SLPI: Marking DeviceNode(parameter_client_set_value_request) as advertised in process_remote_to
    INFO  [uorb] Marking DeviceNode(parameter_server_set_used_request) as advertised in process_remote_topic
    INFO  [muorb] SLPI: Marking DeviceNode(parameter_server_set_used_response) as advertised in process_remote_to
    INFO  [uorb] Marking DeviceNode(parameter_client_set_value_response) as advertised in process_remote_topic
    INFO  [dataman] Unknown restart, data manager file '/data/px4/dataman' size is 11798680 bytes
    INFO  [qshell] Send cmd: 'sensors start -h'
    INFO  [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic
    INFO  [muorb] SLPI: qshell gotten: sensors start -h
    INFO  [muorb] SLPI: Creating qurt thread wq_nav_and_controllers
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_wq_nav_and_controllers with tid 76
    INFO  [muorb] SLPI: Creating qurt thread wq_rate_ctrl
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_wq_rate_ctrl with tid 75
    INFO  [muorb] SLPI: Ok executing command: sensors start -h
    INFO  [muorb] SLPI: Sending qshell retval with timestamp 626707779, current timestamp 626707782
    INFO  [uorb] Advertising remote topic sensors_status_imu
    INFO  [qshell] qshell return value timestamp: 626707779, local time: 626711169
    INFO  [commander] Mission #2 loaded, 13 WPs, curr: 0
    INFO  [commander] LED: open /dev/led0 failed (22)
    INFO  [muorb] SLPI: Advertising remote topic mission
    INFO  [muorb] SLPI: Advertising remote topic led_control
    INFO  [muorb] SLPI: Advertising remote topic tune_control
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed EKF health preflight check while waiting for filter to settle
    INFO  [muorb] SLPI: Advertising remote topic vehicle_control_mode
    INFO  [muorb] SLPI: Advertising remote topic vehicle_status
    INFO  [muorb] SLPI: Advertising remote topic actuator_armed
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [muorb] SLPI: Advertising remote topic commander_state
    INFO  [muorb] SLPI: Advertising remote topic vehicle_status_flags
    INFO  [muorb] SLPI: Advertising remote topic vehicle_command
    INFO  [commander] Handling Commander command 176
    INFO  [muorb] SLPI: Advertising remote topic vehicle_command_ack
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [muorb] SLPI: Advertising remote topic position_setpoint_triplet
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic
    INFO  [qshell] Send cmd: 'mc_pos_control start'
    INFO  [muorb] SLPI: qshell gotten: mc_pos_control start
    INFO  [muorb] SLPI: Ok executing command: mc_pos_control start
    INFO  [muorb] SLPI: Sending qshell retval with timestamp 627951004, current timestamp 627951006
    INFO  [qshell] qshell return value timestamp: 627951004, local time: 627952949
    INFO  [qshell] Send cmd: 'mc_att_control start'
    INFO  [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic
    INFO  [muorb] SLPI: qshell gotten: mc_att_control start
    INFO  [muorb] SLPI: Ok executing command: mc_att_control start
    INFO  [muorb] SLPI: Sending qshell retval with timestamp 628024288, current timestamp 628024290
    INFO  [qshell] qshell return value timestamp: 628024288, local time: 628027033
    INFO  [qshell] Send cmd: 'mc_rate_control start'
    INFO  [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic
    INFO  [muorb] SLPI: qshell gotten: mc_rate_control start
    INFO  [muorb] SLPI: Ok executing command: mc_rate_control start
    INFO  [muorb] SLPI: Sending qshell retval with timestamp 628121854, current timestamp 628121856
    INFO  [qshell] qshell return value timestamp: 628121854, local time: 628122930
    INFO  [qshell] Send cmd: 'mc_hover_thrust_estimator start'
    INFO  [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic
    INFO  [muorb] SLPI: qshell gotten: mc_hover_thrust_estimator start
    INFO  [muorb] SLPI: Ok executing command: mc_hover_thrust_estimator start
    INFO  [muorb] SLPI: Sending qshell retval with timestamp 628181880, current timestamp 628181882
    INFO  [qshell] qshell return value timestamp: 628181880, local time: 628183203
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [qshell] Send cmd: 'land_detector start multicopter'
    INFO  [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic
    INFO  [muorb] SLPI: qshell gotten: land_detector start multicopter
    INFO  [muorb] SLPI: Ok executing command: land_detector start multicopter
    INFO  [muorb] SLPI: Sending qshell retval with timestamp 628293334, current timestamp 628293336
    INFO  [qshell] qshell return value timestamp: 628293334, local time: 628294343
    INFO  [uorb] Advertising remote topic vehicle_land_detected
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [qshell] Send cmd: 'pwm_out_sim start -m hil'
    INFO  [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic
    INFO  [muorb] SLPI: qshell gotten: pwm_out_sim start -m hil
    INFO  [muorb] SLPI: Creating qurt thread wq_hp_default
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_wq_hp_default with tid 74
    INFO  [uorb] Advertising remote topic test_motor
    INFO  [muorb] SLPI: Ok executing command: pwm_out_sim start -m hil
    INFO  [muorb] SLPI: Sending qshell retval with timestamp 629365786, current timestamp 629365788
    INFO  [qshell] qshell return value timestamp: 629365786, local time: 629367822
    INFO  [qshell] Send cmd: 'mixer load /dev/pwm_output0 quad_x.main.mix'
    INFO  [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic
    INFO  [muorb] SLPI: qshell gotten: mixer load /dev/pwm_output0 quad_x.main.mix
    INFO  [muorb] SLPI: Ok executing command: mixer load /dev/pwm_output0 quad_x.main.mix
    INFO  [muorb] SLPI: Sending qshell retval with timestamp 629434024, current timestamp 629434026
    INFO  [qshell] qshell return value timestamp: 629434024, local time: 629436110
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [qshell] Send cmd: 'ekf2 start'
    INFO  [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic
    INFO  [muorb] SLPI: qshell gotten: ekf2 start
    INFO  [muorb] SLPI: Creating qurt thread wq_INS0
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_wq_INS0 with tid 4170
    INFO  [muorb] SLPI: Ok executing command: ekf2 start
    INFO  [muorb] SLPI: Sending qshell retval with timestamp 630732518, current timestamp 630732521
    INFO  [qshell] qshell return value timestamp: 630732518, local time: 630734090
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [qshell] Send cmd: 'modalai_dsp start -p 2 -b 921600'
    INFO  [muorb] SLPI: Marking DeviceNode(qshell_req) as advertised in process_remote_topic
    INFO  [muorb] SLPI: qshell gotten: modalai_dsp start -p 2 -b 921600
    INFO  [muorb] SLPI: Creating qurt thread modalai_dsp__main
    
    INFO  [muorb] SLPI: Successfully created px4 task PX4_modalai_dsp__main with tid 73
    INFO  [muorb] SLPI: Ok executing command: modalai_dsp start -p 2 -b 921600
    INFO  [muorb] SLPI: Sending qshell retval with timestamp 631789844, current timestamp 631789846
    ERROR [muorb] SLPI: Port is open: 0
    INFO  [uorb] Advertising remote topic sensor_accel
    INFO  [uorb] Advertising remote topic sensor_gyro
    INFO  [qshell] qshell return value timestamp: 631789844, local time: 631792366
    INFO  [muorb] SLPI: Got 5 from orb_subscribe
    INFO  [muorb] SLPI: Got 6 from orb_subscribe
    INFO  [muorb] SLPI: Got 7 from orb_subscribe
    INFO  [muorb] SLPI: Got 8 from orb_subscribe
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [mavlink] mode: Onboard, data rate: 100000 B/s on udp port 14556 remote port 14557
    INFO  [muorb] SLPI: Marking DeviceNode(vehicle_command) as advertised in process_remote_topic
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [px4] Startup script returned successfully
    pxh> INFO  [muorb] SLPI: Advertising remote topic telemetry_status
    INFO  [mavlink] partner IP: 127.0.0.1
    INFO  [muorb] SLPI: Advertising remote topic obstacle_distance
    INFO  [muorb] SLPI: Advertising remote topic offboard_control_mode
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [muorb] SLPI: Advertising remote topic timesync_status
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    
    pxh> INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    pxh> coINFO  [PreFlightCheck] Failed barometer preflight check
    pxh> commINFO  [PreFlightCheck] Failed barometer preflight check
    pxh> commanINFO  [PreFlightCheck] Failed barometer preflight check
    pxh> commandeINFO  [PreFlightCheck] Failed barometer preflight check
    pxh> commanderINFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    pxh> commander INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    pxh> commander tINFO  [PreFlightCheck] Failed barometer preflight check
    pxh> commander takINFO  [PreFlightCheck] Failed barometer preflight check
    pxh> commander takeoINFO  [PreFlightCheck] Failed barometer preflight check
    pxh> commander takeoffINFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [PreFlightCheck] Failed barometer preflight check
    
    INFO  [PreFlightCheck] Failed barometer preflight check
    INFO  [muorb] SLPI: Marking DeviceNode(vehicle_command) as advertised in process_remote_topic
    pxh> INFO  [muorb] SLPI: Marking DeviceNode(vehicle_command) as advertised in process_remote_topic
    INFO  [commander] Handling Commander command 22
    ERROR [commander] Takeoff denied! Please disarm and retry
    INFO  [commander] Handling Commander command 400
    INFO  [commander] Arming reason 3
    INFO  [commander] Armed by internal command
    INFO  [commander] Armed state changed. Was 0, now 1
    INFO  [muorb] SLPI: Marking DeviceNode(mavlink_log) as advertised in process_remote_topic
    INFO  [commander] Takeoff detected
    

    This is the gazebo terminal output

    tamas@tamas:~/Develop/PX4-Autopilot$ gazebo Tools/sitl_gazebo/worlds/hitl_iris.world
    Opened serial device /dev/ttyUSB0
    ../src/intel/isl/isl.c:2220: FINISHME: ../src/intel/isl/isl.c:isl_surf_supports_ccs: CCS for 3D textures is disabled, but a workaround is available.
    
    

    It says takeoff detected in the voxl 2 terminal but no response in gazebo simulaor. How to fix this ?



  • Based off the terminal output, looks like you have a good connection between your computer and the voxl2 - Did you ever run the following before running gazebo:

    echo 1 | sudo tee /sys/bus/usb-serial/devices/ttyUSB0/latency_timer



  • @Zachary-Lowell Yes. I run this before running gazebo :

    echo 1 | sudo tee /sys/bus/usb-serial/devices/ttyUSB0/latency_timer
    

    The issue is that although the terminal in voxl 2 is showing takeoff detected there is no chnage in gazebo. How to fix this ?



  • After ruuning all the command like my previous post I opened QGC. It shows flying status but no response in gazebo simulator. I have tried HITL with Jmavsim; here also the simulator not responding. And everytime when I open QGC after running voxl-px4-hitl it some popup comes like like some parameters are missing (SYS_AUTOSTART, SYS_AUTOCONFIG, BAT_V_LOAD_DROP, BAT_SOURCE, SDLOG_MODE). How to get the simulator running ?



  • Those parameters are expected to be missing. Inside the hitl_iris.world file what sdf model are you leveraging? Also I always use PX4 v1.12.3 when running simulation with gazebo and almost never got this issue you are saying above and usually the echo 1 sudo tee line tends to fix that as it relays data as fast as possible. Are you trying to run the voxl2 in VIO or GPS mode for hitl?

    Also is there a specific baudrate max on your FTDI cable?



  • @Zachary-Lowell
    I am using PX4 v1.13.0 because in PX4 v1.12.3 the Tools/setup_gazebo.bash file is missing.
    This is the hitl_iris.world file

    <?xml version="1.0" ?>
    <sdf version="1.5">
      <world name="hitl_iris_world">
        <scene>
          <ambient>0.7 0.7 0.7 1</ambient>
          <background>0.7 0.7 0.7 1</background>
          <shadows>false</shadows>
        </scene>
    
        <gui fullscreen='0'>
          <camera name='user_camera'>
            <pose>-12.0 -3.0 10.0 0 0.5 0.2</pose>
            <view_controller>orbit</view_controller>
            <projection_type>perspective</projection_type>
          </camera>
        </gui>
    
        <include>
          <uri>model://sun</uri>
        </include>
    
        <physics name='default_physics' default='0' type='ode'>
          <gravity>0 0 -9.8066</gravity>
          <ode>
            <solver>
              <type>quick</type>
              <iters>10</iters>
              <sor>1.3</sor>
              <use_dynamic_moi_rescaling>0</use_dynamic_moi_rescaling>
            </solver>
            <constraints>
              <cfm>0</cfm>
              <erp>0.2</erp>
              <contact_max_correcting_vel>100</contact_max_correcting_vel>
              <contact_surface_layer>0.001</contact_surface_layer>
            </constraints>
          </ode>
          <max_step_size>0.004</max_step_size>
          <real_time_factor>1</real_time_factor>
          <real_time_update_rate>250</real_time_update_rate>
          <magnetic_field>6.0e-6 2.3e-5 -4.2e-5</magnetic_field>
        </physics>
        <include>
          <uri>model://ground_plane</uri>
        </include>
        <include>
          <uri>model://asphalt_plane</uri>
        </include>
        <include>
          <uri>model://iris_hitl</uri>
          <pose>1.01 0.98 0.83 0 0 1.14</pose>
        </include>
      </world>
    </sdf>
    

    I have tried to run this with both gps and vio mode, both having similar issues. The ftdi cable I am using is TTL-232R-3V3. is it fine ?



  • The problem is solved. The problem was in FTDI cable. I changed the cable and it worked


Log in to reply