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

test: add test_points_to_costmap #960

Merged
merged 29 commits into from
Jul 5, 2022

Conversation

storrrrrrrrm
Copy link
Contributor

@storrrrrrrrm storrrrrrrrm commented May 25, 2022

Signed-off-by: suchang chang.su@autocore.ai

Description

add test_points_to_costmap

Related links

Tests performed

image

Notes for reviewers

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

@storrrrrrrrm storrrrrrrrm requested a review from kenji-miyake May 25, 2022 07:54
@kenji-miyake
Copy link
Contributor

Thank you for your PR!
Regarding the title, I think this is not feat but test.

@storrrrrrrrm storrrrrrrrm changed the title feat: add test_points_to_costmap test: add test_points_to_costmap May 25, 2022
Signed-off-by: suchang <chang.su@autocore.ai>
@storrrrrrrrm storrrrrrrrm force-pushed the test_costmap_generator branch from ded5b4d to 2e257aa Compare May 25, 2022 08:04
@storrrrrrrrm
Copy link
Contributor Author

Thank you for your PR! Regarding the title, I think this is not feat but test.

3ks for quick reply. git comments modified.

@storrrrrrrrm
Copy link
Contributor Author

1/2 /home/runner/work/autoware.universe/autoware.universe/planning/costmap_generator/CMakeLists.txt (600.90ms)
2/2 /home/runner/work/autoware.universe/autoware.universe/planning/costmap_generator/test/test_points_to_costmap.cpp (313.14ms)
Warning: Unknown word (mapx)
planning/costmap_generator/test/test_points_to_costmap.cpp:47:7 Unknown word (mapx)
planning/costmap_generator/test/test_points_to_costmap.cpp:51:17 Unknown word (mapy)
Warning: Unknown word (mapy)
Files checked: 2, Issues found: 2 in 1 files.
Error: 2 spelling issues found in 1 of the 2 files checked.

ci process shows comments in code has unknown words

// gridy
// | mapx-------
// | |
// | |
// | |
// | mapy
// |__________________gridx

i do not think this should be modified...

@kenji-miyake
Copy link
Contributor

kenji-miyake commented May 25, 2022

ci process shows comments in code has unknown words

Since spell-check-differential is an optional check, you can ignore it for now.

Please refer to the documentation about CI checks.
https://autowarefoundation.github.io/autoware-documentation/main/contributing/pull-request-guidelines/#spell-check-differential

suchang added 2 commits May 25, 2022 18:25
Signed-off-by: suchang <chang.su@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
@kenji-miyake
Copy link
Contributor

Since it seems to be still WIP, I'll convert this to draft. 🙇
Please let me know when it's ready.

@kenji-miyake kenji-miyake marked this pull request as draft May 25, 2022 10:54
storrrrrrrrm and others added 7 commits May 26, 2022 09:58
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Signed-off-by: suchang <chang.su@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
@codecov
Copy link

codecov bot commented May 26, 2022

Codecov Report

Merging #960 (5d258f5) into main (3ff1a8e) will increase coverage by 0.93%.
The diff coverage is 65.16%.

@@            Coverage Diff            @@
##            main     #960      +/-   ##
=========================================
+ Coverage   9.22%   10.16%   +0.93%     
=========================================
  Files       1038      881     -157     
  Lines      70849    56502   -14347     
  Branches   14867    10775    -4092     
=========================================
- Hits        6538     5743     -795     
+ Misses     58691    45961   -12730     
+ Partials    5620     4798     -822     
Flag Coverage Δ *Carryforward flag
differential 32.39% <65.16%> (?)
total 9.90% <ø> (+0.69%) ⬆️ Carriedforward from 06d22d1

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

