|
1 | 1 | # Kompass Core
|
2 | 2 |
|
| 3 | +[![中文版本][cn-badge]][cn-url] |
| 4 | +[![ドキュメント-日本語][jp-badge]][jp-url] |
3 | 5 | [![PyPI][pypi-badge]][pypi-url]
|
4 | 6 | [![MIT licensed][mit-badge]][mit-url]
|
5 | 7 | [![Python Version][python-badge]][python-url]
|
6 | 8 |
|
| 9 | +[cn-badge]: https://img.shields.io/badge/文档-中文-blue.svg |
| 10 | +[cn-url]: docs/README.zh.md |
| 11 | +[jp-badge]: https://img.shields.io/badge/ドキュメント-日本語-red.svg |
| 12 | +[jp-url]: docs/README.ja.md |
7 | 13 | [pypi-badge]: https://img.shields.io/pypi/v/kompass-core.svg
|
8 | 14 | [pypi-url]: https://pypi.org/project/kompass-core/
|
9 | 15 | [mit-badge]: https://img.shields.io/pypi/l/kompass-core.svg
|
10 | 16 | [mit-url]: https://github.com/automatika-robotics/kompass-core/LICENSE
|
11 | 17 | [python-badge]: https://img.shields.io/pypi/pyversions/kompass-core.svg
|
12 | 18 | [python-url]: https://www.python.org/downloads/
|
13 | 19 |
|
14 |
| -Kompass Core is a fast, GPU powered motion planning and control package for robot navigation. The package contains C++ implementation for core algorithms along with Python wrappers. It also implements third party integrations with [OMPL](https://ompl.kavrakilab.org/) and [FCL](https://github.com/flexible-collision-library/fcl). The Kompass philosophy is to be blazzingly fast and highly reliable, by implementing GPGPU supported parallelized algorithms which are agnostic to underlying hardware. Thus Kompass Core can be run on CPUs, GPUs or FPGAs from a wide variety of vendors, making it easy for robot hardware manufacturers to switch underlying compute architecture. |
| 20 | +Kompass Core is a high-performance, GPU-accelerated library for motion planning, mapping, and control in robot navigation systems. The core algorithms are implemented in C++ with seamless Python bindings. It also implements third party integrations with [OMPL](https://ompl.kavrakilab.org/) and [FCL](https://github.com/flexible-collision-library/fcl). The Kompass philosophy is to be blazzingly fast and highly reliable, by implementing GPGPU supported parallelized algorithms which are agnostic to underlying hardware. Thus Kompass Core can be run on CPUs or GPUs from a wide variety of vendors, making it easy for robot hardware manufacturers to switch underlying compute architecture without overhauling their software stack. |
15 | 21 |
|
16 | 22 | This package is developed to be used with [Kompass](https://github.com/automatika-robotics/kompass) for creating navigation stacks in [ROS2](https://docs.ros.org/en/rolling/index.html). For detailed usage documentation, check Kompass [docs](https://automatika-robotics.github.io/kompass/).
|
17 | 23 |
|
18 |
| -## Installation |
19 | 24 |
|
20 |
| -### Install with GPU Support (Recommended) |
| 25 | +- [**Install**](#installation) Kompass Core 🛠️ |
| 26 | +- Check the [**Package Overview**](#-package-overview) |
| 27 | +- To use Kompass Core on your robot with ROS2, check the [**Kompass**](https://automatika-robotics.github.io/kompass) framework 🚀 |
21 | 28 |
|
22 |
| -To install kompass-core with GPU support, on any Ubuntu 20+ (including Jetpack) based machine, you can simply run the following: |
23 | 29 |
|
24 |
| -- `curl https://raw.githubusercontent.com/automatika-robotics/kompass-core/refs/heads/main/build_dependencies/install_gpu.sh | bash` |
| 30 | +# Installation |
| 31 | + |
| 32 | +## Install with GPU Support (Recommended) |
| 33 | + |
| 34 | +- To install kompass-core with GPU support, on any Ubuntu 20+ (including Jetpack) based machine, you can simply run the following: |
| 35 | + |
| 36 | +```bash |
| 37 | +curl https://raw.githubusercontent.com/automatika-robotics/kompass-core/refs/heads/main/build_dependencies/install_gpu.sh | bash |
| 38 | +``` |
25 | 39 |
|
26 | 40 | This script will install all relevant dependencies, including [AdaptiveCPP](https://github.com/AdaptiveCpp/AdaptiveCpp) and install the latest version of kompass-core from source. It is good practice to read the [script](https://github.com/automatika-robotics/kompass-core/blob/main/build_dependencies/install_gpu.sh) first.
|
27 | 41 |
|
28 |
| -### Installing with pip (CPU only) |
| 42 | +## Installing with pip (CPU only) |
29 | 43 |
|
30 |
| -On Ubuntu versions >= 22.04, install dependencies by running the following: |
| 44 | +- On Ubuntu versions >= 22.04, install dependencies by running the following: |
31 | 45 |
|
32 |
| -- `sudo apt-get install libompl-dev libfcl-dev libpcl-dev` |
| 46 | +```bash |
| 47 | +sudo apt-get install libompl-dev libfcl-dev libpcl-dev |
| 48 | +``` |
33 | 49 |
|
34 |
| -Then install kompass-core as follows: |
| 50 | +- Then install kompass-core as follows: |
35 | 51 |
|
36 |
| -- `pip install kompass-core` |
| 52 | +```bash |
| 53 | +pip install kompass-core |
| 54 | +``` |
37 | 55 |
|
38 | 56 | Wheels are available on Pypi for linux x86_64 and aarch64 architectures. Please note that the version available on Pypi does not support GPU acceleration yet.
|
39 | 57 |
|
40 |
| -### Installation Contents |
| 58 | +## Installation Contents |
41 | 59 |
|
42 | 60 | The following three packages will become available once kompass-core is installed.
|
43 | 61 |
|
44 |
| -- `kompass_core`: The main Python API containing all the wrappers and utilities for motion planning and control for navigation in 2D spaces. |
45 |
| -- `kompass_cpp`: Python bindings for Kompass core C++ library containing the algorithms implementation for path tracking and motion control. |
| 62 | +- `kompass_cpp`: Core C++ library for control, collision checking, and mapping algorithms. |
| 63 | +- `kompass_core`: Python bindings for Kompass core C++ library with front-end classes for configuration and high-level logic. |
46 | 64 | - `omplpy`: Bespoke python bindings for the Open Motion Planning Library (OMPL).
|
47 | 65 |
|
48 |
| -## Testing |
49 | 66 |
|
50 |
| -### Run Planning Test |
| 67 | +# 📦 Package Overview |
51 | 68 |
|
52 |
| -- `cd tests` |
53 |
| -- `python3 test_ompl.py` |
| 69 | +The package includes modules for mapping, control, trajectory planning, and vision-based tracking algorithms, with **GPU acceleration** support and Python bindings via `nanobind`. |
54 | 70 |
|
55 |
| -To test path planning using OMPL bindings a reference planning problem is provided using Turtlebot3 Waffle map and fixed start and end position. The test will simulate the planning problem for all geometric planners for the number of desired repetitions to get average values. |
56 | 71 |
|
57 |
| -### Run Controllers Test |
| 72 | +### Control Module |
| 73 | +- Includes a rich set of optimized C++ control strategies implementations and their python wrappers. |
| 74 | +- Supports **GPU-accelerated** trajectory sampling and cost evaluation with customizable weights for sampling based controllers. |
| 75 | +- Internally implements feature-based bounding box tracking and depth detection for enhanced vision-based tracking control. |
58 | 76 |
|
59 |
| -- `cd tests` |
60 |
| -- `python3 test_controllers.py` |
| 77 | +| Algorithm | Description | |
| 78 | +| ------------------------------------------- | -------------------------------------------------- | |
| 79 | +| **Stanley** | Path tracking with robust convergence | |
| 80 | +| **DWA (Dynamic Window Approach)** | Velocity-space sampling and optimization | |
| 81 | +| **DVZ** | Reactive obstacle avoidance using deformable zones | |
| 82 | +| **VisionRGBFollower** | Follow visual targets using RGB images | |
| 83 | +| **VisionRGBDFollower** | Follow visual targets using RGBD (depth) images | |
61 | 84 |
|
62 |
| -The test will simulate path tracking using a reference global path. The results plot for each available controller will be generated in tests/resources/control |
| 85 | +### Mapping Module |
| 86 | +- Implements efficient local mapping and occupancy grid generation algorithms, with configuration support for various laser models and grid resolution settings. |
| 87 | +- Supports **GPU-accelerated** mapping for real-time performance. |
63 | 88 |
|
64 |
| -## Usage Example |
65 | 89 |
|
66 |
| -```python |
67 |
| -from kompass_core.control import DVZ |
| 90 | +### Utilities Module |
| 91 | +- Provides collision checking utilities and critical zone detection to ensure safe navigation, including both CPU and GPU implementations. |
| 92 | +- Logger utilities for runtime diagnostics. |
| 93 | +- Linear state-space Kalman filter implementation for state estimation (C++). |
| 94 | +- Spline interpolation utilities for path control. |
68 | 95 |
|
69 |
| -from kompass_core.models import ( |
70 |
| - AngularCtrlLimits, |
71 |
| - LinearCtrlLimits, |
72 |
| - Robot, |
73 |
| - RobotCtrlLimits, |
74 |
| - RobotGeometry, |
75 |
| - RobotType, |
76 |
| -) |
| 96 | +### Data Types and Models Modules |
| 97 | +- Rich set of data types to represent paths, trajectories, controls, velocities, bounding boxes and various sensor data. |
| 98 | +- Strongly-typed parameters and configuration classes to enable flexible tuning. |
| 99 | +- Robot models and motion kinematics, supporting differential, omni-directional, and Ackermann robots. Along with geometry definitions, control limits and simulation-ready state representations. |
77 | 100 |
|
78 |
| -# Setup the robot |
79 |
| -my_robot = Robot( |
80 |
| - robot_type=RobotType.ACKERMANN, |
81 |
| - geometry_type=RobotGeometry.Type.CYLINDER, |
82 |
| - geometry_params=np.array([0.1, 0.4]), |
83 |
| - ) |
| 101 | +### Third Party Modules |
| 102 | +Includes wrappers and integrations with external planning and collision libraries: |
84 | 103 |
|
85 |
| -# Set the robot control limits |
86 |
| -robot_ctr_limits = RobotCtrlLimits( |
87 |
| - vx_limits=LinearCtrlLimits(max_vel=1.0, max_acc=5.0, max_decel=10.0), |
88 |
| - omega_limits=AngularCtrlLimits( |
89 |
| - max_vel=2.0, max_acc=3.0, max_decel=3.0, max_steer=np.pi |
90 |
| - ), |
91 |
| -) |
| 104 | +- FCL (Flexible Collision Library) |
92 | 105 |
|
93 |
| -# Set the control time step (s) |
94 |
| -control_time_step = 0.1 # seconds |
| 106 | +- OMPL (Open Motion Planning Library) |
95 | 107 |
|
96 |
| -# Initialize the controller |
97 |
| -dvz = DVZ( |
98 |
| - robot=my_robot, |
99 |
| - ctrl_limits=robot_ctr_limits, |
100 |
| - control_time_step=control_time_step, |
101 |
| - ) |
102 |
| -``` |
103 | 108 |
|
104 | 109 | ## Copyright
|
105 | 110 |
|
|
0 commit comments