• This repository has been archived on 01/May/2024
  • Stars
    star
    473
  • Rank 92,832 (Top 2 %)
  • Language
    C++
  • License
    BSD 3-Clause "New...
  • Created about 9 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Estimation & Control Library for Guidance, Navigation and Control Applications

ECL

Very lightweight Estimation & Control Library.

DOI

This library solves the estimation & control problems of a number of robots and drones. It accepts GPS, vision and inertial sensor inputs. It is extremely lightweight and efficient and yet has the rugged field-proven performance.

The library is BSD 3-clause licensed.

EKF Documentation

Building EKF

Prerequisites:

By following the steps mentioned below you can create a static library which can be included in projects:

make
// OR
mkdir build/
cd build/
cmake ..
make

Testing ECL

By following the steps you can run the unit tests

make test

Change Indicator / Unit Tests

Change indication is the concept of running the EKF on different data-sets and compare the state of the EKF to a previous version. If a contributor makes a functional change that is run during the change_indication tests, this will produce a different output of the EKF's state. As the tests are run in CI, this checks if a contributor forgot to run the checks themselves and add the new EKF's state outputs to the pull request.

The unit tests include a check to see if the pull request results in a difference to the output data csv file when replaying the sensor data csv file. If a pull request results in an expected difference, then it is important that the output reference file be re-generated and included as part of the pull request. A non-functional pull request should not result in changes to this file, however the default test case does not exercise all sensor types so this test passing is a necessary, but not sufficient requirement for a non-functional pull request.

The functionality that supports this test consists of:

  • Python scripts that extract sensor data from ulog files and writes them to a sensor data csv file. The default sensor data csv file used by the unit test was generated from a ulog created from an iris SITL flight.
  • A script file using functionality provided by the sensor simulator, that loads sensor data from the sensor data csv file , replays the EKF with it and logs the EKF's state and covariance data to the output data csv file.
  • CI action that checks if the logs of the test running with replay data is changing. This helps to see if there are functional changes.

How to run the Change Indicator test during development on your own logs:

  • create sensor_data.csv file from ulog file 'cd test/sensor_simulator/ python3 createSensorDataFile.py <path/to/ulog> ../replay_data/<descriptive_name>.csv'
  • Setup the test file to use the EKF with the created sensor data by copy&paste an existing test case in test/test_EKF_withReplayData.cpp and adapt the paths to load the right sensor data and write it to the right place, eg _sensor_simulator.loadSensorDataFromFile("../../../test/replay_data/<descriptive_name>.csv"); _ekf_logger.setFilePath("../../../test/change_indication/<descriptive_name>.csv");
  • You can feed the EKF with the data in the csv file, by running '_sensor_simulator.runReplaySeconds(duration_in_seconds)'. Be aware that replay sensor data will only be available when the corresponding sensor simulation are running. By default only imu, baro and mag sensor simulators are running. You can start a sensor simulation by calling sensor_simulator..start(). Be also aware that you still have to setup the EKF yourself. This includes setting the bit mask (fusion_mode in common.h) according to what you intend to fuse.
  • In between _sensor_simulator.runReplaySeconds(duration_in_seconds) calls, write the state and covariances to the change_indication file by including a _ekf_logger.writeStateToFile(); line.
  • Run the EKF with your data and all the other tests by running 'make test' from the ecl directory. The default output data csv file changes can then be included in the PR if differences are causing the CI test to fail.

Known Issues

If compiler versions other than GCC 7.5 are used to generate the output data file, then is is possible that the file will cause CI failures due to small numerical differences to file generated by the CI test.

More Repositories

1

PX4-Autopilot

PX4 Autopilot Software
C++
7,009
star
2

PX4-Avoidance

PX4 avoidance ROS node for obstacle detection and avoidance.
C++
618
star
3

eigen

Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
C++
418
star
4

PX4-SITL_gazebo-classic

Set of plugins, models and worlds to use with OSRF Gazebo Simulator in SITL and HITL.
C++
368
star
5

PX4-user_guide

PX4 User Guide
Jupyter Notebook
257
star
6

PX4-Bootloader

PX4 Bootloader for PX4FMU, PX4IO and PX4FLOW
C
236
star
7

