Skip to content

docs(lanelet2_utils): add example usage to autoware_lanelet2_utils documentation#720

Merged
sarun-hub merged 19 commits into
autowarefoundation:mainfrom
sarun-hub:docs/lanelet2_utils_example
Dec 1, 2025
Merged

docs(lanelet2_utils): add example usage to autoware_lanelet2_utils documentation#720
sarun-hub merged 19 commits into
autowarefoundation:mainfrom
sarun-hub:docs/lanelet2_utils_example

Conversation

@sarun-hub

@sarun-hub sarun-hub commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

Description

API table in autoware_lanelet2_utils is filled, but the example usages are not yet put in the documentation.
This PR will add example files for putting example usage in documentation.

  • geometry
  • conversion
  • kind
  • hatched_road_markings
  • topology
  • intersection
  • lane_sequence
  • nn_search
  • map_handler
  • route_manager

Related links

Parent Issue:

  • Link

How was this PR tested?

(ADDED by @sasakisasaki ) As this PR provides sample codes to show its usage, I believe once all the required CIs passed, it is sufficient as the tests.

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@sarun-hub sarun-hub added the run:deploy-docs Mark for deploy-docs action generation. (used-by-ci) label Nov 17, 2025
@github-actions

github-actions Bot commented Nov 17, 2025

Copy link
Copy Markdown

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@github-actions

Copy link
Copy Markdown

Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
@sarun-hub sarun-hub force-pushed the docs/lanelet2_utils_example branch from 1a784bf to bb1b9d4 Compare November 17, 2025 07:22
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
@sarun-hub sarun-hub force-pushed the docs/lanelet2_utils_example branch from fc622a7 to 08684e3 Compare November 21, 2025 02:30
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
@sarun-hub sarun-hub added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 25, 2025
Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
@sarun-hub sarun-hub marked this pull request as ready for review November 25, 2025 07:42
@codecov

codecov Bot commented Nov 25, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 362 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.77%. Comparing base (ea9ed86) to head (968054e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...oware_lanelet2_utils/examples/example_geometry.cpp 0.00% 83 Missing ⚠️
..._lanelet2_utils/examples/example_route_manager.cpp 0.00% 55 Missing ⚠️
...are_lanelet2_utils/examples/example_conversion.cpp 0.00% 47 Missing ⚠️
...e_lanelet2_utils/examples/example_intersection.cpp 0.00% 32 Missing ⚠️
...oware_lanelet2_utils/examples/example_topology.cpp 0.00% 32 Missing ⚠️
...re_lanelet2_utils/examples/example_map_handler.cpp 0.00% 31 Missing ⚠️
...ware_lanelet2_utils/examples/example_nn_search.cpp 0.00% 28 Missing ⚠️
..._lanelet2_utils/examples/example_lane_sequence.cpp 0.00% 20 Missing ⚠️
...2_utils/examples/example_hatched_road_markings.cpp 0.00% 19 Missing ⚠️
.../autoware_lanelet2_utils/examples/example_kind.cpp 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #720      +/-   ##
==========================================
+ Coverage   51.02%   51.77%   +0.74%     
==========================================
  Files         335      350      +15     
  Lines       21481    26005    +4524     
  Branches     9776    12639    +2863     
==========================================
+ Hits        10960    13463    +2503     
- Misses       9482    11238    +1756     
- Partials     1039     1304     +265     
Flag Coverage Δ *Carryforward flag
differential 45.88% <0.00%> (?)
total 50.62% <ø> (-0.40%) ⬇️ Carriedforward from fc1b525

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Sarun Mukdapitak <sarun.mukda@gmail.com>
@mitsudome-r mitsudome-r force-pushed the docs/lanelet2_utils_example branch from 7026fc7 to fb1e5c2 Compare November 26, 2025 03:17
Comment thread common/autoware_lanelet2_utils/CMakeLists.txt Outdated

@sasakisasaki sasakisasaki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though these codes are using void function which does not have any input and output, I believe this is right approach as these example toy codes should not be communicating with outside of example context.

I agree with merging this PR.

Comment thread common/autoware_lanelet2_utils/examples/example_conversion.cpp
@sasakisasaki sasakisasaki self-assigned this Nov 26, 2025
@sasakisasaki sasakisasaki enabled auto-merge (squash) November 26, 2025 08:23
@liuXinGangChina liuXinGangChina self-requested a review November 27, 2025 02:06
Comment on lines +73 to +84
find_package(yaml-cpp REQUIRED)
include_directories(${autoware_index_cpp_INCLUDE_DIRS})
foreach(example_file ${example_files})
get_filename_component(example_name ${example_file} NAME_WE)
ament_auto_add_executable(${example_name}
${example_file}
)
target_link_libraries(${example_name}
autoware_lanelet2_utils
${autoware_index_cpp_LIBRARIES}
range-v3::range-v3
Python3::Python

@liuXinGangChina liuXinGangChina Nov 27, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
find_package(yaml-cpp REQUIRED)
include_directories(${autoware_index_cpp_INCLUDE_DIRS})
foreach(example_file ${example_files})
get_filename_component(example_name ${example_file} NAME_WE)
ament_auto_add_executable(${example_name}
${example_file}
)
target_link_libraries(${example_name}
autoware_lanelet2_utils
${autoware_index_cpp_LIBRARIES}
range-v3::range-v3
Python3::Python
find_package(yaml-cpp REQUIRED)
foreach(example_file ${example_files})
get_filename_component(example_name ${example_file} NAME_WE)
ament_auto_add_executable(${example_name}
${example_file}
)
ament_target_dependencies(${example_name} ament_index_cpp)
target_link_libraries(${example_name}
autoware_lanelet2_utils
range-v3::range-v3
Python3::Python

@sarun-hub sarun san
That will add compatibility for jazzy,
please consider this modification since ament_target_dependencies will take care include and lib automatically

@sarun-hub sarun-hub Nov 27, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your suggestion! I modify it to use ament_target_dependencies!

@liuXinGangChina liuXinGangChina force-pushed the docs/lanelet2_utils_example branch from 4fbbabb to b77136a Compare November 27, 2025 02:43
@sarun-hub sarun-hub disabled auto-merge November 27, 2025 06:58
@liuXinGangChina liuXinGangChina force-pushed the docs/lanelet2_utils_example branch from 39e9b3f to 1e970d2 Compare November 28, 2025 01:05
@sarun-hub

Copy link
Copy Markdown
Contributor Author

@liuXinGangChina -san
Thank you very much for your comment and contribution. I appreciate the improvement, but I think the change is outside the scope of this PR, which focuses on documentation updates for the autoware_lanelet2_utils package.

If you'd like to add ROS 2 Jazzy compatibility, could you please open a separate PR for that change?
Thank you again for your contribution!

sarun-hub and others added 2 commits December 1, 2025 14:54
@sarun-hub sarun-hub force-pushed the docs/lanelet2_utils_example branch from 1e970d2 to ab4da2d Compare December 1, 2025 06:01
@sarun-hub sarun-hub enabled auto-merge (squash) December 1, 2025 06:30
@sarun-hub sarun-hub merged commit a66c5c0 into autowarefoundation:main Dec 1, 2025
23 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) run:deploy-docs Mark for deploy-docs action generation. (used-by-ci)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants