Skip to content

Commit 426e5a1

Browse files
committed
add minimal implementation of OptimizingPlannerSmoother (e.g. for chomp as a smoother)
1 parent 9413adb commit 426e5a1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/prpy/planning/retimer.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,24 @@ def RetimeTrajectory(self, robot, path, **kw_args):
210210
str(status)))
211211

212212
return output_traj
213+
214+
215+
class OptimizingPlannerSmoother(BasePlanner):
216+
217+
def __init__(self, optimizing_planner, **kwargs):
218+
super(OptimizingPlannerSmoother, self).__init__()
219+
self.planner = optimizing_planner
220+
self.saved_kwargs = kwargs
221+
222+
def __str__(self):
223+
return 'OptimizingPlannerSmoother({})'.format(str(self.planner))
224+
225+
@PlanningMethod
226+
def RetimeTrajectory(self, robot, path, options=None, **kwargs):
227+
logger.warning(
228+
'OptimizingPlannerSmoother is very experimental!')
229+
this_kwargs = dict(kwargs)
230+
this_kwargs.update(self.saved_kwargs)
231+
traj = self.planner.OptimizeTrajectory(robot, path, **this_kwargs)
232+
return traj
233+

0 commit comments

Comments
 (0)