From f001943c1b598c8e3e0d9fba4f1e2a36738057d5 Mon Sep 17 00:00:00 2001
From: jpan <jpan@253336fb-580f-4252-a368-f3cef5a2a82b>
Date: Fri, 6 Jan 2012 23:15:26 +0000
Subject: [PATCH] git-svn-id: https://kforge.ros.org/fcl/fcl_ros@61
 253336fb-580f-4252-a368-f3cef5a2a82b

---
 trunk/collision_space_fcl/src/environmentFCL.cpp | 2 +-
 trunk/fcl/include/fcl/collision_object.h         | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/trunk/collision_space_fcl/src/environmentFCL.cpp b/trunk/collision_space_fcl/src/environmentFCL.cpp
index 14453697..e6a8753e 100644
--- a/trunk/collision_space_fcl/src/environmentFCL.cpp
+++ b/trunk/collision_space_fcl/src/environmentFCL.cpp
@@ -266,7 +266,7 @@ fcl::CollisionObject* EnvironmentModelFCL::createGeom(const shapes::Shape *shape
       ROS_FATAL_STREAM("This shape type is not supported using FCL yet");
   }
 
-  fcl::CollisionObject* co = new fcl::CollisionObject(g);
+  fcl::CollisionObject* co = new fcl::CollisionObject(boost::shared_ptr<fcl::CollisionGeometry>(g));
   return co;
 }
 
diff --git a/trunk/fcl/include/fcl/collision_object.h b/trunk/fcl/include/fcl/collision_object.h
index e8a6ee9b..bb9da734 100644
--- a/trunk/fcl/include/fcl/collision_object.h
+++ b/trunk/fcl/include/fcl/collision_object.h
@@ -86,15 +86,18 @@ class CollisionObject
 public:
   CollisionObject(const boost::shared_ptr<CollisionGeometry> &cgeom_) : cgeom(cgeom_)
   {
+    computeAABB();
   }
 
   CollisionObject(const boost::shared_ptr<CollisionGeometry> &cgeom_, const SimpleTransform& tf) : cgeom(cgeom_), t(tf)
   {
+    computeAABB();
   }
 
   CollisionObject(const boost::shared_ptr<CollisionGeometry> &cgeom_, const Matrix3f& R, const Vec3f& T):
       cgeom(cgeom_), t(SimpleTransform(R, T))
   {
+    computeAABB();
   }
 
   CollisionObject()
-- 
GitLab