From 60d3ac7471deb33b4794a3cb1a1f5dc2fc6fae3c Mon Sep 17 00:00:00 2001
From: Joseph Mirabel <jmirabel@laas.fr>
Date: Fri, 27 Oct 2017 17:50:03 +0200
Subject: [PATCH] In automatic graph construction, check if an object has
 joints.

---
 src/graph/helper.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/graph/helper.cc b/src/graph/helper.cc
index 7fa58624..a2d96560 100644
--- a/src/graph/helper.cc
+++ b/src/graph/helper.cc
@@ -690,9 +690,10 @@ namespace hpp {
             }
 
             /// Check if an object can be placed
-            bool objectCanBePlaced (const Object_t&) const
+            bool objectCanBePlaced (const Object_t& o) const
             {
-              return true; // o.get<0>().get<0>();
+              // If the object has no joint, then it cannot be placed.
+              return (o.get<0>().get<2>().size() > 0);
             }
 
             /// Check is an object is grasped by the GraspV_t
-- 
GitLab