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

Rework camera logic #232

Open
wants to merge 40 commits into
base: dev-v1.2.0
Choose a base branch
from
Open

Rework camera logic #232

wants to merge 40 commits into from

Conversation

stimpfli
Copy link
Contributor

Description

This PR implements generic camera that can be attached to any part of the model.
Cameras are now initialised dynamically and not part of the xml.
New cameras with special update rules can be created and inherit from the base camera class.
Changes have been incorporated to every example and notebook and tested.

Does this address any currently open issues?

[#229]

@stimpfli stimpfli requested review from sibocw and tkclam and removed request for sibocw January 16, 2025 07:43
Copy link
Contributor

@sibocw sibocw left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this significant undertaking!

  1. Could you please update doc/source/api_ref/camera.rst accordingly? This involves:
    1. Edit the text explanation if needed
    2. Add the autogenerated documentation for all camera types)?

For ii, you can use

.. automodule:: flygym.camera
    :members:
    :undoc-members:
    :show-inheritance:

... instead of adding all cameras explicitly:

.. autoclass:: flygym.camera.Camera
    :members:
    :undoc-members:
    :show-inheritance:

.. autoclass:: flygym.camera.ZStabCamera
    :members:
    :undoc-members:
    :show-inheritance:

... etc ...

See https://github.com/NeLy-EPFL/flygym/blob/rework-camera/doc/source/api_ref/legacy.rst for an example.

  1. For all notebooks changed, can you also modify the RST files under doc/source/tutorials accordingly? I know... this is tedious. I also had to manually modify the RST files generated by nbconvert.

Copy link
Contributor

@tkclam tkclam left a comment

Choose a reason for hiding this comment

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

Thanks @stimpfli ! Looks good to me now

flygym/camera.py Outdated Show resolved Hide resolved
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.

3 participants