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

C++ code should be in the autoware namespace #4117

Closed
3 tasks done
esteve opened this issue Jan 24, 2024 · 4 comments
Closed
3 tasks done

C++ code should be in the autoware namespace #4117

esteve opened this issue Jan 24, 2024 · 4 comments
Labels
component:system System design and integration. type:guidelines Development, style, or operational guidelines of the project.

Comments

@esteve
Copy link
Contributor

esteve commented Jan 24, 2024

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I've agreed with the maintainers that I can plan this task.

Description

Current C++ code does not follow a unified convention for namespaces. According to the Google C++ Style Guide (which the ROS Style guide is based upon) code must be under a namespace that matches the name of the project https://google.github.io/styleguide/cppguide.html#Namespaces

Purpose

  • Avoid conflicts with other non-Autoware projects
  • Highlight that our packages are part of autoware

Possible approaches

The most straightforward approach is to just add all software to the autoware namespace, however, we might want to also add another subnamespace for the component the code is part of (i.e. perception, localization, etc.)

Definition of done

All the code is under either the autoware namespace or a subnamespace of it

@esteve
Copy link
Contributor Author

esteve commented Feb 2, 2024

@xmfcx
Copy link
Contributor

xmfcx commented Feb 2, 2024

Over 2 options:

  1. autoware::package_name
  2. autoware::component_name::package_name

My vote would be on Option 1.
Reasons:

  • Easier to type and reduced complexity
  • Easier to move package over component folders (if we want to change its component category) (ease of refactoring)
  • Is not necessary to have the additional namespace since we don't expect the packages within the Autoware to clash.

cc. @yukkysaito @mitsudome-r @isamu-takagi @TakaHoribe

@xmfcx xmfcx added component:system System design and integration. type:guidelines Development, style, or operational guidelines of the project. labels Feb 2, 2024
@esteve
Copy link
Contributor Author

esteve commented Feb 2, 2024

@xmfcx I agree, I prefer to keep hierarchies as flat as possible

@esteve
Copy link
Contributor Author

esteve commented Mar 27, 2024

Closing, superseded by #4569

@esteve esteve closed this as completed Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:system System design and integration. type:guidelines Development, style, or operational guidelines of the project.
Projects
None yet
Development

No branches or pull requests

2 participants