-
Notifications
You must be signed in to change notification settings - Fork 92
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
[melodic backport] Added body operations constructShapeFromBody() and constructMarkerFromBody(). #209
[melodic backport] Added body operations constructShapeFromBody() and constructMarkerFromBody(). #209
Conversation
Originally posted by @v4hn in #138 (comment) @v4hn could you please have a look at this until Melodic times out? :) |
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.
... That PR ended up in the backlog (as many others...)
I believe we bump the library SONAME in this repository, so ABI breakage should not be a concern and I would be fine with simplifying your logic again to a virtual interface.
That aside I approve.
@rhaschke, you were the second review for the original PR, so maybe you can spare a moment?
Thanks for the review! I would definitely love to drop the ABI workaround. I was just checking #138 and found out that Robert has added commit 68e6740 which is not in this PR. I think it should be included. I've also inspected your additional commit bc1cf5e which has turned |
I agree with Michael, that we could drop the ABI compatibility. |
792cedb
to
74aed7d
Compare
the switch is on the type reported by the body.
74aed7d
to
2533153
Compare
Thanks! |
This is a backport of #138 to melodic. All tests pass on my side in both debug and release modes. I used the fake non-virtual polymorphy for
Body::getScaledDimensions()
to retain feature parity with noetic and keep melodic ABI unchanged.I added a special test case for calling
constructShapeFromBody()
on abodies::Body
pointer rather than on one of the downstream types. I can port this test to the noetic branch, too, to test that the polymorphic behavior is doing what it is expected to do. I've actually noticed that neither dynamic, nor static casts are needed in the places edited by commit bc1cf5e - asgetScaledDimensions()
is polymorphic (noetic) or fake polymorphic (melodic), calling it directly on aBody
instance should be good enough. I also did this simplification in this PR, and can transfer it to noetic-devel, too (but it's just a cosmetic issue).Accepting this backport would allow me to drop a
#define private public
hack from https://github.com/peci1/robot_body_filter/blob/master/src/utils/bodies.cpp (and would also allow me to dropconstructShapeFromBody()
andconstructMarkerFromBody()
implementations in robot_body_filter and use the geometric_shapes versions).