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

[RTR] eulerDot - body velocity tranformation #263

Merged
merged 10 commits into from
Jul 19, 2022

Conversation

EveCharbie
Copy link
Collaborator

@EveCharbie EveCharbie commented Mar 9, 2022

issue : Verify conversion from rotation matrix to euler angles #165


This change is Reviewable

@EveCharbie
Copy link
Collaborator Author

@pariterre I am not done yet, but I need help with how to write this :
Matrix3d velocity_matrix = velocityMatrix(euler, seq).colPivHouseholderQr();

Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @EveCharbie)


include/Utils/Quaternion.h, line 6 at r1 (raw file):

#include <memory>
#include "Utils/Vector3d.h"
#include "Utils/Matrix3d.h"

Is this necessary? Use the forward declaration (few lines below) if possible (and move the include to the cpp file).


src/Utils/Quaternion.cpp, line 351 at r1 (raw file):

    }
    
    utils::Matrix3d unit_vectors_matrix;

Please use camelCase (instead of snake_case) variable names in C++


src/Utils/Quaternion.cpp, line 362 at r1 (raw file):

    rotation_2[0] = euler[0];
    rotation_2[1] = euler[1];
    utils::Vector3d Rot_mat_1 = utils::Rotation::Rotation::fromEulerAngles(rotation_1, seq);

Is there a reason to copy all this suff?


src/Utils/Quaternion.cpp, line 377 at r1 (raw file):

    velocity_matrix(i, 1) = temp_vectors_for_matrix_1[i];
    velocity_matrix(i, 2) = temp_vectors_for_matrix_2[i];
    }

Indent the inside of the for loop.
That said, it feels you just copy stuff from three lines before? Why don't use the .block(x, x, x, x) method?

Code quote:

    velocity_matrix(i, 0) = temp_vectors_for_matrix_0[i];
    velocity_matrix(i, 1) = temp_vectors_for_matrix_1[i];
    velocity_matrix(i, 2) = temp_vectors_for_matrix_2[i];

@mickaelbegon
Copy link

@pariterre, if you have time, could you work with @EveCharbie on the PR? It is not urgent nor a priority

@pariterre pariterre force-pushed the EulerDot_to_Omega branch 2 times, most recently from 516b515 to 8530fac Compare April 4, 2022 14:34
@pariterre
Copy link
Member

@EveCharbie Please confirm the current code is what correct :)

@EveCharbie
Copy link
Collaborator Author

@pariterre : Yes looks fine, thanks :)

pariterre
pariterre previously approved these changes Apr 27, 2022
Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 5 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @EveCharbie)

@pariterre
Copy link
Member

@EveCharbie
Can you fix the error from testings? :)

@pariterre
Copy link
Member

@EveCharbie up?

@EveCharbie
Copy link
Collaborator Author

I verified the values with my python version and everything is now OK :)

@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #263 (47f10b8) into master (238065f) will increase coverage by 0.26%.
The diff coverage is 96.82%.

❗ Current head 47f10b8 differs from pull request most recent head 3872c2f. Consider uploading reports for the commit 3872c2f to get more accurate results

@@            Coverage Diff             @@
##           master     #263      +/-   ##
==========================================
+ Coverage   78.62%   78.88%   +0.26%     
==========================================
  Files         101      101              
  Lines       11593    11689      +96     
==========================================
+ Hits         9115     9221     +106     
+ Misses       2478     2468      -10     
Impacted Files Coverage Δ
include/Utils/Matrix3d.h 40.00% <ø> (ø)
include/Utils/Quaternion.h 100.00% <ø> (ø)
src/Utils/SpatialVector.cpp 61.53% <0.00%> (-18.47%) ⬇️
src/Utils/Matrix3d.cpp 97.14% <92.30%> (-2.86%) ⬇️
src/RigidBody/Contacts.cpp 91.79% <100.00%> (+0.83%) ⬆️
src/RigidBody/Joints.cpp 66.33% <100.00%> (+1.44%) ⬆️
src/Utils/Quaternion.cpp 91.51% <100.00%> (+0.89%) ⬆️
test/test_rigidbody.cpp 100.00% <100.00%> (ø)
test/test_utils.cpp 100.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 238065f...3872c2f. Read the comment docs.

@EveCharbie EveCharbie changed the title eulerDot - body velocity tranformation [RTR] eulerDot - body velocity tranformation Jul 19, 2022
Copy link
Member

@pariterre pariterre left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @EveCharbie)

@pariterre pariterre merged commit ce165a7 into pyomeca:master Jul 19, 2022
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