Impacted Files Coverage Δ
.../costmap_generator/test/test_points_to_costmap.cpp 65.16% <65.16%> (ø)
system/default_ad_api/src/interface.cpp 0.00% <0.00%> (-71.43%) ⬇️
...ng_simulator/vehicle_model/sim_model_interface.hpp 0.00% <0.00%> (-66.67%) ⬇️
...d_api_msgs/srv/interface_version__type_support.cpp 0.00% <0.00%> (-54.55%) ⬇️
.../_autoware_ad_api_msgs_s.ep.rosidl_typesupport_c.c 0.00% <0.00%> (-47.46%) ⬇️
...auto_common/include/helper_functions/type_name.hpp 66.66% <0.00%> (-33.34%) ⬇️
...l/dds_fastrtps/interface_version__type_support.cpp 0.00% <0.00%> (-32.72%) ⬇️
...s/srv/detail/interface_version__type_support_c.cpp 0.00% <0.00%> (-31.00%) ⬇️
...py/autoware_ad_api_msgs/srv/_interface_version_s.c 0.00% <0.00%> (-29.63%) ⬇️
...odel/vehicle_model_bicycle_kinematics_no_delay.cpp 50.00% <0.00%> (-23.92%) ⬇️
... and 767 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ff1a8e...5d258f5. Read the comment docs.

@storrrrrrrrm storrrrrrrrm marked this pull request as ready for review May 26, 2022 03:00
suchang and others added 5 commits May 26, 2022 13:36
Signed-off-by: suchang <chang.su@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
suchang and others added 4 commits June 24, 2022 16:58
Signed-off-by: suchang <chang.su@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
Signed-off-by: suchang <chang.su@autocore.ai>
@storrrrrrrrm
Copy link
Contributor Author

i know it sounds weired and incredible, but i found that only add

#ifdef ROS_DISTRO_GALACTIC
#include <tf2_geometry_msgs/tf2_geometry_msgs.h>
#else
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>
#endif

to objects_to_costmap.hpp make humble CI passed, add this to points_to_costmap.hpp,CI still shows link error,even if i compiled test_points_to_costmap which has nothing to do with objects_to_costmap.hpp!

i can not tell why, i had done a lot of work to find the point but found nothing.
compared the whole build/costmap_generator directory that generated by compiled with different codes(add include header to objects_to_costmap.hpp or to points_to_costmap.hpp ),nothing helpful found.

anyway, thanks to god, ci finally passed. 😩

@Sharrrrk Sharrrrk enabled auto-merge (squash) June 27, 2022 09:33
auto-merge was automatically disabled June 27, 2022 10:10

Head branch was pushed to by a user without write access

@kenji-miyake kenji-miyake requested a review from maxime-clem June 27, 2022 10:25
@kenji-miyake
Copy link
Contributor

@maxime-clem Could you take a look at this? 🙏 If it's okay for you, we can merge this.

Copy link
Contributor

@maxime-clem maxime-clem left a comment

Choose a reason for hiding this comment

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

Nice tests thank you.
I only have some minor comments and once the code is updated to suit the coding guidelines this can be merged.

suchang and others added 2 commits June 28, 2022 11:23
Signed-off-by: suchang <chang.su@autocore.ai>
@storrrrrrrrm
Copy link
Contributor Author

thanks for suggestions. since current testcase does not change grid related params like grid_resolution_/grid_length_x_/grid_position_x_, i set them to const. my initial thought was i would change these params in future when i add more cases, especially grid_position_x_,grid_position_y_, to test with diffrent grid map. current test case set grid center to (0,0) which is specific in map frame to make testdata construct and test result check easier.

about why i did not put grid_min_value/grid_max_value/gridmap_layer_name in fixture class,i think test program is not just to test correctness of the program logic,but also a way to help autoware users to undestand and debug easier,i wanna they can know which params would have effect on costmap generation at first sight when they read the code. so i leave them there.

@storrrrrrrrm storrrrrrrrm requested a review from maxime-clem June 28, 2022 10:28
@Sharrrrk Sharrrrk enabled auto-merge (squash) July 5, 2022 10:08
@Sharrrrk Sharrrrk merged commit 4542c52 into autowarefoundation:main Jul 5, 2022
@storrrrrrrrm storrrrrrrrm deleted the test_costmap_generator branch July 22, 2022 05:59
boyali referenced this pull request in boyali/autoware.universe Sep 28, 2022
* test: add test_points_to_costmap

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* add copyright

Signed-off-by: suchang <chang.su@autocore.ai>

* Update planning/costmap_generator/test/test_points_to_costmap.cpp

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* test: modify copyright

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* test: add include header file

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* test: add include header file

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Signed-off-by: suchang <chang.su@autocore.ai>

* test: modify comments for spell-check

Signed-off-by: suchang <chang.su@autocore.ai>

