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(Python bindings): add missing dependency to lanelet2 #32

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

kenji-miyake
Copy link
Contributor

Description

Due to the import order change in #14, example.py is broken.

image

$ python3 autoware_lanelet2_extension_python/example/example.py
Traceback (most recent call last):
  File "/ws/autoware_lanelet2_extension_python/example/example.py", line 1, in <module>
    from autoware_lanelet2_extension_python.projection import MGRSProjector
  File "/ws/install/autoware_lanelet2_extension_python/local/lib/python3.10/dist-packages/autoware_lanelet2_extension_python/projection/__init__.py", line 2, in <module>
    import autoware_lanelet2_extension_python._autoware_lanelet2_extension_python_boost_python_projection as _projection_cpp
SystemError: initialization of _autoware_lanelet2_extension_python_boost_python_projection raised unreported exception
>>> from autoware_lanelet2_extension_python.projection import MGRSProjector
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/ws/install/autoware_lanelet2_extension_python/local/lib/python3.10/dist-packages/autoware_lanelet2_extension_python/projection/__init__.py", line 2, in <module>
    import autoware_lanelet2_extension_python._autoware_lanelet2_extension_python_boost_python_projection as _projection_cpp
SystemError: initialization of _autoware_lanelet2_extension_python_boost_python_projection raised unreported exception

# It should be imported after lanelet2.
>>> import lanelet2
>>> from autoware_lanelet2_extension_python.projection import MGRSProjector
# No error.

Tests performed

Tested the following steps with osrf/ros:humble-desktop.

$ vim autoware_lanelet2_extension_python/autoware_lanelet2_extension_python/projection/__init__.py # Add `import lanelet2`.
$ colcon build
$ python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from autoware_lanelet2_extension_python.projection import MGRSProjector
# No error.

Effects on system behavior

Not applicable.

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: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Copy link

codecov bot commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 19.50%. Comparing base (6fc35a0) to head (512daee).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #32   +/-   ##
=======================================
  Coverage   19.49%   19.50%           
=======================================
  Files          42       42           
  Lines        2852     2851    -1     
  Branches     1392     1391    -1     
=======================================
  Hits          556      556           
+ Misses       2296     2295    -1     
Flag Coverage Δ *Carryforward flag
differential 0.00% <ø> (-16.75%) ⬇️
total 19.50% <ø> (ø) Carriedforward from 6fc35a0

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

@soblin
Copy link
Collaborator

soblin commented Sep 24, 2024

I will test the script with the test map later, thanks!

@soblin
Copy link
Collaborator

soblin commented Sep 24, 2024

image

Copy link
Collaborator

@soblin soblin left a comment

Choose a reason for hiding this comment

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

LGTM

@soblin soblin merged commit c148815 into autowarefoundation:main Sep 24, 2024
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants