creating a collision object of octree error in boost::shared_ptr

asked 2015-02-18 01:16:13 -0500

RSA_kustar gravatar image

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
edit retag flag offensive close merge delete

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.

dornhege gravatar image dornhege  ( 2015-02-18 03:46:41 -0500 )edit