-
Notifications
You must be signed in to change notification settings - Fork 277
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
Parse new param for enabling / disabling IMU orientation output #899
Conversation
Signed-off-by: Ian Chen <[email protected]>
src/systems/imu/Imu.cc
Outdated
gazebo::EntityComponentManager & /*_ecm*/, | ||
gazebo::EventManager & /*_eventMgr*/) | ||
{ | ||
if (_sdf->HasElement("output_orientation")) |
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.
This would apply to all IMUs in simulation. Have you considered providing more granular configuration?
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.
updated changes in this PR to parse a new enable_orientation
SDF element (gazebosim/sdformat#651) that allows each imu sensor to enable/disable orientation output. 48e171f
const std::string sensorName = "imu_sensor"; | ||
|
||
auto topic = | ||
"world/imu_sensor/model/imu_model/link/link/sensor/imu_sensor/imu"; |
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.
common::joinPaths
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.
hmm this string if for topic name so I think it's not necessary to use joinPaths
as that's intended for file paths?
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo4 #899 +/- ##
===============================================
+ Coverage 67.13% 67.16% +0.03%
===============================================
Files 243 243
Lines 18215 18253 +38
===============================================
+ Hits 12229 12260 +31
- Misses 5986 5993 +7
Continue to review full report at Codecov.
|
…bosim#899) * parse imu orientation param Signed-off-by: Ian Chen <[email protected]> * use enable_orientation sdf elem Signed-off-by: Ian Chen <[email protected]> * use joinPaths Signed-off-by: Ian Chen <[email protected]> * add test world file Signed-off-by: Ian Chen <[email protected]> Co-authored-by: Louise Poubel <[email protected]> Co-authored-by: Nate Koenig <[email protected]> Signed-off-by: William Lew <[email protected]>
Signed-off-by: Ian Chen [email protected]
🎉 New feature
Summary
Depends on:
The PR updates the IMU system to parse a new param called<output_orientation>
to determine whether or not to publish orientation values. By default, the variable is set to true to preserve the existing behavior.Updated IMU system to parse a new
enable_orientation
SDF element to determine whether or not to generate and publish orientation values. By default, the variable is set to true to preserve the existing behavior.Test it
run the imu integration test:
You can also edit
examples/worlds/sensors.sdf
world file and update the imu sensor to use the new param:run ign-gazebo with the updated
sensors.sdf
file:echo the imu topic:
And you should see that the msg now does not have the
orientation
fieldChecklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge