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 dummy_perception_publisher #9987

Conversation

sasakisasaki
Copy link
Contributor

@sasakisasaki sasakisasaki commented Jan 20, 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/launch 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

Launched Commands

$ colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON --packages-up-to autoware_dummy_perception_publisher autoware_shape_estimation autoware_detected_object_feature_remover
$ source install/setup.bash
$ ros2 launch autoware_dummy_perception_publisher dummy_perception_publisher.launch.xml

Notes for Reviewers

None.

Interface Changes

None.

Effects on System Behavior

All the developers who were using dummy_perception_publisher 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 <junya.sasaki@tier4.jp>
…are`

  * Fixes due to this changes for .hpp/.cpp files will be applied in the next commit

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>
  * To follow the previous commit

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>
…blisher`

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>
@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:simulation Virtual environment setups and simulations. (auto-assigned) labels Jan 20, 2025
Copy link

github-actions bot commented Jan 20, 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 20, 2025
@sasakisasaki sasakisasaki marked this pull request as ready for review January 20, 2025 10:08
Copy link
Contributor

@SakodaShintaro SakodaShintaro left a comment

Choose a reason for hiding this comment

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

+ rosdep install -y --from-paths src --ignore-src --rosdistro humble
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
tier4_simulator_launch: Cannot locate rosdep definition for [dummy_perception_publisher]

Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
@mitsudome-r
Copy link
Member

@SakodaShintaro I have fixed the error with the launch files

@github-actions github-actions bot added the component:launch Launch files, scripts and initialization tools. (auto-assigned) label Jan 22, 2025
Signed-off-by: Ryohsuke Mitsudome <ryohsuke.mitsudome@tier4.jp>
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

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

Project coverage is 29.43%. Comparing base (9c39d3f) to head (9ab4e68).
Report is 14 commits behind head on main.

Files with missing lines Patch % Lines
...r/autoware_dummy_perception_publisher/src/main.cpp 0.00% 2 Missing ⚠️
...rception_publisher/src/empty_objects_publisher.cpp 0.00% 1 Missing ⚠️
...my_perception_publisher/src/pointcloud_creator.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9987      +/-   ##
==========================================
- Coverage   29.79%   29.43%   -0.36%     
==========================================
  Files        1434     1431       -3     
  Lines      108244   108139     -105     
  Branches    42930    42848      -82     
==========================================
- Hits        32247    31829     -418     
- Misses      72868    73238     +370     
+ Partials     3129     3072      -57     
Flag Coverage Δ *Carryforward flag
differential 1.68% <0.00%> (?)
total 29.51% <ø> (-0.28%) ⬇️ Carriedforward from deea2de

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

Copy link
Contributor

@SakodaShintaro SakodaShintaro left a comment

Choose a reason for hiding this comment

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

[ERROR] [launch]: Caught exception in launch (see debug for traceback): "package 'autowaredummy_perception_publisher' not found,

launch/tier4_simulator_launch/launch/simulator.launch.xml Outdated Show resolved Hide resolved
sasakisasaki and others added 2 commits January 23, 2025 13:46
Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>

Co-authored-by: SakodaShintaro <rgbygscrsedppbwg@gmail.com>
…-for-simulator-dummy-perception-publisher

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
…-for-simulator-dummy-perception-publisher

Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
Copy link
Contributor

@SakodaShintaro SakodaShintaro left a comment

Choose a reason for hiding this comment

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

The cause is unknown, but the following error occurred when running planning_simulator.

1737621638.1476393 [ERROR] [autoware_dummy_perception_publisher_node-48]: process has died [pid 1898099, exit code 127, cmd '/home/shintarosakoda/autoware/install/autoware_dummy_perception_publisher/lib/autoware_dummy_perception_publisher/autoware_dummy_perception_publisher_node --ros-args -r __node:=autoware_dummy_perception_publisher -r __ns:=/simulation -p use_sim_time:=False -p wheel_radius:=0.383 -p wheel_width:=0.235 -p wheel_base:=2.79 -p wheel_tread:=1.64 -p front_overhang:=1.0 -p rear_overhang:=1.1 -p left_overhang:=0.128 -p right_overhang:=0.128 -p vehicle_height:=2.5 -p max_steer_angle:=0.7 --params-file /tmp/launch_params_v2k5w2vv --params-file /tmp/launch_params_d62dolct --params-file /tmp/launch_params_q6r_drmg --params-file /tmp/launch_params_eorxccef --params-file /tmp/launch_params_jq3q2sfe --params-file /tmp/launch_params_ufo07lgu --params-file /tmp/launch_params_b6k9morh -r output/dynamic_object:=/perception/object_recognition/detection/labeled_clusters -r output/objects_pose:=debug/object_pose -r output/points_raw:=/perception/obstacle_segmentation/pointcloud -r input/object:=dummy_perception_publisher/object_info -r input/reset:=input/reset -r output/debug/ground_truth_objects:=debug/ground_truth_objects'].

In addition, there may be other code that needs to be fixed, even though it may not be related to the bug.

https://github.com/autowarefoundation/autoware_tools/blob/9c0fcc1cd9f828021556c46808d42ed2e0ebf1ec/planning/planning_debug_tools/scripts/perception_replayer/perception_replayer_common.py#L180

…my-perception-publisher

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>
…on-publisher' of github.com:sasakisasaki/autoware.universe into feat-apply-autoware-prefix-for-simulator-dummy-perception-publisher

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>
@sasakisasaki
Copy link
Contributor Author

Thank you for your report, now I'm investigating.

sasakisasaki and others added 3 commits January 23, 2025 18:24
  * The node name does not need `autoware_` prefix

Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>
Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>
@mitsudome-r
Copy link
Member

@SakodaShintaro

The cause is unknown, but the following error occurred when running planning_simulator.

Did you try building with the clean environment?
I had the same issue, but it went away after clean build.

If you don't want to rebuild the full stack, it might just work if you delete both dummy_perception_publisher and autoware_dummy_perception_publisher packages:
rm -r build/dummy_perception_publisher build/autoware_dummy_perception_publisher install/dummy_perception_publisher install/autoware_dummy_perception_publisher

Copy link
Contributor

@SakodaShintaro SakodaShintaro left a comment

Choose a reason for hiding this comment

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

A clean build solved the problem

@mitsudome-r mitsudome-r merged commit a838e06 into autowarefoundation:main Jan 24, 2025
33 of 34 checks passed
@mitsudome-r
Copy link
Member

I forgot to attach the evaluator result (TIER IV Internal link):
https://evaluation.ci.tier4.jp/evaluation/reports/53e058e2-47af-559a-974f-6c3520d709b5?project_id=prd_jt

@xmfcx
Copy link
Contributor

xmfcx commented Jan 27, 2025

Were you guys able to run planning simulator demo after these changes? For me this node fails at start.

I've tried removing this package from the build/install folders and rebuilding but it persisted. Now I'm doing a complete recompilation of entire autoware folder to make sure, will report the test results tomorrow.

@SakodaShintaro
Copy link
Contributor

I just did a full clean build and was able to run planning_simulator successfully.

@xmfcx
Copy link
Contributor

xmfcx commented Jan 27, 2025

@SakodaShintaro thanks, complete rebuild solved it for me as well ✅

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:simulation Virtual environment setups and simulations. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants