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

Update NavState Printing #502

Merged
merged 2 commits into from
Sep 1, 2020
Merged

Update NavState Printing #502

merged 2 commits into from
Sep 1, 2020

Conversation

varunagrawal
Copy link
Collaborator

@varunagrawal varunagrawal commented Aug 31, 2020

Update the printing of NavState so it is easier to read.

Example:

NavState s;
cout << s << endl;

Before:

R: [
	1, 0, 0;
	0, 1, 0;
	0, 0, 1
]
p: 0
0
0
v: 0
0
0

After:

R: [
	1, 0, 0;
	0, 1, 0;
	0, 0, 1
]
p: 0 0 0
v: 0 0 0

@varunagrawal varunagrawal added the feature New proposed feature label Aug 31, 2020
@varunagrawal varunagrawal self-assigned this Aug 31, 2020
Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

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

Not in favor of this. We moved to Vector2 and Vector3 for these classes. Does not make sense to do something different from Eigen here. Other code should deal with Eigen way of printing by calling transpose...

@varunagrawal
Copy link
Collaborator Author

So this change actually affects Vector2 and Vector3 directly. Why not just update the transpose at the source rather than have .transpose() calls littered everywhere?

@dellaert
Copy link
Member

So this change actually affects Vector2 and Vector3 directly. Why not just update the transpose at the source rather than have .transpose() calls littered everywhere?

What about Vector4, Vector5? Spirit of my comment is: Eigen is Eigen, not some weird hybrid we create on top of it.

@varunagrawal
Copy link
Collaborator Author

Fair enough. I'll update this PR to only change the printing of NavState then. 🙂

@varunagrawal varunagrawal changed the title Print Vectors horizontally for easier reading Update NavState Printing Aug 31, 2020
@varunagrawal varunagrawal requested a review from dellaert August 31, 2020 21:05
Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

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

yay!

@varunagrawal varunagrawal merged commit 02cc96d into develop Sep 1, 2020
@varunagrawal varunagrawal deleted the feature/vector-printing branch September 1, 2020 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New proposed feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants