-
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
Use std::shared_ptr for compatibility with FCL 0.5. #47
Conversation
I'm going to hold off on merging any of these PRs until all of MoveIt! Kinetic builds again, that way Travis won't be failed for too long |
Makes sense. |
Can you open an issue for this in moveit_core as an API change for kinetic? |
The set of C++11 changes required for FCL 0.5 discussed here are now passing in Kinetic in this test environment. Note that the kinetic branch will continue not to work without installing from source the latest Octomap and FCL, but these will soon be released. Merging all related PRs. Thanks @de-vri-es for helping migrate MoveIt! |
My pleasure, and thanks for all the help :) |
Issue opened at moveit/moveit_core#319 |
Using |
I thought that must be a mistake in the REP because for Kinetic it says: "Minimum Requirements: C++11". But it was on purpose It seems though violating it is unavoidable since octomap already violated it |
Where does Octomap use |
Ok, it looks like FCL is what requires octree to be wrapped in a std::shared_ptr. Hopefully you're right and we can keep the public facing APIs using boost, I'm sure @de-vri-es has a better understanding of this |
What is the dependency chain between FCL and geometric_shapes? FCL doesn't directly use geometric shapes (or vice versa), right? |
I believe its: FCL depends on octomap |
I'm on holiday right now, so I can't do a whole lot until I'm back.
Regarding wrapping one shared pointer type in the other: it will introduce
subtle errors in the behaviour of weak pointers, which will be very
difficult to debug.
At the moment fcl is already using weak pointers, so we'd have to make sure
that doing so doesn't break the current behaviour.
Worse though, any future use of weak pointer in the external library could
break because they're rightfully expecting weak pointers to work normally.
|
FCL 0.5 uses
std::shared_ptr
(andstd::weak_ptr
) in their public API. To allow usinggeometric_shapes
with FCL 0.5, this PR changes the relevantshared_ptrs
tostd
. This change does affect the public API ofgeometric_shapes
.See also moveit/moveit_core#315
One question: should we hunt down other
shared_ptrs
as well? In any case, for compatibility with ROS messages, those types should continue to useboost::shared_ptr
untilroscpp
switches (if that ever happens).I suppose the pragmatic approach for now is to only switch to
std::shared_ptr
where required by external libraries, but I also wouldn't mind updating more tostd::shared_ptr
(where possible).