Skip to content

Commit

Permalink
Release: Attitude Estimator v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pallgeuer committed Aug 14, 2014
1 parent 6db31d8 commit 76f7d9b
Show file tree
Hide file tree
Showing 5 changed files with 1,709 additions and 282 deletions.
35 changes: 31 additions & 4 deletions Makefile
Expand Up @@ -10,14 +10,18 @@
# All three building possibilities are demonstrated below (directly include source, build static
# library, build dynamic library).
#
# It is assumed that gtest/gtest.h is on a global include path, and the pthread, gtest and
# gtest_main libraries can be found.
#
# Get started by executing 'make list'.
# Executing 'make' attempts to build all targets.

MAJOR_VERSION = 1
MINOR_VERSION = 0
PATCH_VERSION = 1
MINOR_VERSION = 2
PATCH_VERSION = 0

SRCDIR = src
TESTDIR = test
INCLUDEDIR = src
BUILDDIR = build
LIBDIR = lib
Expand All @@ -27,13 +31,15 @@ DYNDIR = $(BUILDDIR)/for_dyn_lib
ENSURE_DIR = @mkdir -p $(@D)

INCLUDES = -I$(INCLUDEDIR)
LDFLAGS =
LDFLAGS = -lpthread -lgtest -lgtest_main -L../gtest

DLIB_OBJS = $(DYNDIR)/attitude_estimator.o
LIB_OBJS = $(BUILDDIR)/attitude_estimator.o
TEST_OBJS = $(BUILDDIR)/test_attitude_estimator.o
DLIB_BASENAME = $(LIBDIR)/libattitude_estimator.so
SLIB_TARGET = $(LIBDIR)/libattitude_estimator.a
DLIB_TARGET = $(DLIB_BASENAME).$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_VERSION)
TEST_TARGET = $(BINDIR)/test_attitude_estimator

CXX = g++
AR = ar
Expand All @@ -43,7 +49,7 @@ CXXFLAGS = -Wall -g
# Meta rules
#

all: libs
all: libs tests

libs: lib-static lib-dynamic

Expand Down Expand Up @@ -80,11 +86,31 @@ $(DYNDIR)/%.o: $(SRCDIR)/%.cpp
$(ENSURE_DIR)
$(CXX) $(CXXFLAGS) -fPIC -o $@ -c $< $(INCLUDES)

#
# Unit test rules
#

run-tests: tests
@echo "Running $(TEST_TARGET)..."
@./$(TEST_TARGET)

tests: $(TEST_TARGET)

$(TEST_TARGET): $(LIB_OBJS) $(TEST_OBJS)
@echo "Building $(TEST_TARGET)..."
$(ENSURE_DIR)
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)

$(BUILDDIR)/%.o: $(TESTDIR)/%.cpp
$(ENSURE_DIR)
$(CXX) $(CXXFLAGS) -o $@ -c $< $(INCLUDES)

#
# Dependency rules
#

$(BUILDDIR)/attitude_estimator.o: $(INCLUDEDIR)/attitude_estimator.h
$(BUILDDIR)/test_attitude_estimator.o: $(INCLUDEDIR)/attitude_estimator.h
$(DYNDIR)/attitude_estimator.o: $(INCLUDEDIR)/attitude_estimator.h

