Skip to content

More navigation docs#2084

Merged
dellaert merged 12 commits intodevelopfrom
feature/more_nav_docs
Apr 7, 2025
Merged

More navigation docs#2084
dellaert merged 12 commits intodevelopfrom
feature/more_nav_docs

Conversation

@dellaert
Copy link
Copy Markdown
Member

@dellaert dellaert commented Apr 7, 2025

@p-zach I was able to generate several more notebooks almost perfectly using Google AI studio, with Gemini 2.5. I uploaded the navigation directory using repomix (compressed code), and then also pasted the json from AHRSFactor.ipynb. The prompt was then:

I already have a notebook describing the AHRSFactor, see below. Could you produce notebooks for the other classes involved with the IMU factors? Once notebook per class.

The output was almost perfect. I used the text editor to paste the json, and had to correct one formula. I also corrected its code style, saying:

In the last code example, please use from gtsam import , and also use GTSAMs from gtsam.symbol_shorthand import X,V,B so you can directly use X(0) etc, rather than define more variables. Just give me the code, I can paste it in the notebook

This is wild 🤯 ♊.

Also updated navigation.md with an overview and mermaid diagrams. More editing there to my linking, but again ♊ magic 🪄 .

classDiagram
    direction TD

    class PreintegrationBase {
        <<Abstract>>
        +imuBias::ConstantBias biasHat_
        +double deltaTij_
        +resetIntegration()*
        +integrateMeasurement()*
        +biasCorrectedDelta()*
        +predict()
        +computeError()
    }

    class ManifoldPreintegration {
        +NavState deltaXij_
        +update()
    }
    ManifoldPreintegration --|> PreintegrationBase : implements

    class TangentPreintegration {
        +Vector9 preintegrated_
        +update()
    }
    TangentPreintegration --|> PreintegrationBase : implements

    class PreintegratedImuMeasurements {
        +Matrix9 preintMeasCov_
    }
    PreintegratedImuMeasurements --|> ManifoldPreintegration : inherits
    PreintegratedImuMeasurements --|> TangentPreintegration : inherits

    class PreintegratedCombinedMeasurements {
       +Matrix preintMeasCov_ (15x15)
    }
    PreintegratedCombinedMeasurements --|> ManifoldPreintegration : inherits
    PreintegratedCombinedMeasurements --|> TangentPreintegration : inherits

    class ImuFactor {
        Pose3, Vector3, Pose3, Vector3, ConstantBias
        +evaluateError(...) Vector9
    }
    ImuFactor ..> PreintegratedImuMeasurements : uses
    class ImuFactor2 {
        NavState, NavState, ConstantBias
        +evaluateError(...) Vector9
    }
    ImuFactor2 ..> PreintegratedImuMeasurements : uses


    class CombinedImuFactor {
        Pose3, Vector3, Pose3, Vector3, ConstantBias
         +evaluateError(...) Vector (15)
    }
    CombinedImuFactor ..> PreintegratedCombinedMeasurements : uses
Loading

@dellaert dellaert requested a review from p-zach April 7, 2025 04:41
@dellaert
Copy link
Copy Markdown
Member Author

dellaert commented Apr 7, 2025

Update: I added 8 more classes, still a bit manual :-( takes me about 15 mins per class on average to check everything. The generated code was good to find out that several classes and/or methods were not yet wrapped, so that was part of the work.

Copy link
Copy Markdown
Member

@p-zach p-zach left a comment

Choose a reason for hiding this comment

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

Nice! All looks good to me.

@dellaert dellaert merged commit 967c3ed into develop Apr 7, 2025
36 checks passed
@dellaert dellaert deleted the feature/more_nav_docs branch April 7, 2025 22:46
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