-
Notifications
You must be signed in to change notification settings - Fork 798
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
Consistent Rot3 printing #358
Conversation
Additionally, this is how
|
Ask other people for reviews ? |
Dude. I don’t mean ask everyone at once :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Only, see a couple of comments above.
@dellaert sorry about that. I figured casting a wide net would yield faster results. 😅 |
@dellaert @jlblancoc now that 4.0.3 is out, I would really like to see this PR merged in. 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might seem I'm obsessed with this tiny performance issue but... again... std::endl
-> \n
? :-)
Whoops. Yeah the other PR is based off this one hence you're seeing the issue repeat itself. Give me a few quick minutes to update this. |
So I am a bit confused about the |
Hmm... I'm thinking of, say, we call print() on a Values or an entire FactorGraph. One flush at the end is ok... but 1000s of them, after printing (recursively) each value/matrix/vector/factor/etc. seems not necessary :-) Still, it's probably a minor point, so feel free of leaving it as you think it's better. |
I completely agree with your point. The issue is that the Values/FactorGraph print method just calls the internal print method of the various values/factors, so we need to add the |
Ok. I don't want to stop you doing anything more productive! |
Merging because Travis keeps timing out and we will be moving to Github Actions. |
This PR unifies the printing functionality of Rot3 to use the
Eigen::IOFormat
formatting, thus ensuring consistency.The aim would be to help the user visually identify more easily what the rotation matrices are, as well as copy them into another language such as python.
I've also
Pose3
,NavState
andRot3
to provide default spacing when using the custom prefix string<<
overloadendl
in<<
so as to avoid unnecessary buffer flushes.For the below snippet,
the previous format looked like this:
The new format would give the output:
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)