Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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