Repository navigation
Use MOVEIT_CLASS_FORWARD for moveit classes. - #70
Conversation
| }; | ||
|
|
||
| typedef boost::shared_ptr<Object> ObjectPtr; | ||
| typedef boost::shared_ptr<Object> ObjectConstPtr; |
There was a problem hiding this comment.
ObjectConstPtr was not actually a ConstPtr. It is now, may break files who need mistakenly use ObjectConstPtr as ObjectPtr.
There was a problem hiding this comment.
yep, it breaks the PlanningSceneMonitor:
no known conversion for argument 1 from ‘std::pair<unsigned int, const Eigen::Transform<double, 3, 2>*>’ to ‘const value_type& {aka const std::pair<unsigned int, Eigen::Transform<double, 3, 2>*>&}’
|
|
||
| typedef boost::shared_ptr<CollisionDetectorAllocator> CollisionDetectorAllocatorPtr; | ||
|
|
||
| MOVEIT_CLASS_FORWARD(CollisionDetectorAllocator); |
There was a problem hiding this comment.
If you feel so inclined, the more standard place to put these macros is right before the class definition. However I understand that you just replaced where it already was so might not want to do bigger reshuffling
There was a problem hiding this comment.
Will do. That actually makes it easier to verify that the correct name is passed to the macro :)
|
Thanks for doing this! |
|
Moved the macros around and hopefully fixed |
|
So that devs in the future use CLASS_FORWARD: https://github.com/ros-planning/moveit.ros.org/pull/37 +1, do you think its ready to merge? |
|
It can be merged, but I only got round to |
|
I don't see a good reason why not to merge this now. You recently changed |
|
Correction: we do need to cherry-pick this to I/J |
* moveit_core: Use MOVEIT_CLASS_FORWARD for moveit classes. * Move MOVEIT_CLASS_FORWARD before the class defintiions. * Fix planning_scene_monitor for fixed ObjectConstPtr.
* moveit_core: Use MOVEIT_CLASS_FORWARD for moveit classes. * Move MOVEIT_CLASS_FORWARD before the class defintiions. * Fix planning_scene_monitor for fixed ObjectConstPtr.
|
@de-vri-es could you provide pull-requests for these changes against |
|
Please ignore the above. @davetcoleman already did this in #76 and #77 . Although they fail testing at the moment.. |
|
Looks like an errant curly bracket was added by git somehow during the cherry-picking. I added line comments pointing at them (though I don't understand why compiler doesn't complain differently). |
* moveit_core: Use MOVEIT_CLASS_FORWARD for moveit classes. * Move MOVEIT_CLASS_FORWARD before the class defintiions. * Fix planning_scene_monitor for fixed ObjectConstPtr.
* moveit_core: Use MOVEIT_CLASS_FORWARD for moveit classes. * Move MOVEIT_CLASS_FORWARD before the class defintiions. * Fix planning_scene_monitor for fixed ObjectConstPtr.
|
fixed per @de-vri-es and jade branch built locally |
|
Should this also be applied to |
|
Scratch that, error there is related to running |
This PR replaces manual
shared_ptrtypedefs withMOVEIT_CLASS_FORWARD, and changes source to use the generated typedefs instead of explicitly mentioningboost::shared_ptr.As discussed in #48, this is to make it easier to switch to
std::shared_ptrby modifyingMOVEIT_CLASS_FORWARD(barring the occasionalboost::make_sharedand who knows what, but I don't think those should be wrapped).So far I only got round to
moveit_core/*, but since this is probably going to be a big PR I figured it would be good to put it out there for review (and to see what CI has to say) before it is completely finished. I'll do other subdirectories in different commits, which can be squashed later if desired.In some cases I removed unneeded
#include <boost/shared_ptr.hpp>which could break other files who forget to include that header, but I'll fix those as I encounter them.