Skip to content

Commit 01f238d

Browse files
authored
Merge pull request #29 from automatika-robotics/feature/vision_dwa
2 parents 55a3ec0 + 78c273c commit 01f238d

File tree

97 files changed

+6397
-2135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+6397
-2135
lines changed

.github/workflows/build_and_deploy.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
os-arch:
1818
- { os: ubuntu-latest, arch: x86_64 }
19-
- { os: ubuntu-24.04-arm, arch: aarch64 }
19+
# - { os: ubuntu-24.04-arm, arch: aarch64 }
2020

2121
name: Build wheels on ${{ matrix.os-arch.os }} ${{ matrix.os-arch.arch }}
2222
runs-on: ${{ matrix.os-arch.os }}
@@ -27,6 +27,12 @@ jobs:
2727
- name: Set environment variables
2828
run: echo "CIBW_ARCHS=${{ matrix.os-arch.arch }}" >> $GITHUB_ENV
2929

30+
- name: Install Python development headers
31+
run: |
32+
PYTHON_VERSION=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
33+
sudo apt-get update
34+
sudo apt-get install -y python${PYTHON_VERSION}-dev
35+
3036
- name: Build wheels
3137
uses: pypa/cibuildwheel@v2.21.3
3238

README.md

Lines changed: 60 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,110 @@
11
# Kompass Core
22

3+
[![中文版本][cn-badge]][cn-url]
4+
[![ドキュメント-日本語][jp-badge]][jp-url]
35
[![PyPI][pypi-badge]][pypi-url]
46
[![MIT licensed][mit-badge]][mit-url]
57
[![Python Version][python-badge]][python-url]
68

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
713
[pypi-badge]: https://img.shields.io/pypi/v/kompass-core.svg
814
[pypi-url]: https://pypi.org/project/kompass-core/
915
[mit-badge]: https://img.shields.io/pypi/l/kompass-core.svg
1016
[mit-url]: https://github.com/automatika-robotics/kompass-core/LICENSE
1117
[python-badge]: https://img.shields.io/pypi/pyversions/kompass-core.svg
1218
[python-url]: https://www.python.org/downloads/
1319

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.
1521

1622
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/).
1723

18-
## Installation
1924

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 🚀
2128

22-
To install kompass-core with GPU support, on any Ubuntu 20+ (including Jetpack) based machine, you can simply run the following:
2329

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+
```
2539

2640
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.
2741

28-
### Installing with pip (CPU only)
42+
## Installing with pip (CPU only)
2943

30-
On Ubuntu versions >= 22.04, install dependencies by running the following:
44+
- On Ubuntu versions >= 22.04, install dependencies by running the following:
3145

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+
```
3349

34-
Then install kompass-core as follows:
50+
- Then install kompass-core as follows:
3551

36-
- `pip install kompass-core`
52+
```bash
53+
pip install kompass-core
54+
```
3755

3856
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.
3957

40-
### Installation Contents
58+
## Installation Contents
4159

4260
The following three packages will become available once kompass-core is installed.
4361

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.
4664
- `omplpy`: Bespoke python bindings for the Open Motion Planning Library (OMPL).
4765

48-
## Testing
4966

50-
### Run Planning Test
67+
# 📦 Package Overview
5168

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`.
5470

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.
5671

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.
5876

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 |
6184

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.
6388

64-
## Usage Example
6589

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.
6895

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.
77100

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:
84103

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)
92105

93-
# Set the control time step (s)
94-
control_time_step = 0.1 # seconds
106+
- OMPL (Open Motion Planning Library)
95107

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-
```
103108

104109
## Copyright
105110

build_dependencies/install_gpu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ install_dependencies
162162
# Check for LLVM/Clang versions
163163
if [[ $LLVM_VERSION ]]; then
164164
# Check if given version is within range
165-
if (( LLVM_VERSION < 14 || LLVM_VERSION > 17 )); then
166-
log ERROR "LLVM Versions higher than 17 and lower than 14 are not compatible with kompass-core."
165+
if (( LLVM_VERSION < 15 || LLVM_VERSION > 17 )); then
166+
log ERROR "LLVM Versions higher than 20 and lower than 15 are not compatible with kompass-core."
167167
exit 1
168168
fi
169169
if check_llvm_clang_version $LLVM_VERSION; then

0 commit comments

Comments
 (0)