New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kompass-core

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kompass-core

Navigation Algorithms for Kompass

  • 0.4.2
  • PyPI
  • Socket score

Maintainers
1

Kompass Core

PyPI MIT licensed Python Version

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 and FCL. The Kompass philosophy is to be blazzingly fast and highly reliable, by implementing parallelized algorithms which are agnostic to underlying hardware. Thus Kompass Core can be run on CPUs, GPUs, NPUs or FPGAs from a wide variety of vendors, making it easy for robot manufacturers to switch underlying compute architecture.

This package is developed to be used with Kompass for creating navigation stacks in ROS2. For detailed usage documentation, check Kompass docs.

Installation

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

  • curl https://raw.githubusercontent.com/automatika-robotics/kompass-core/refs/heads/main/build_dependencies/install_gpu.sh | bash

This script will install all relevant dependencies, including AdaptiveCPP and install the latest version of kompass-core from source. It is good practice to read the script first.

Installing with pip

On Ubuntu versions >= 22.04, install dependencies by running the following:

  • sudo apt-get install libompl-dev libfcl-dev libpcl-dev

Then install kompass-core as follows:

  • pip install kompass-core

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.

Installation Contents

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

  • kompass_core: The main Python API containing all the wrappers and utilities for motion planning and control for navigation in 2D spaces.
  • kompass_cpp: Pybind11 python bindings for Kompass core C++ library containing the algorithms implementation for path tracking and motion control.
  • ompl: Bespoke Pybind11 python bindings for the Open Motion Planning Library (OMPL).

Testing

Run Planning Test

  • cd tests
  • python3 test_ompl.py

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.

Run Controllers Test

  • cd tests
  • python3 test_controllers.py

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

Usage Example

from kompass_core.control import DVZ

from kompass_core.models import (
    AngularCtrlLimits,
    LinearCtrlLimits,
    Robot,
    RobotCtrlLimits,
    RobotGeometry,
    RobotType,
)
from nav_msgs.msg import Path

# Setup the robot
my_robot = Robot(
        robot_type=RobotType.ACKERMANN,
        geometry_type=RobotGeometry.Type.CYLINDER,
        geometry_params=np.array([0.1, 0.4]),
    )

# Set the robot control limits
robot_ctr_limits = RobotCtrlLimits(
    vx_limits=LinearCtrlLimits(max_vel=1.0, max_acc=5.0, max_decel=10.0),
    omega_limits=AngularCtrlLimits(
        max_vel=2.0, max_acc=3.0, max_decel=3.0, max_steer=np.pi
    ),
)

# Set the control time step (s)
control_time_step = 0.1     # seconds

# Initialize the controller
dvz = DVZ(
        robot=my_robot,
        ctrl_limits=robot_ctr_limits,
        control_time_step=control_time_step,
    )

# Set the reference path
global_path : Path = Path()

# Set the reference path for the motion control
dvz.set_path(global_path)

# Get the sensor data
laser_scan = LaserScanData()

# At each control step run
dvz.loop_step(current_state=robot.state, laser_scan=laser_scan)

The code in this distribution is Copyright (c) 2024 Automatika Robotics unless explicitly indicated otherwise.

Kompass Core is made available under the MIT license. Details can be found in the LICENSE file.

Contributions

Kompass Core has been developed in collaboration between Automatika Robotics and Inria. Contributions from the community are most welcome.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc