From 657b1a8a6d49fec3f0ff39469f0ba6edbfaf12ca Mon Sep 17 00:00:00 2001 From: Chris Dellin Date: Sun, 2 Aug 2015 18:26:27 -0400 Subject: [PATCH 1/2] added call to planner superclasses to avoid weird recursion bug --- src/prpy/planning/base.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/prpy/planning/base.py b/src/prpy/planning/base.py index f829393..7756aae 100644 --- a/src/prpy/planning/base.py +++ b/src/prpy/planning/base.py @@ -119,12 +119,14 @@ def get_planning_method_names(self): class BasePlanner(Planner): def __init__(self): + super(BasePlanner, self).__init__() self.env = openravepy.Environment() class MetaPlanner(Planner): __metaclass__ = abc.ABCMeta def __init__(self): + super(MetaPlanner, self).__init__() self._planners = list() def has_planning_method(self, method_name): @@ -216,6 +218,7 @@ def meta_wrapper(*args, **kw_args): class Sequence(MetaPlanner): def __init__(self, *planners): + super(Sequence, self).__init__() self._planners = planners def __str__(self): @@ -259,6 +262,7 @@ def plan(self, method, args, kw_args): class Ranked(MetaPlanner): def __init__(self, *planners): + super(Ranked, self).__init__() self._planners = planners def __str__(self): @@ -328,6 +332,7 @@ def call_planner(index, planner): class FirstSupported(MetaPlanner): def __init__(self, *planners): + super(FirstSupported, self).__init__() self._planners = planners def __str__(self): @@ -352,6 +357,7 @@ def plan(self, method, args, kw_args): class MethodMask(MetaPlanner): def __init__(self, planner, methods): + super(MethodMask, self).__init__() self._methods = set(methods) self._planner = planner self._planners = [planner] From 02e38bdd1d7c91483c2f158d0ed324bb5308f100 Mon Sep 17 00:00:00 2001 From: Chris Dellin Date: Sun, 2 Aug 2015 18:26:57 -0400 Subject: [PATCH 2/2] make sure to cast things to floats (not sure why, but this bit me at some point) --- src/prpy/serialization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/prpy/serialization.py b/src/prpy/serialization.py index b411b1e..139fc82 100644 --- a/src/prpy/serialization.py +++ b/src/prpy/serialization.py @@ -190,8 +190,8 @@ def serialize_transform(t): from openravepy import quatFromRotationMatrix return { - 'position': list(t[0:3, 3]), - 'orientation': list(quatFromRotationMatrix(t[0:3, 0:3])), + 'position': list(map(float,t[0:3, 3])), + 'orientation': list(map(float,quatFromRotationMatrix(t[0:3, 0:3]))), } # Deserialization.