* test: fix spell-check

Signed-off-by: suchang <chang.su@autocore.ai>

* test: const variable

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* ci(pre-commit): autofix

* variable to const

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Co-authored-by: suchang <chang.su@autocore.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Co-authored-by: Shark <71419791+Sharrrrk@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
* test: add test_points_to_costmap

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* add copyright

Signed-off-by: suchang <chang.su@autocore.ai>

* Update planning/costmap_generator/test/test_points_to_costmap.cpp

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* test: modify copyright

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* test: add include header file

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* test: add include header file

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Signed-off-by: suchang <chang.su@autocore.ai>

* test: modify comments for spell-check

Signed-off-by: suchang <chang.su@autocore.ai>

* test: fix spell-check

Signed-off-by: suchang <chang.su@autocore.ai>

* test: const variable

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* ci(pre-commit): autofix

* variable to const

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Co-authored-by: suchang <chang.su@autocore.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Co-authored-by: Shark <71419791+Sharrrrk@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
* test: add test_points_to_costmap

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* add copyright

Signed-off-by: suchang <chang.su@autocore.ai>

* Update planning/costmap_generator/test/test_points_to_costmap.cpp

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* test: modify copyright

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* test: add include header file

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* test: add include header file

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Signed-off-by: suchang <chang.su@autocore.ai>

* test: modify comments for spell-check

Signed-off-by: suchang <chang.su@autocore.ai>

* test: fix spell-check

Signed-off-by: suchang <chang.su@autocore.ai>

* test: const variable

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* ci(pre-commit): autofix

* variable to const

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Co-authored-by: suchang <chang.su@autocore.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Co-authored-by: Shark <71419791+Sharrrrk@users.noreply.github.com>
yukke42 pushed a commit to tzhong518/autoware.universe that referenced this pull request Oct 14, 2022
* test: add test_points_to_costmap

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* add copyright

Signed-off-by: suchang <chang.su@autocore.ai>

* Update planning/costmap_generator/test/test_points_to_costmap.cpp

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* test: modify copyright

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* test: add include header file

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* test: add include header file

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Signed-off-by: suchang <chang.su@autocore.ai>

* test: modify comments for spell-check

Signed-off-by: suchang <chang.su@autocore.ai>

* test: fix spell-check

Signed-off-by: suchang <chang.su@autocore.ai>

* test: const variable

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* ci(pre-commit): autofix

* variable to const

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Co-authored-by: suchang <chang.su@autocore.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Co-authored-by: Shark <71419791+Sharrrrk@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 19, 2022
* test: add test_points_to_costmap

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* add copyright

Signed-off-by: suchang <chang.su@autocore.ai>

* Update planning/costmap_generator/test/test_points_to_costmap.cpp

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* test: modify copyright

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* test: add include header file

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* test: add include header file

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Signed-off-by: suchang <chang.su@autocore.ai>

* test: modify comments for spell-check

Signed-off-by: suchang <chang.su@autocore.ai>

* test: fix spell-check

Signed-off-by: suchang <chang.su@autocore.ai>

* test: const variable

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* fix build error

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

* ci(pre-commit): autofix

* variable to const

Signed-off-by: suchang <chang.su@autocore.ai>

* ci(pre-commit): autofix

Co-authored-by: suchang <chang.su@autocore.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Co-authored-by: Shark <71419791+Sharrrrk@users.noreply.github.com>
satoshi-ota pushed a commit to satoshi-ota/autoware.universe that referenced this pull request Oct 24, 2023
…line calculations (autowarefoundation#960)

* [DEBUG] Launch planner with konsole + gdb

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>

* [TMP] debug svg

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>

* Improve performance of the in-loop calcLateralOffset

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>

* Store uncrossable lines as segments in a rtree to improve performance

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>

* [DEBUG] show uncrossable segments and the neirest bound point

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>

* Use custom calcLateralOffset to improve performance

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>

* Revert "[DEBUG] show uncrossable segments and the neirest bound point"

This reverts commit f1085cb.

* Revert "[TMP] debug svg"

This reverts commit 37ba0a7.

* Fix lateral distance calculation

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>

* Revert "[DEBUG] Launch planner with konsole + gdb"

This reverts commit f4c9953.

---------

Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants