From 391d152aa187cf7e4dd15d7712bdbd15c87d62f3 Mon Sep 17 00:00:00 2001
From: Rohan Budhiraja <budhiraja@laas.fr>
Date: Thu, 8 Sep 2016 17:38:35 +0200
Subject: [PATCH] [wip/sot-dynamic-pinocchio-v3][patch] Assuming that the robot
 is a humanoid. (This is a Hack)

---
 sot-dynamic-pinocchio-v3/Makefile         |  2 +-
 sot-dynamic-pinocchio-v3/distinfo         |  1 +
 sot-dynamic-pinocchio-v3/patches/patch-ab | 14 ++++++++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 sot-dynamic-pinocchio-v3/patches/patch-ab

diff --git a/sot-dynamic-pinocchio-v3/Makefile b/sot-dynamic-pinocchio-v3/Makefile
index ee711b04..35637c55 100644
--- a/sot-dynamic-pinocchio-v3/Makefile
+++ b/sot-dynamic-pinocchio-v3/Makefile
@@ -3,7 +3,7 @@
 #
 
 VERSION=		3.1.0
-PKGREVISION=		1
+PKGREVISION=		2
 DISTNAME=		sot-dynamic-pinocchio-v3-${VERSION}
 MASTER_SITES=		${MASTER_SITE_OPENROBOTS:=sot-dynamic-pinocchio-v3/}
 MASTER_REPOSITORY=	${MASTER_REPOSITORY_GITHUB}proyan/sot-dynamic/tree/topic/sot-pinocchio
diff --git a/sot-dynamic-pinocchio-v3/distinfo b/sot-dynamic-pinocchio-v3/distinfo
index 1d8accfc..4a79a7c6 100644
--- a/sot-dynamic-pinocchio-v3/distinfo
+++ b/sot-dynamic-pinocchio-v3/distinfo
@@ -2,3 +2,4 @@ SHA1 (sot-dynamic-pinocchio-v3-3.1.0.tar.gz) = d080f073c2a7240ab8f933b1054621ea1
 RMD160 (sot-dynamic-pinocchio-v3-3.1.0.tar.gz) = e591c1cf125ce437eb7b0f04069d2e190320378a
 Size (sot-dynamic-pinocchio-v3-3.1.0.tar.gz) = 171868 bytes
 SHA1 (patch-aa) = 8ae702caa5ffd271dd14c148f8e27d8a33d5e382
+SHA1 (patch-ab) = c2b904cef17f45130d80d917cfbd224b8e6cc63c
diff --git a/sot-dynamic-pinocchio-v3/patches/patch-ab b/sot-dynamic-pinocchio-v3/patches/patch-ab
new file mode 100644
index 00000000..0d895ce3
--- /dev/null
+++ b/sot-dynamic-pinocchio-v3/patches/patch-ab
@@ -0,0 +1,14 @@
+Hack: Take the root joint as freeflyer.
+(This patch assumes that the robot being loaded has no fixed root joint.)
+
+--- src/sot-dynamic.cpp	2016-04-15 15:25:59.000000000 +0200
++++ src/sot-dynamic.cpp	2016-09-08 17:30:26.605146524 +0200
+@@ -410,7 +410,7 @@
+ void Dynamic::parseUrdfFile() {
+   sotDEBUGIN(15);
+   if (m_urdfPath.empty()) std::cerr<<"Set input file first"<<std::endl;
+-  m_model = se3::urdf::buildModel(this->m_urdfPath, false);
++  m_model = se3::urdf::buildModel(this->m_urdfPath, se3::JointModelFreeFlyer(), false);
+   if (m_data) delete m_data;
+   m_data = new se3::Data(m_model);
+   init=true;
-- 
GitLab