Giter Club home page Giter Club logo

qmath's Introduction

QMath

QMath is a matrix library (C++ template classes) for robotic applications. This library is primarily for UNIX systems. Note: I wrote this library in 2006 when working towards a masters degree in Robotics; hence, most of the classes here are quite dated. You will be better served by other open-source libraries today, for instance, Eigen (http://eigen.tuxfamily.org/). This repository is mostly for my own reference.

Introduction

QMath provides a set of C++ template classes for matrices, vectors, homogeneous transformations, numerical filtering, integration and differentiation. It is a real-time capable library with an intuitive programming interface resembling MATLAB. Although it is a completely independant package by itself, it was originally developed as the math library for the Robotic Platform, and significantly simplifies programming for robotic applications. QMath cannot be compared to general purpose scientific computation and numerical libraries such as the GNU Scientific Library and LAPACK, which provide much more extensive functionality. This is a simple, light-weight and extensible library of math functions commonly used in robotics.

The library uses templates of the data type and dimensions (e.g. number of rows and columns in a matrix). The use of templates and inline functions produce highly optimized code that is almost as fast in execution as direct programming. The size of QMath data types used in a program are known at compile time: there is no run time dynamic memory allocation which can risk the loss of deterministic real-time response.

The following classes/data types are provided by the library:

  • MatrixBase: Pure virtual base class for matrices.
  • VectorBase: Pure virtual base class for vectors.
  • Matrix: The class for matrices.
  • RowVector: A class for row vectors (1 x n matrices).
  • ColumnVector: A class for column vectors (n x 1 matrices).
  • Vector: Same as ColumnVector.
  • Transform: Homogeneous transformations.
  • LowpassFilter: 2nd order low pass butterworth filter.
  • HighpassFilter: 2nd order high pass filter.
  • Integrator: Base class for integrators. Provides trapezoidal integration method.
  • Adams3Integrator: Integrator using Adams 3rd order method.
  • ODESolverRK4: Solver for ordinary differential equations using 4th order Runge-Kutta method.
  • Differentiator: Base class for differentiators. Computes derivative using backward difference.
  • Differentiator4O: 4th order differentiator.

Inter-operability with GNU Scientific Library (Added Sept. 2005)

A new header file GSLCompat.hpp has been added to the library. This allows conversion of QMath Matrix and Vector types to GSL types gsl_matrix and gsl_vector, respectively, without any performance penalty (again, no dynamic memory allocations are used). Functions declared in this file can be used to map a QMath type to GSL type object, and subsequently use GSL library functions to perform computations. This is useful, for example, when you want to compute the SVD of a matrix, or solve linear equations. To use this functionality, you must install GSL. (For QNX 6.2.1, here is a version of GSL that I know compiles without problems: gsl-1.8.tar.gz).

Building

The library was developed for UNIX using GCC compiler. However with the script provided in the win directory, the library can be compiled for Windows using Visual C++ version 7.0 and up. Compile will fail for earlier versions of VC++ due to lack of proper support for C++ templates.

Applications

  • Robot kinematics and control.
  • Realtime applications.

References

  • Jack W. Crenshaw, "MATH Toolkit for REAL-TIME Programming," CMP Books, ISBN: 1929629095, 2000.
  • Lonnie C. Ludeman, "Fundamentals of Digital Signal Processing," Harper & Row, ISBN: 0060440937, 1986.

qmath's People

Contributors

cvilas avatar

Watchers

Jason Yao avatar  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.