Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro jazzy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro kilted showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro rolling showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro ardent showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro bouncy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro crystal showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro eloquent showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro dashing showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro foxy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro iron showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro lunar showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro jade showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro indigo showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro hydro showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro kinetic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

autoware_lanelet2_utils package from autoware_core repo

autoware_adapi_specs autoware_core autoware_component_interface_specs autoware_geography_utils autoware_global_parameter_loader autoware_interpolation autoware_kalman_filter autoware_lanelet2_utils autoware_motion_utils autoware_node autoware_object_recognition_utils autoware_osqp_interface autoware_point_types autoware_qp_interface autoware_signal_processing autoware_trajectory autoware_vehicle_info_utils autoware_core_control autoware_simple_pure_pursuit autoware_core_localization autoware_ekf_localizer autoware_gyro_odometer autoware_localization_util autoware_ndt_scan_matcher autoware_pose_initializer autoware_stop_filter autoware_twist2accel autoware_core_map autoware_lanelet2_map_visualizer autoware_map_height_fitter autoware_map_loader autoware_map_projection_loader autoware_core_perception autoware_euclidean_cluster_object_detector autoware_ground_filter autoware_perception_objects_converter autoware_core_planning autoware_mission_planner autoware_objects_of_interest_marker_interface autoware_path_generator autoware_planning_factor_interface autoware_planning_topic_converter autoware_route_handler autoware_velocity_smoother autoware_behavior_velocity_planner autoware_behavior_velocity_planner_common autoware_behavior_velocity_stop_line_module autoware_motion_velocity_obstacle_stop_module autoware_motion_velocity_planner autoware_motion_velocity_planner_common autoware_core_sensing autoware_crop_box_filter autoware_downsample_filters autoware_gnss_poser autoware_vehicle_velocity_converter autoware_planning_test_manager autoware_pyplot autoware_test_node autoware_test_utils autoware_testing autoware_core_vehicle

ROS Distro
humble

Package Summary

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

Repository Summary

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

Package Description

The autoware_lanelet2_utils package

Additional Links

No additional links.

Maintainers

  • Mamoru Sobue
  • Kosuke Takeuchi

Authors

  • Mamoru Sobue

autoware_lanelet2_utils

Nomenclature

This package aims to strictly define the meaning of several words to clarify the documentation and API’s scope. In the table below, codespace words are given specific meanings when used in the API and API description. italic words are emphasized to indicate that it refers to social common sense which often comes with ambiguity. To help disambiguate the meaning, illustration is provided. “Lanelet” refers to the entity of alanelet::ConstLanelet object in order to distinguish with the word “lane” used in social customs. A and B stands for some Lanelets objects.

Word Meaning Illustration
driving The vehicle position belongs to the designated Lanelet. In each map, green Lanelet are the driving lanes of the vehicle.
driving
Open
boundary,
entry,
exit
The boundary of a Lanelet refers to the left or right Linestring. boundary_entry_exit
Open
adjacent If A is adjacent to B, A and B share a common boundary with same direction either on the left or right side. In each map, orange Lanelet is adjacent to green Lanelet.
adjacent
Open
same_direction Lanelet A and Lanelet B are same_direction if A and B are directly or indirectly adjacent to each other. In each map, orange Lanelets are same_direction as green Lanelet.
same_direction
Open
bundle A bundle refers to a transitive closure set of Lanelets which are same_direction to each other. The enclosed sets of Lanelets are bundles.
bundle
Open
opposite If A is opposite to B, A and B share a common boundary with opposite direction. In the first map, green Lanelet and orange Lanelet are opposite to each other.
In the second map, two red Lanelets are not opposite relation because they do not share a common LineString.
opposite
Open
opposite_direction If A and B are opposite_direction, the bundle of A and B are directly opposite to each other. In the each map, green Lanelet and orange Lanelet are opposite_direction because their bundles(enclosed in dotted line) are opposite relation.
opposite_direction
Open
connected A is connected to(from) B if and only if the exit(entry) of A is identical to the entry(exit) of B. A is connected to B, and B is connected from A.
connected
Open
following The following Lanelets of A is the list of Lanelets to which A is connected. In each map, orange Lanelets are the following of green Lanelet.
following
Open
previous The previous Lanelets of A is the list of Lanelets from which A is connected. In each map, orange Lanelets are the previous of green Lanelet.
previous
Open
conflicting A is conflicting with B if A and B are geometrically intersecting.  
merging A is said to be merging Lanelet of B if and only if A is conflicting with B and both A and B are connected to a common Lanelet. In each map, one of the orange Lanelet is a merging Lanelet of the other orange Lanelet.
merging
Open
sibling The designated Lanelets are referred to as sibling if all of them are connected from a common Lanelet. In each map, orange Lanelets are siblings.
sibling
Open
oncoming TBD TBD
upcoming TBD TBD
sequence sequence is a list of Lanelets whose each element is connected from or adjacent to the previous element. sequence
Open

API description

Header function description average computational complexity illustration
<autoware_lanelet2_utils/kind.hpp> is_road_lane This function returns true if the input Lanelet is road subtype. $O(1)$  
  is_shoulder_lane This function returns true if the input Lanelet is road_shoulder subtype. $O(1)$  
  is_bicycle_lane This function returns true if the input Lanelet is bicycle_lane subtype. $O(1)$  
<autoware_lanelet2_utils/topology.hpp> instantiate_routing_graph This function creates a RoutingGraph object only from “road” lanes, which means “road_shoulder” and “bicycle_lane” Lanelets are inaccessible from left/right adjacency.    
  left_lanelet This function ignores the permission of lane change. Also it ignores shoulder and bicycle Lanelet. $O(1)$ In the first map, the green Lanelet is the left_lanelet of the orange Lanelet.
