From: Tom T. <tom...@ve...> - 2011-06-06 21:19:02
|
I'm trying to tease out how the "intermediate level" goal definitions are accomplished in python. All of the python examples use simple, singular representations of the goal. I've been unable to successfully subclass the goal class in python. My have attempts have been of the form: class MyGoal(base.Goal): def __init__(self,si): super(MyGoal,self).__init__(si) def isSatisfied(self, state, tol=.01): ... ... prob = base.ProblemDefinition(si) goal = MyGoal(si) prob.setGoal(goal) prob.addStartState(s1) planner = geometric.RRT(si) planner.setProblemDefinition(prob) planner.setup() solved = planner.solve(10.0) this errors with something inscrutable (to me): TypeError: No to_python (by-value) converter found for C++ type: double And this error occurs before isSatisfied gets called. Of course it could be a bug in my code but I don't see how. I'm hoping that someone can confirm that this part of the API works as expected. Better still would be to say: "You didn't look hard enough, bonehead! There is a code sample right here <link/>" Thanks, all -- Tom Temple, PhD. Scientist tom...@ve... 617-674-8544 (office) 617-833-5130 (mobile) www.vecna.com Cambridge Research Laboratory Vecna Technologies, Inc. 36 Cambridge Park Drive Cambridge, MA 02140 Office: (617) 864-0636 Fax: (617) 864-0638 Better Technology, Better World (TM) |