Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: apply autoware_ prefix for default_ad_api_helpers #9965

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

sasakisasaki
Copy link
Contributor

@sasakisasaki sasakisasaki commented Jan 19, 2025

Description

This pull request addresses the issue of inconsistent naming by adding the autoware_ prefix to relevant components. This change ensures uniformity across the codebase and aligns with the project's naming conventions.

Related Links

How was this PR tested?

Currently, we only verified that the build succeeds. Further checks will be performed by using the updated module. This PR will be ready for review after finishing all the necessary checks/tests.

  • Directory Name

    • Add autoware_ as a prefix to the directory name.
  • packages.xml

    • Add autoware_ to the name element.
  • CMakeLists.txt

    • Change the project name to autoware_***.
    • Add autoware:: to PLUGIN.
  • Header Files (.hpp)

    • Start #ifndef guards with AUTOWARE__.
    • Add autoware:: to namespace.
  • Source Files (.cpp)

    • Add autoware:: inside RCLCPP_COMPONENTS_REGISTER_NODE.
  • Launch Files

    • Add autoware_ before find-pkg-share.
    • Change node pkg="<pkgname>" to autoware_<pkgname>.
  • Include

    • Add autoware folder as necessary and update include statements accordingly.
    • Check for impacts on other packages.
  • Verification Points

    • Search find-pkg-share in autoware
    • Check README file (especially json schema)
    • Pay attention to complex cases like sensor_launch as seen in gnss_poser

Notes for Reviewers

None.

Interface Changes

None.

Effects on System Behavior

All the developers who were using default_ad_api_helpers needs to modify their code. This is maybe kind of non quick-win task.

  Note:
    * In this commit, I did not organize a folder structure.
      The folder structure will be organized in the next some commits.
    * The changes will follow the Autoware's guideline as below:
        - https://autowarefoundation.github.io/autoware-documentation/main/contributing/coding-guidelines/ros-nodes/directory-structure/#package-folder

Signed-off-by: Junya Sasaki <[email protected]>
@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:system System design and integration. (auto-assigned) labels Jan 19, 2025
Copy link

github-actions bot commented Jan 19, 2025

Thank you for contributing to the Autoware project!

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

Please ensure:

@sasakisasaki sasakisasaki added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jan 19, 2025
@sasakisasaki sasakisasaki marked this pull request as ready for review January 20, 2025 02:31
@mitsudome-r
Copy link
Member

You have added autoware_ prefix to default_ad_api_helpers folder, but you haven't renamed the packages folders for actual ROS packages that is placed under this folder:

  • ad_api_adaptors
  • ad_api_visualizers
  • automatic_pose_initializer

Let's rename them as well since those are the ROS packages. The final structure should look like the following:

  • system
    • autoware_default_ad_api_helpers
      • autoware_ad_api_adaptors
      • autoware_ad_api_visualizers
      • autoware_automatic_pose_initializer

Copy link
Contributor

@isamu-takagi isamu-takagi left a comment

Choose a reason for hiding this comment

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

  • Do not change the copyright publication year.
  • Executable and node name do not need "autoware" prefix.

@isamu-takagi
Copy link
Contributor

Also, can you please replace "ad_api" with "adapi"?

  * `ad_api_adaptors` => `autoware_ad_api_adaptors`
  * `ad_api_visualizers` => `autoware_ad_api_visualizers`
  * `automatic_pose_initializer` => `autoware_automatic_pose_initializer`

Signed-off-by: Junya Sasaki <[email protected]>
@sasakisasaki
Copy link
Contributor Author

@isamu-takagi Thank you for your comment. I'm now replacing the ad_api into adapi. But I found following files have the pattern ad_api with grep command. Should I fix for such the files too? Any guidance is highly appreciated: such as "the fix is applied only for .cpp/.hpp, packages.xml, launch files, ... etc".

