creating a collision object of octree error in boost::shared_ptr
I want to use fcl library for collision detection between a sphere and an Octree. I did the following to construct a collision object from the tree using one of the tests in fcl in git Hub
octomap::OcTree* st_tree = new octomap::OcTree(0.1);
// Code for construction the tree
CollisionObject tree_obj((boost::shared_ptr<CollisionGeometry>(st_tree)));
I got the follwoing error
cannot convert ‘octomap::OcTree*’ to ‘boost::shared_ptr<fcl::CollisionGeometry>::element_type* {aka fcl::CollisionGeometry*}’ in initialization
explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete
Asked by RSA_kustar on 2015-02-18 02:16:13 UTC
Comments
I am not sure how the API afterwards words, but you definitely can't put an OcTree pointer in a shared_ptr of type CollisionGeometry.
Asked by dornhege on 2015-02-18 04:46:41 UTC