Package Summary

Tags No category tags.
Version 1.3.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/autowarefoundation/autoware_utils.git
VCS Type git
VCS Version main
Last Updated 2025-03-21
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

The autoware_utils_geometry package

Additional Links

No additional links.

Maintainers

  • Jian Kang
  • Ryohsuke Mitsudome
  • Esteve Fernandez
  • Yutaka Kondo
  • Takagi, Isamu

Authors

No additional authors.

autoware_utils_geometry

Overview

The autoware_utils library is a comprehensive toolkit designed to facilitate the development of autonomous driving applications. This package provides essential utilities for geometry. It is extensively used in the Autoware project to handle common tasks such as geometric calculations and message conversions.

Design

The message modules.

  • covariance.hpp: Indices for accessing covariance matrices in ROS messages.
  • operation.hpp: Overloaded operators for quaternion messages.

The geometry module provides classes and functions for handling 2D and 3D points, vectors, polygons, and performing geometric operations:

  • boost_geometry.hpp: Integrates Boost.Geometry for advanced geometric computations, defining point, segment, box, linestring, ring, and polygon types.
  • alt_geometry.hpp: Implements alternative geometric types and operations for 2D vectors and polygons, including vector arithmetic, polygon creation, and various geometric predicates.
  • ear_clipping.hpp: Provides algorithms for triangulating polygons using the ear clipping method.
  • gjk_2d.hpp: Implements the GJK algorithm for fast intersection detection between convex polygons.
  • sat_2d.hpp: Implements the SAT (Separating Axis Theorem) algorithm for detecting intersections between convex polygons.
  • random_concave_polygon.hpp and random_convex_polygon.hpp: Generate random concave and convex polygons for testing purposes.
  • pose_deviation.hpp: Calculates deviations between poses in terms of lateral, longitudinal, and yaw angles.
  • boost_polygon_utils.hpp: Utility functions for manipulating polygons, including:
  • Checking if a polygon is clockwise.
  • Rotating polygons around the origin.
  • Converting poses and shapes to polygons.
  • Expanding polygons by an offset.
  • geometry.hpp: Comprehensive geometric operations, including:
  • Distance calculations between points and segments.
  • Curvature computation.
  • Pose transformations and interpolations.
  • Intersection checks for convex polygons using GJK.
  • Conversion between different coordinate systems.

Example Code Snippets

Using Vector2d from alt_geometry.hpp

#include "autoware_utils/geometry/alt_geometry.hpp"

using namespace autoware_utils_geometry::alt;

int main() {
  Vector2d vec1(3.0, 4.0);
  Vector2d vec2(1.0, 2.0);

  // Compute the dot product
  double dot_product = vec1.dot(vec2);

  // Compute the norm
  double norm = vec1.norm();

  return 0;
}

Manipulating Polygons with boost_polygon_utils.hpp

#include "autoware_utils/geometry/boost_polygon_utils.hpp"
#include "autoware_utils/geometry/boost_geometry.hpp"
#include <rclcpp/rclcpp.hpp>

int main(int argc, char * argv[]) {
  rclcpp::init(argc, argv);
  auto node = rclcpp::Node::make_shared("polygon_node");

  // Create a polygon
  autoware_utils_geometry::Polygon2d polygon;
  // Assume polygon is populated with points

  // Rotate the polygon by 90 degrees
  autoware_utils_geometry::Polygon2d rotated_polygon = autoware_utils_geometry::rotate_polygon(polygon, M_PI / 2);

  // Expand the polygon by an offset
  autoware_utils_geometry::Polygon2d expanded_polygon = autoware_utils_geometry::expand_polygon(polygon, 1.0);

  // Check if the polygon is clockwise
  bool is_clockwise = autoware_utils_geometry::is_clockwise(polygon);

  rclcpp::shutdown();
  return 0;
}

CHANGELOG

Changelog for package autoware_utils_geometry

1.3.0 (2025-03-21)

  • unify version
  • update changelog
  • feat(autoware_utils_geometry): split package (#48)
    • feat(autoware_utils_geometry): split package
    • compatibility header
    • rename namespace
    • fix namespace
    • fix path

    * fix include path ---------

  • feat(autoware_utils_pcl): split package (#29)
    • feat(autoware_utils_pcl): split package
    • add maintainer
    • fix build error
    • add compatibility
    • rename package

    * update readme ---------

  • Contributors: Takagi, Isamu, Yutaka Kondo
  • feat(autoware_utils_geometry): split package (#48)
    • feat(autoware_utils_geometry): split package
    • compatibility header
    • rename namespace
    • fix namespace
    • fix path

    * fix include path ---------

  • feat(autoware_utils_pcl): split package (#29)
    • feat(autoware_utils_pcl): split package
    • add maintainer
    • fix build error
    • add compatibility
    • rename package

    * update readme ---------

  • Contributors: Takagi, Isamu

1.2.0 (2025-02-26)

1.1.0 (2025-01-27)

1.0.0 (2024-05-02)

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged autoware_utils_geometry at Robotics Stack Exchange

No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.