In the second and third map, the left_lanelet of the orange Lanelet is null.
left_lanelet
Open
  right_lanelet same as above left_lanelet $O(1)$  
  left_opposite_lanelet same as below right_opposite_lanelet $O(1)$
see findUsage for detail
 
  right_opposite_lanelet This functions returns the right opposite Lanelet of the input Lanelet if available, otherwise returns null. $O(1)$
see findUsage for detail
In the first and second map, the green Lanelet is the right_opposite_lanelet of the orange Lanelet.
In the third map, the right_opposite_lanelet of the orange Lanelet is null.
right_opposite_lanelet
Open
  leftmost_lanelet This function returns the Lanelet which is recursively left adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first and second map, the green Lanelet is the leftmost_lanelet of the orange Lanelet.
In the third map, the leftmost_lanelet of the orange Lanelet is null.
leftmost_lanelet
Open
  rightmost_lanelet This function returns the Lanelet which is recursively right adjacent to the input Lanelet. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelet is the rightmost_lanelet of the orange Lanelet.
In the second and third map, the rightmost_lanelet of the orange Lanelet is null.
rightmost_lanelet
Open
  left_lanelets The input Lanelet is not included in the output, and output is ordered from left to right. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the left_lanelets of the orange Lanelet.
In the second and third map, left_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the left opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
left_lanelets
Open
  right_lanelets The input Lanelet is not included in the output, and output is ordered from right to left. $O(W)$ where $W$ is the size of the bundle. In the first map, the green Lanelets are the right_lanelets of the orange Lanelet.
In the second and third map, right_lanelets of the orange Lanelet is empty.
If the flag include_opposite = true, the right opposite Lanelet and all of its same_direction Lanelets area also retrieved as illustrated in the fourth and fifth maps.
right_lanelets
Open
  following_lanelets This function returns the following Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets to which the input is connected to.  
  previous_lanelets This function returns the previous Lanelets of the input Lanelet. The order is not defined. $O(E)$ where $E$ is the number of Lanelets from which the input is connected from.  
  sibling_lanelets This function returns the sibling Lanelets of the input Lanelet excluding itself. The order is not defined. $O(E)$ where $E$ is the number of sibling Lanelets  
  from_ids This function returns Lanelet objects in the same order as the input IDs. $O(n)$  
<autoware_lanelet2_utils/intersection.hpp> is_intersection_lanelet This function returns true if and only if the input Lanelet has turn_direction attribute. $O(1)$  
  is_straight_lanelet,
is_left_lanelet,
is_right_lanelet
This function returns true if and only if the input Lanelet has turn_direction attribute and its value is straight/left/right. $O(1)$  

complexity of findUsage

The readers should be noted that following description is implementation dependent.

Lanelet map primitives(like Lanelet, Area, RegulatoryElement) are stored in several PrimitiveLayer<T> objects according to their types as shown below.

```cpp title=”lanelet2_core/LaneletMap.h#L375-L438” class LaneletMap : public LaneletMapLayers { public: using LaneletMapLayers::LaneletMapLayers; <…> };



```cpp title="lanelet2_core/LaneletMap.h#L313-L359"
class LaneletMapLayers {
  <...>
  LaneletLayer laneletLayer;                      //!< access to the lanelets within this map
  AreaLayer areaLayer;                            //!< access to areas
  RegulatoryElementLayer regulatoryElementLayer;  //!< access to regElems
  PolygonLayer polygonLayer;                      //!< access to the polygons
  LineStringLayer lineStringLayer;                //!< access to the lineStrings
  PointLayer pointLayer;                          //!< access to the points
};

```cpp title=”lanelet2_core/LaneletMap.h#L285-L303” class LaneletLayer : public PrimitiveLayer { public: using PrimitiveLayer::findUsages; LaneletLayer() = default; ~LaneletLayer() = default; LaneletLayer(const LaneletLayer&) = delete; LaneletLayer operator=(LaneletLayer&) = delete; Lanelets findUsages(const RegulatoryElementConstPtr& regElem); ConstLanelets findUsages(const RegulatoryElementConstPtr& regElem) const; <...> };

```

Each PrimitiveLayer owns a field named tree_ that contains a lookup table named usage of type UsageLookup,

```cpp title=”lanelet2_core/LaneletMap.h#L38-L253” template class PrimitiveLayer { public: <...> /**

  • @brief finds usages of an owned type within this layer

File truncated at 100 lines see the full file

CHANGELOG

Changelog for package autoware_lanelet2_utils

1.1.0 (2025-05-01)

  • refactor(autoware_lanelet2_utils)!: move everything to namespace experimental (#372)

  • refactor(autoware_lanelet2_utils): rewrite using modern C++ without API breakage (#347)

    • refactor using modern c++
    • precommit
    • fix
    • fix
    • precommit
    • use std::strcmp
    • precommit

    * Revert "refactor using modern c++" This reverts commit 3f7e4953c08f5237dc3bc75db3d896cc9c0640a3. ---------

  • Contributors: Mamoru Sobue, Yutaka Kondo

1.0.0 (2025-03-31)

0.3.0 (2025-03-21)

  • chore: fix versions in package.xml
  • chore(lanelet2_utils): change header directory structure (#274)
  • feat(lanelet2_utility): add intersection/turn_direction definition (#244)
  • docs(lanelet2_utils): fix invalid drawio link and update image (#251) doc(lanelet2_utils): fix invalid drawio link and update image
  • feat(lanelet2_utils)!: introduce lanelet2_utils by renaming from laneet2_utility (#248)
  • Contributors: Mamoru Sobue, mitsudome-r

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_lanelet2_utils at Robotics Stack Exchange