Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Note `XPython` is the name for the Boost Python bindings class of `X`.
- void BazPython::RunThatFoo(const bp::object & foo) {
- FooPython & foo_obj = bp::extract<FooPython&>(foo);
- auto ps_ptr = foo_obj.GetPSPtr();
- Baz::DoPSComputation(ps_ptr); // Expects a `const std::shared_ptr<planning_scene::PlanningScene>`
- }
- class PlanningScene : private boost::noncopyable, public std::enable_shared_from_this<PlanningScene>
- std::shared_ptr<planning_scene::PlanningScene> Foo::GetPSPtr() { // two different attempts shown
- // return ps_;
- return (*ps_).shared_from_this();
- }
Add Comment
Please, Sign In to add comment