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.
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.
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.
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
More details can be found here.
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.
- 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.
Functions for computing axis-aligned bounding boxes for various shapes. More details can be found here.
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
You can find the documentation here.
Alternatively, you can follow the steps below to build it yourself.
- Doxygen
- Sphinx
- sphinx_rtd_theme
- Breathe
Example for Ubuntu Install dependencies
sudo apt install doxygen python3-sphinx python3-breathe python3-sphinx-rtd-theme
cd hector_math/hector_math/docs
make html
sensible-browser _build/html/index.html
This package is released under the MIT License. See the LICENSE file for more information.
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.