PX4-Flow

Firmware for PX4FLOW board
C
232
star
8

sapog

Sapog - advanced multiplatform ESC firmware
C
203
star
9

PX4-Devguide

PX4 Devguide GitBook
TeX
193
star
10

flight_review

web application for flight log analysis & review
Python
191
star
11

PX4-Matrix

Lightweight, dependency free Matrix library (BSD)
C++
176
star
12

PX4-OpticalFlow

This repository contains different algorithms to calculate the optical flow. It can be used as input for a position estimator
C++
156
star
13

NuttX

Standard NuttX with current PX4 patches
C
138
star
14

pyulog

Python module & scripts for ULog files
Python
124
star
15

px4_ros_com

ROS2/ROS interface with PX4 through a Fast-RTPS bridge
C++
120
star
16

PX4-GPSDrivers

Platform independent GPS drivers
C++
84
star
17

DriverFramework

Operating system and flight stack agnostic driver framework for POSIX (Linux, NuttX, Mac OS, QNX, VxWorks).
C++
77
star
18

px4_msgs

ROS/ROS2 messages that match the uORB messages counterparts on the PX4 Firmware
CMake
69
star
19

homebrew-px4

PX4-related Homebrew formula for developers using OS X
Ruby
68
star
20

PX4-containers

Build scripts for containers running various PX4 setups, like SITL with ROS.
Makefile
64
star
21

HIL

Hardware in the loop tools for PX4 Firmware
Python
38
star
22

PX4NuttX

For Migration to new NuttX Repository layout
36
star
23

PX4-windows-toolchain

Repo containing all scripts to install and use the PX4 Toolchain for Windows.
Batchfile
31
star
24

snap_cam

This package provides tools to work with the Snapdragon Flight cameras as well as perform optical flow for use with the PX4 flight stack.
C++
27
star
25

NuttX-apps

Standard NuttX apps with current PX4 patches
C
26
star
26

PX4-gazebo-models

Model repo in app.gazebosim.org
Python
18
star
27

uvc_ros_driver

A ros node to stream images from a multi-camera UVC device
C++
18
star
28

px4ros

contains submodules for ROS SITL, used to define relations between projects/versions
17
star
29

Lepton

FLIR Lepton ROS node
C++
14
star
30

docs.px4.io

PX4 User Guide Content: See https://github.com/PX4/px4_user_guide
HTML
11
star
31

micrortps_agent

microRTPS agent side of the microRTPS bridge. Used to interface PX4 with the DDS world through FastRTPS/FastDDS.
C++
10
star
32

UAVCAN_Bootloaders

C
8
star
33

disparity_to_point_cloud

ROS Node which converts a disparity map in a point cloud
C++
8
star
34

electronWebGCS

JavaScript
7
star
35

ulog_cpp

C++ library for reading and writing ULog files
C++
7
star
36

dev.px4.io

PX4 Developer Guide Content: See https://github.com/PX4/Devguide
HTML
7
star
37

rpi_toolchain

Files for building PX4 POSIX on Raspberry Pi
Shell
5
star
38

mav_comm

This repository contains message and service definitions used for mavs. All future message definitions go in here, existing ones in other stacks should be moved here where possible.
C++
4
star
39

px4_sdk

Library to control PX4 from a companion computer using ROS 2
C++
4
star
40

PX4-Metadata-Translations

Translated metadata for https://github.com/PX4/PX4-Autopilot
Python
3
star
41

Board_ID

3
star
42

uavcan_board_ident

CMake
2
star
43

PX4-graphics

Downloadable media assets and branding guideline
2
star
44

Toolchains

PX4 build system toolchains
Shell
2
star
45

Firmware-Doxygen

PX4 Firmware Doxygen documentation
HTML
2
star
46

rddrone_uavcan

2
star
47

companion

Companion computer bringup and maintenance scripts
Shell
1
star
48

px4_msgs-release

Release repository of px4_msgs for ROS (1) distros
1
star
49

px4_msgs2-release

Release repository of px4_msgs for ROS 2 distros
1
star
50

NuttX-NxWidgets

C++
1
star
51

rfcs

Requests for Comment for PX4/Firmware
1
star