-
Notifications
You must be signed in to change notification settings - Fork 58
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
IMU sensor API to get world ref frame and heading offset #186
Conversation
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-sensors6 #186 +/- ##
===============================================
Coverage ? 76.44%
===============================================
Files ? 29
Lines ? 2908
Branches ? 0
===============================================
Hits ? 2223
Misses ? 685
Partials ? 0 Continue to review full report at Codecov.
|
TODO
|
Signed-off-by: Aditya <[email protected]>
Moved localization tag parsing logic to a separate method. This way the code 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.
I have some quick comments about the variable names which I think will clarify what the variables mean
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Relevant PR in IMU system : gazebosim/gz-sim#1320 |
Signed-off-by: Aditya <[email protected]>
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.
I'm still looking through the tests, but I have a few comments for now
@@ -436,6 +436,8 @@ TEST(ImuSensor_TEST, OrientationReference) | |||
// Create an ImuSensor | |||
auto sensor = mgr.CreateSensor<ignition::sensors::ImuSensor>( | |||
imuSDF); | |||
sensor->SetWorldFrameOrientation(math::Quaterniond(0, 0, 0), | |||
sensors::WorldFrameEnumType::ENU); |
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.
why is this necessary?
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.
Currently, SetWorldFrameOrientation
is also responsible for applying the "CUSTOM" tag. I could separate this logic in a separate method though.
@@ -496,6 +498,9 @@ TEST(ImuSensor_TEST, CustomRpyParentFrame) | |||
auto sensor = mgr.CreateSensor<ignition::sensors::ImuSensor>( | |||
imuSDF); | |||
|
|||
sensor->SetWorldFrameOrientation(math::Quaterniond(0, 0, 0), | |||
sensors::WorldFrameEnumType::ENU); |
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.
why is this necessary?
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.
Same reason above.
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
Signed-off-by: Aditya <[email protected]>
a265be9
to
3f42ba6
Compare
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.
ok, two more tiny nits, and then I'll be ready to approve
Signed-off-by: Aditya <[email protected]>
dd33604
to
735a61f
Compare
This pull request has been mentioned on Gazebo Community. There might be relevant details there: https://community.gazebosim.org/t/new-ignition-releases-2022-04-13-fortress-edifice/1367/1 |
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸
🎉 New feature
Summary
As per the discussion here : #178 (comment), this PR aims to expose
SetWorldFrameOrientation
API which accepts heading offset and world frame orientation (ENU
by default). If the<localization>
tag for IMU sensor is set to any named frame (https://github.com/ignitionrobotics/sdformat/blob/6404afdf959982f759526dea8700037b50fa7758/sdf/1.9/imu.sdf#L7-L30), the sensor should output its orientation with respect to the frame specified in the<localization>
tag.There would be another follow up PR in IMU sensor system to use this API
Test it
Added some test cases to
ImuSensor_TEST.cc
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