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

Easier importing of airo-mono functions/classes #122

Open
Victorlouisdg opened this issue Feb 4, 2024 · 1 comment
Open

Easier importing of airo-mono functions/classes #122

Victorlouisdg opened this issue Feb 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Victorlouisdg
Copy link
Contributor

Describe the feature you'd like
Easier importing of airo-mono functions/classes. Currently to import airo-mono functions etc. you generally have to fully specify the import paths, e.g:

from airo_camera_toolkit.cameras.zed.zed2i import Zed2i
from airo_camera_toolkit.pinhole_operations.projection import project_points_to_image_plane

Specifying this can be a bit tedious and requires users to be aware of the entire structure of our Python packages.
Editor import suggestion tools can help with this, but currently this doesn't seem to work well for me in VSCode with Pylance and non-editable pip installed airo-mono, e.g:

transform_points() # here I get the suggestion Add "from airo_spatial_algebra import transform_points"
project_points_to_image_plane() # here I don't get import suggestions

Possible implementation

  1. Move imports higher e.g. from airo_camera_toolkit import Zed2i, project_point_to_image_plane
  2. Improve integration with import-suggestion tools
@Victorlouisdg Victorlouisdg added the enhancement New feature or request label Feb 4, 2024
@m-decoster
Copy link
Contributor

Overall, I agree, however:

from airo_camera_toolkit import Zed2i

Hardware related imports are tricky, because, e.g., importing Zed2i requires that the Zed python SDK is installed. See #110

This could maybe be avoided by only importing the hardware specific packages once the Zed2i or Realsense objects are constructed, but this is not always possible, e.g., https://github.com/airo-ugent/airo-mono/blob/main/airo-camera-toolkit/airo_camera_toolkit/cameras/zed/zed2i.py#L55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants