From c1f212e02b9b36b1dc617ed0f4c99b098cf763cd Mon Sep 17 00:00:00 2001
From: Pierre Fernbach <pierre.fernbach@laas.fr>
Date: Tue, 20 Dec 2016 15:44:49 +0100
Subject: [PATCH] add a method to set a flag in fullBody, to check if we use
 the acceleration in isStable

---
 idl/hpp/corbaserver/rbprm/rbprmbuilder.idl | 5 +++++
 src/hpp/corbaserver/rbprm/rbprmfullbody.py | 7 +++++++
 src/rbprmbuilder.impl.cc                   | 4 ++++
 src/rbprmbuilder.impl.hh                   | 1 +
 4 files changed, 17 insertions(+)

diff --git a/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl b/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl
index 978bd578..ea99340e 100755
--- a/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl
+++ b/idl/hpp/corbaserver/rbprm/rbprmbuilder.idl
@@ -93,6 +93,11 @@ module hpp
 		void loadFullBodyRobotFromExistingRobot ()
 			raises (Error);
 
+    /// set a boolean in rbprmFullBody
+    /// if true, the acceleration doesn't account for the stability check
+    void setStaticStability(in boolean staticStability)
+      raises (Error);
+
     /// Set Rom constraints for the configuration shooter
     /// a configuration will only be valid if all roms indicated
     /// are colliding with the environment.
diff --git a/src/hpp/corbaserver/rbprm/rbprmfullbody.py b/src/hpp/corbaserver/rbprm/rbprmfullbody.py
index 2bdb61d6..910635f1 100755
--- a/src/hpp/corbaserver/rbprm/rbprmfullbody.py
+++ b/src/hpp/corbaserver/rbprm/rbprmfullbody.py
@@ -262,6 +262,13 @@ class FullBody (object):
     def setEndState(self, configuration, contacts):
 		return self.client.rbprm.rbprm.setEndState(configuration, contacts)
 	
+  ## set a boolean in rbprmFullBody
+  # if true, the acceleration doesn't account for the stability check
+  #
+    # \param staticStability boolean
+    def setStaticStability(self,staticStability):
+        return self.client.rbprm.rbprm.setStaticStability(staticStability)
+
 	## Saves a computed contact sequence in a given filename
 	#
     # \param The file where the configuration must be saved
diff --git a/src/rbprmbuilder.impl.cc b/src/rbprmbuilder.impl.cc
index 8ca1b6cd..150413ee 100755
--- a/src/rbprmbuilder.impl.cc
+++ b/src/rbprmbuilder.impl.cc
@@ -569,6 +569,10 @@ namespace hpp {
         return res;
     }
 
+    void RbprmBuilder::setStaticStability(const bool staticStability) throw (hpp::Error){
+      fullBody_->staticStability(staticStability);
+    }
+
 
     void RbprmBuilder::setFilter(const hpp::Names_t& roms) throw (hpp::Error)
     {
diff --git a/src/rbprmbuilder.impl.hh b/src/rbprmbuilder.impl.hh
index a12ab7fe..2ae2ed86 100755
--- a/src/rbprmbuilder.impl.hh
+++ b/src/rbprmbuilder.impl.hh
@@ -115,6 +115,7 @@ namespace hpp {
 
         virtual void loadFullBodyRobotFromExistingRobot () throw (hpp::Error);
 
+        void setStaticStability(const bool staticStability) throw (hpp::Error);
 
         virtual void setFilter(const hpp::Names_t& roms) throw (hpp::Error);
 				virtual void setAffordanceFilter(const char* romName, const hpp::Names_t& affordances) throw (hpp::Error);
-- 
GitLab