-
Notifications
You must be signed in to change notification settings - Fork 275
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
Add multichannel lookup for environment sensors. #1814
Conversation
Some data such as ocean currents or wind speed take on vector values. This PR adds support for such types of data. Signed-off-by: Arjo Chakravarty <[email protected]>
Often when sensing we may be interested in vector quantities. This PR extends the environmental_sensor to support vector quantities. Some additional work was required handle transformations. In particular if the data is something like Ocean Currents or Wind then the data has to be transformed to the robot's local coordinate frame and the robot's velocity also has to be accounted for. Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Codecov Report
@@ Coverage Diff @@
## gz-sim7 #1814 +/- ##
===========================================
+ Coverage 64.37% 64.64% +0.26%
===========================================
Files 341 342 +1
Lines 27132 27383 +251
===========================================
+ Hits 17467 17701 +234
- Misses 9665 9682 +17
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Arjo Chakravarty <[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.
First pass. I don't yet buy the overall design.
src/systems/environmental_sensor_system/EnvironmentalSensorSystem.cc
Outdated
Show resolved
Hide resolved
src/systems/environmental_sensor_system/EnvironmentalSensorSystem.cc
Outdated
Show resolved
Hide resolved
src/systems/environmental_sensor_system/EnvironmentalSensorSystem.hh
Outdated
Show resolved
Hide resolved
src/systems/environmental_sensor_system/EnvironmentalSensorSystem.cc
Outdated
Show resolved
Hide resolved
Signed-off-by: Arjo Chakravarty <[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.
Overall LGTM. CI failures look unrelated (would a rebase or merging back fix them?).
src/systems/environmental_sensor_system/EnvironmentalSensorSystem.cc
Outdated
Show resolved
Hide resolved
src/systems/environmental_sensor_system/EnvironmentalSensorSystem.cc
Outdated
Show resolved
Hide resolved
src/systems/environmental_sensor_system/EnvironmentalSensorSystem.cc
Outdated
Show resolved
Hide resolved
break; | ||
default: | ||
result = (_reading + offset); | ||
} |
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.
@arjo129 meta: it would almost seem like local/global is orthogonal to whether velocity should be computed relative some observer or the world? Would it make sense to split them?
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.
Thats true, but in the interest of time we can check this in.
// Create a vehicle rotated 90 degrees in the yaw axis | ||
math::Pose3d pose(math::Vector3d(0, 0, 0), math::Quaterniond(0, 0, GZ_PI_2)); | ||
|
||
// Vehicle should moving at 1m/s along x-axis (In global frame) |
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.
@arjo129 nit:
// Vehicle should moving at 1m/s along x-axis (In global frame) | |
// Vehicle should be moving at 1m/s along x-axis (In global frame) |
// Vehicle should moving at 1m/s along x-axis (In global frame) | ||
math::Vector3d velocity(1, 0, 0); | ||
|
||
// Imagine a current moving against the vehicle |
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.
@arjo129 imagine
is an interesting choice of words.
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[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.
LGTM with green CI
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸
🎉 New feature
Closes #
Summary
Often when sensing we may be interested in vector quantities. This PR extends the environmental_sensor to support vector quantities. Some additional work was required handle transformations. In particular if the data is something like Ocean Currents or Wind then the data has to be transformed to the robot's local coordinate frame and the robot's velocity also has to be accounted for.
Test it
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.