#
Expand All @@ -95,6 +121,7 @@ clean:
rm -f $(BUILDDIR)/*.o $(DYNDIR)/*.o
rm -f $(SLIB_TARGET)
rm -f $(DLIB_TARGET) $(DLIB_BASENAME).$(MAJOR_VERSION).$(MINOR_VERSION) $(DLIB_BASENAME).$(MAJOR_VERSION) $(DLIB_BASENAME)
rm -f $(TEST_TARGET)
rm -f *~

clean-hard:
Expand Down
13 changes: 7 additions & 6 deletions README.md
@@ -1,14 +1,14 @@
#Attitude Estimator#
**Author:** Philipp Allgeuer

**Version:** 1.0.1
**Version:** 1.2.0

**Date:** 16/05/14
**Date:** 14/08/14

##General Overview##
Attitude Estimator is a generic platform-independent C++ library that implements an IMU sensor fusion algorithm. Up to 3-axis gyroscope, accelerometer and magnetometer data can be processed into a full 3D quaternion orientation estimate, with the use of a nonlinear Passive Complementary Filter. The library is targeted at robotic applications, but is by no means limited to this. Features of the estimator include gyro bias estimation, transient quick learning phases, tuneable estimator parameters, and near-global stability backed by theoretical analysis.
Attitude Estimator is a generic platform-independent C++ library that implements an IMU sensor fusion algorithm. Up to 3-axis gyroscope, accelerometer and magnetometer data can be processed into a full 3D quaternion orientation estimate, with the use of a nonlinear Passive Complementary Filter. The library is targeted at robotic applications, but is by no means limited to this. Features of the estimator include gyro bias estimation, transient quick learning, multiple estimation algorithms, tuneable estimator parameters, and near-global stability backed by theoretical analysis.

Great emphasis has been placed on having a very efficient, yet totally numerically and algorithmically robust implementation of the filter. The code size has also been kept to a minimum, and has been extremely well-commented. The programmatic interface has also been made as easy to use as possible. Please refer to the extensive documentation of the library for more information on its capabilities and usage caveats.
Great emphasis has been placed on having a very efficient, yet totally numerically and algorithmically robust implementation of the filter. The code size has also been kept to a minimum, and has been extremely well-commented. The programmatic interface has also been made as easy as possible. Please refer to the extensive documentation of the library for more information on its capabilities and usage caveats.

Attitude Estimator was developed as part of the [NimbRo-OP](http://www.nimbro.net/OP/) project at the University of Bonn.

Expand All @@ -17,6 +17,7 @@ Attitude Estimator was developed as part of the [NimbRo-OP](http://www.nimbro.ne
- Implements fusion of IMU sensor data (3-axis gyroscope, 3-axis accelerometer, 3-axis magnetometer), forming a reliable 3D attitude (orientation) estimate in the form of a quaternion
- Able to dynamically deal with missing or non-present sensor data, even if there is theoretically no longer enough information to reconstruct a full 3D attitude
- Gyro bias estimation, tuneable algorithm parameters, interface to provide state/system priors if desired
- Multiple fallback estimation algorithms to choose from, including the ZYX yaw method, fused yaw method, and absolute fused yaw method
- Transient quick learning phase for fast initial settling of the attitude estimate
- Guaranteed numerical and algorithmic stability, with much effort having gone into ensuring the complete robustness of the implementation
- Independent code with no external dependencies other than certain maths functions of the C++ Standard Library
Expand All @@ -37,9 +38,9 @@ There are three ways of using the library:

Due to the small and efficient nature of the library, one of the first two options is recommended. Very minimal benefit is expected from building a dynamic library.

Note that as at release `v1.0.1`, the required source files are simply `attitude_estimator.h` and `attitude_estimator.cpp`.
Note that as at release `v1.2.0`, the required (non-test) source files are simply `attitude_estimator.h` and `attitude_estimator.cpp`.

A sample makefile for building the static and dynamic libraries using `gcc` is included in the release. As mentioned in the makefile however, the Attitude Estimator could equivalently be built using any other compiler, such as for example MSVC.
A sample makefile for building the static and dynamic libraries using `gcc` is included in the release. The makefile also demonstrates how the `test_attitude_estimator` unit test can be built. As mentioned in the makefile however, the Attitude Estimator could equivalently be built using any other compiler, such as for example MSVC.

##Dependencies##
The library does not require C++11, and has no external dependencies other than the C++ Standard Library, of which only `cmath` is required. More precisely, the only standard library functions that are required are `abs`, `sqrt`, `asin` and `atan2`.
Expand Down

0 comments on commit 76f7d9b

Please sign in to comment.