Skip to content

Math library with common useful functions and classes to work with robotics data using the Eigen library.

License

Notifications You must be signed in to change notification settings

tu-darmstadt-ros-pkg/hector_math

Repository files navigation

workflow workflow

Hector Math

The hector_math ROS package provides a set of implementations for common math-related problems encountered in robotic applications.

The library is written in C++ and currently has python bindings for the coloring module.

Coloring

Hector Math includes some methods for coloring segments or gradients. The colors are picked to maximize contrast and with a focus on accessibility. The coloring header has no project dependencies and can be freely copied and used.

Robot Model

Hector Math includes a set of convenience functions for constructing a robot model, continuously updating its joint positions, and computing the center of mass and estimated footprint of the robot. More details can be found here.

2D Map Operations

Hector Math also includes a set of tools for performing operations on 2D maps.

  • Iterating over all 2D grid indexes inside a given rectangle, circle or polygon
  • Finding minima/maxima on the map

Polygon Iterator

More details can be found here.

Direction Discretization

The package includes direction discretization tools for quickly converting continuous angles into discrete directions.

It also contains methods to bin quaternions into hashes which can be used to discretize quaternions. More details can be found here.

Containers

  • BoundedVector: A vector-like structure but with limited size. For small sizes this structure can be kept on the stack and may have vastly greater performance.
  • QuaternionCache: Uses the included quaternion binning to store orientation-dependent data
  • RingBuffer: A FIFO structure with a limited size (overwriting the oldest elements if the buffer is full)

More details can be found here.

Bounding Boxes

Functions for computing axis-aligned bounding boxes for various shapes. More details can be found here.

Installation

Clone this repo and its dependencies into the src directory of your ROS workspace.

cd <WORKSPACE>/src
git clone https://github.com/tu-darmstadt-ros-pkg/hector_math.git
catkin build

Documentation

You can find the documentation here.

Alternatively, you can follow the steps below to build it yourself.

Dependencies

  • Doxygen
  • Sphinx
  • sphinx_rtd_theme
  • Breathe

Example for Ubuntu Install dependencies

sudo apt install doxygen python3-sphinx python3-breathe python3-sphinx-rtd-theme

Build documentation

cd hector_math/hector_math/docs
make html
sensible-browser _build/html/index.html

License

This package is released under the MIT License. See the LICENSE file for more information.

Contributing

Contributions to hector_math are welcome! If you find a bug or have a suggestion for a new feature, please open an issue or submit a pull request on our GitHub repository.

About

Math library with common useful functions and classes to work with robotics data using the Eigen library.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •