-
Notifications
You must be signed in to change notification settings - Fork 281
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
Functions to enable velocity and acceleration checks on Link #935
Conversation
Signed-off-by: Louise Poubel <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gazebo3 #935 +/- ##
===============================================
- Coverage 77.83% 77.79% -0.05%
===============================================
Files 219 220 +1
Lines 12593 12562 -31
===============================================
- Hits 9802 9772 -30
+ Misses 2791 2790 -1
Continue to review full report at Codecov.
|
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.
These new APIs are awesome! They'll make it so much easier for systems authors (and result in lot cleaner systems). One small suggestion is lets make the helper function void enableComponent(EntityComponentManager &_ecm, Entity _entity, bool _enable)
in link.cc
public. There are many places where this pattern is used and it'd be incredibly helpful to reduce the complexity of systems code.
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 agree with @arjo129 that moving this enableComponent
function into the public API would make a lot of sense. It's a pattern that we do a good bit throughout the codebase.
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[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. I've got a small suggestion to make that might improve quality of life but feel free to reject it if you think its inappropriate.
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
🎉 New feature
Summary
This is broken off #926 for easier review.
The
Link
class provides convenient functions to retrieve velocities and accelerations without needing to touch the ECM directly. But in order to use those functions, users need to create the necessary components. This defeats the purpose of having an API that hides away the ECM's complexity.This PR adds the
Enable(Velocity|Acceleration)Checks
functions, which provide a way for users of theLink
API to create those components without necessarily knowing that they're doing so.Test it
I used the new functions in some existing plugins to demonstrate how it comes in handy for plugin developers, see below. The tests and documentation should also be helpful to understand the intended usage.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge
🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