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

fix(tier4_debug_tools): fix unnecessary use of map #1040

Merged

Conversation

takayuki5168
Copy link
Contributor

@takayuki5168 takayuki5168 commented Jun 5, 2022

Signed-off-by: Takayuki Murooka takayuki5168@gmail.com

Description

Fix for CI error of latest PRs.
#1037
#1036
image

I confirmed this PR worked well with the simple case where there is only one stop line.

FYI, it seems that the current implementation without this PR does not work well with python3 according to this article.
https://stackoverflow.com/questions/1303347/getting-a-map-to-return-a-list-in-python-3-x

takayukimurooka@npc2109028:/tmp$ cat test.py 
import numpy as np

a_list = [1, 2, 3]

print('[map]')
print('min : {}'.format(np.argmin(map(lambda a: a * a, a_list))))
print('max : {}'.format(np.argmax(map(lambda a: a * a, a_list))))

print('[list]')
print('min : {}'.format(np.argmin([a * a for a in a_list])))
print('max : {}'.format(np.argmax([a * a for a in a_list])))
takayukimurooka@npc2109028:/tmp$ python3 test.py 
[map]
min : 0
max : 0
[list]
min : 0
max : 2

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.

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.

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

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
@codecov
Copy link

codecov bot commented Jun 5, 2022

Codecov Report

Merging #1040 (a2f8b1b) into main (ac96ce5) will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##            main   #1040   +/-   ##
=====================================
  Coverage   9.33%   9.33%           
=====================================
  Files        988     988           
  Lines      66676   66676           
  Branches   11591   11591           
=====================================
  Hits        6221    6221           
  Misses     55280   55280           
  Partials    5175    5175           
Flag Coverage Δ *Carryforward flag
differential 0.00% <ø> (?)
total 9.31% <ø> (ø) Carriedforward from ac96ce5

*This pull request uses carry forward flags. Click here to find out 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 ac96ce5...a2f8b1b. Read the comment docs.

@takayuki5168 takayuki5168 marked this pull request as ready for review June 5, 2022 13:52
@takayuki5168
Copy link
Contributor Author

@kenji-miyake @wep21 Could you check this PR.

Copy link
Contributor

@kenji-miyake kenji-miyake left a comment

Choose a reason for hiding this comment

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

Thank you!

@kenji-miyake kenji-miyake merged commit 7c9242a into autowarefoundation:main Jun 6, 2022
@kenji-miyake kenji-miyake deleted the fix/fix-stop-reason-to-pose-ci branch June 6, 2022 01:00
ktro2828 pushed a commit to ktro2828/autoware.universe that referenced this pull request Jun 7, 2022
…n#1040)

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: ktro2828 <kotaro.uetake@tier4.jp>
SoohyeokPark-MORAI pushed a commit to SoohyeokPark-MORAI/autoware.universe that referenced this pull request Jun 15, 2022
…n#1040)

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Signed-off-by: SoohyeokPark-MORAI <shpark.morai@gmail.com>
boyali referenced this pull request in boyali/autoware.universe Jul 1, 2022
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
h-ohta referenced this pull request in tier4/autoware.universe Aug 29, 2022
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
h-ohta referenced this pull request in tier4/autoware.universe Aug 29, 2022
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>
h-ohta referenced this pull request in tier4/autoware.universe Sep 5, 2022
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
h-ohta referenced this pull request in tier4/autoware.universe Sep 5, 2022
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
h-ohta referenced this pull request in tier4/autoware.universe Sep 5, 2022
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>
boyali referenced this pull request in boyali/autoware.universe Sep 28, 2022
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
boyali referenced this pull request in boyali/autoware.universe Oct 19, 2022
Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
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.

2 participants