./autoware_ad_api_adaptors/launch/rviz_adaptors.launch.xml:    <push-ros-namespace namespace="default_ad_api/helpers"/>
./autoware_ad_api_adaptors/launch/rviz_adaptors.launch.xml:    <node pkg="autoware_ad_api_adaptors" exec="autoware_initial_pose_adaptor_node">
./autoware_ad_api_adaptors/launch/rviz_adaptors.launch.xml:      <param from="$(find-pkg-share autoware_ad_api_adaptors)/config/initial_pose.param.yaml"/>
./autoware_ad_api_adaptors/launch/rviz_adaptors.launch.xml:    <node pkg="autoware_ad_api_adaptors" exec="autoware_routing_adaptor_node">
./autoware_ad_api_adaptors/schema/ad_api_adaptors.schema.json:  "title": "ad_api_adaptors parameter",
./autoware_ad_api_adaptors/schema/ad_api_adaptors.schema.json:    "ad_api_adaptors": {

…lpers' of github.com:sasakisasaki/autoware.universe into feat-apply-autoware-prefix-for-system-default-ad-api-helpers

Signed-off-by: Junya Sasaki <[email protected]>
@github-actions github-actions bot added the component:launch Launch files, scripts and initialization tools. (auto-assigned) label Jan 22, 2025
Comment on lines 14 to 20
EXECUTABLE autoware_initial_pose_adaptor_node
EXECUTOR MultiThreadedExecutor
)

rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "ad_api_adaptors::RoutingAdaptor"
EXECUTABLE routing_adaptor_node
PLUGIN "autoware::ad_api_adaptors::RoutingAdaptor"
EXECUTABLE autoware_routing_adaptor_node
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed in the internal slack, please do not change the names of the executables.

@isamu-takagi
Copy link
Contributor

I'm now replacing the ad_api into adapi.

@sasakisasaki Thank you. Can you replace all parts such as directory names, file names, package names, etc.?

sasakisasaki and others added 5 commits January 22, 2025 19:02
…lpers' of github.com:sasakisasaki/autoware.universe into feat-apply-autoware-prefix-for-system-default-ad-api-helpers

Signed-off-by: Junya Sasaki <[email protected]>
Signed-off-by: Takagi, Isamu <[email protected]>
Signed-off-by: Takagi, Isamu <[email protected]>
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 29.65%. Comparing base (8ee41be) to head (d958e90).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...toware_adapi_adaptors/src/initial_pose_adaptor.cpp 0.00% 2 Missing ⚠️
...rs/autoware_adapi_adaptors/src/routing_adaptor.cpp 0.00% 2 Missing ⚠️
...ose_initializer/src/automatic_pose_initializer.cpp 0.00% 2 Missing ⚠️
...ers/autoware_adapi_visualizers/planning_factors.py 0.00% 1 Missing ⚠️
..._adapi_helpers/autoware_adapi_visualizers/setup.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9965      +/-   ##
==========================================
- Coverage   29.67%   29.65%   -0.02%     
==========================================
  Files        1433     1439       +6     
  Lines      108152   108391     +239     
  Branches    42895    42907      +12     
==========================================
+ Hits        32090    32147      +57     
- Misses      72953    73127     +174     
- Partials     3109     3117       +8     
Flag Coverage Δ *Carryforward flag
differential 6.64% <0.00%> (?)
total 29.67% <ø> (ø) Carriedforward from 09996e3

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

Signed-off-by: Takagi, Isamu <[email protected]>
@github-actions github-actions bot added component:localization Vehicle's position determination in its environment. (auto-assigned) type:ci Continuous Integration (CI) processes and testing. (auto-assigned) labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:launch Launch files, scripts and initialization tools. (auto-assigned) component:localization Vehicle's position determination in its environment. (auto-assigned) component:system System design and integration. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:ci Continuous Integration (CI) processes and testing. (auto-assigned) type:documentation Creating or refining documentation. (auto-assigned)
Projects
Status: To Triage
Development

Successfully merging this pull request may close these issues.

4 participants