Giter VIP home page Giter VIP logo

matlab_px4_msf's Introduction

MATLAB Derivations

matlab_px4_msf begin

This folder contains the derivations and test suites in Matlab for ECL components with MSF.

Instructions for running the EKF replay

  1. Ensure the ‘EKF_replay’ directory is in a location you have full read and write access
  2. Create a ‘TestData’ sub-directory under the ‘EKF_replay’ directory

A sample dataset can be downloaded here: https://drive.google.com/file/d/0By4v2BuLAaCfSW9fWl9aSWNGbGs/view?usp=sharing

3a) If replaying APM data:

Collect data with LOG_REPLAY = 1 and LOG_DISARMED = 1. Convert data to a .mat file using the MissionPlanner ‘Create Matlab File’ option under the DataFlash Logs tab. Convert .mat file to the required data format using the convert_apm_data.m script file. This will generate the following data files:

imu_data.mat baro_data.mat gps_data.mat mag_data.mat

and optionally

rng_data.mat flow_data.mat viso_data.mat

Note: If the rangefinder, optical flow or ZED camera odometer data are not present in the log, then the corresponding sections in the convert_apm_data.m script file will need to be commented out.

Copy the generated .mat files into the /EKF_replay/TestData/APM directory.

3b) If replaying PX4 data:

Use the following data files:

baro_data.mat gps_data.mat vicon_imu_data.mat vicon_pose_data.mat mag_data.mat

Import the .csv file containing the vehicle_gps_position_0 data into the matlab workspace and process it using …/EKF_replay/Common/convert_px4_vehicle_gps_position_csv. This will generate the gps_data.mat file.

If you have an optical flow and range finder sensor fitted:

Import the .csv file containing the optical_flow_0 data into the matlab workspace and process it using …/EKF_replay/Common/convert_px4_optical_flow_csv_data.m. Import the .csv file containing the distance_sensor_0 data into the matlab workspace and process it using …/EKF_replay/Common/convert_px4_distance_sensor_csv_data.m. This will generate the following data files:

flow_data.mat rng_data.mat

Copy the generated .mat files into the /EKF_replay/TestData/PX4 directory.

  1. Make ‘…/EKF_replay/Filter’ the working directory.

  2. Execute ‘SetParameterDefaults’ at the command prompt to load the default filter tuning parameter struct ‘param’ into the workspace. The defaults have been set to provide robust estimation across the entire data set, not optimised for accuracy.

  3. Replay the data by running either the replay_apm_data.m, replay_px4_data.m or if you have px4 optical flow data, the replay_px4_optflow_data.m script file.

Output plots are saved as .png files in the ‘…/EKF_replay/OutputPlots/‘ directory.

Output data is written to the Matlab workspace in the ‘output’ struct.

matlab_px4_msf end

matlab_px4_msf's People

Contributors

ericzzj1989 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.