Towards fixing Doxygen-to-docstring issues#2107
Merged
Conversation
Member
Author
|
I did occasionally edit Also, since I always took the name from the |
dellaert
approved these changes
Apr 23, 2025
Member
dellaert
left a comment
There was a problem hiding this comment.
LGTM!!!
We can talk about remaining issues in person.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current issues
expmapis wrapped underPose2(among others), but its docs are inLieGroup, soPose2.expmapdoes not have a docstring.Resolving issue 1
This PR changes many
.ifile functions to unify the names between the wrapper and the headers. I did this by writing a script (with Gemini) to automatically detect and fix issues of this type. I chose to change the.ifiles instead of anything in the.hbecause making changes in the.hnaturally leads to a huge amount of errors in inline functions that need to be fixed manually (as well as changing the documentation comments, etc etc).The script, however, is limited because C++ syntax is so complex; it's very difficult to write regexes etc. that can handle it, especially with cases like multi-line function declarations and templates. Because of this, the script (despite my best efforts) is somewhat unreliable and hard to use, so I will thus not add it to this repository.
I added documentation in DEVELOP.md that reflects the parameter name match requirement moving forward.
It's telling me I can't automatically merge, so I will make this a draft until I fix the conflict.
Resolving issue 2
This is a tough one. For
LieGroup-derived classes (which I believe to be the most important class of this issue), I am not certain how to fix the issue. I don't know the best way to wrapLieGroupsince it's based on a template, and my attempts to add the inherited functions likeexpmaphave resulted in hard-to-decipher linker errors. I would welcome any feedback here.For example, I tried adding this snippet to
Pose2.hto be able to document these functions:But compilation yields errors that look like this:
geometry.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Eigen::Matrix<double,3,1,0,3,1> __cdecl gtsam::Pose2::logmap(class gtsam::Pose2 const &,class gtsam::OptionalJacobian<3,3>,class gtsam::OptionalJacobian<3,3>)" (__imp_?logmap@Pose2@gtsam@@QEAA?AV?$Matrix@N$02$00$0A@$02$00@Eigen@@AEBV12@V?$OptionalJacobian@$02$02@2@1@Z) referenced in function "public: __cdecl <lambda_a632a661d6bda3c684ae16a0bd4c2b9a>::operator()(class gtsam::Pose2 *,class gtsam::Pose2 const &,class Eigen::Ref<class Eigen::Matrix<double,-1,-1,0,-1,-1>,0,class Eigen::OuterStride<-1> >,class Eigen::Ref<class Eigen::Matrix<double,-1,-1,0,-1,-1>,0,class Eigen::OuterStride<-1> >)const " (??R<lambda_a632a661d6bda3c684ae16a0bd4c2b9a>@@QEBA@PEAVPose2@gtsam@@AEBV12@V?$Ref@V?$Matrix@N$0?0$0?0$0A@$0?0$0?0@Eigen@@$0A@V?$OuterStride@$0?0@2@@Eigen@@2@Z)