Skip to content

Commit

Permalink
Minor bug fix in TpsnRegistration parameters and callback args in tra…
Browse files Browse the repository at this point in the history
…nsfer,
  • Loading branch information
alexlee-gk committed Feb 25, 2015
1 parent b5905ba commit 04df21e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lfd/registration/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ def register(self, demo, test_scene_state, callback=None, args=()):
outlierprior=self.outlierprior, outlierfrac=self.outlierfrac,
callback=callback, args=args)

return TpsnRpmRegistration(demo, test_scene_state, corr_lm, corr_rs, self.rad_final, self.radn_final, self.reg_final, self.rot_coef)
return TpsnRpmRegistration(demo, test_scene_state, f, corr_lm, corr_rs, self.rad_final, self.radn_final, self.reg_final, self.rot_reg)

def cost(self, demo, test_scene_state):
raise NotImplementedError
10 changes: 5 additions & 5 deletions lfd/transfer/registration_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self, registration_factory, trajectory_transferer):
self.registration_factory = registration_factory
self.trajectory_transferer = trajectory_transferer

def transfer(self, demo, test_scene_state, callback=None, plotting=False):
def transfer(self, demo, test_scene_state, callback=None, args=(), plotting=False):
"""Registers demonstration scene onto the test scene and uses this registration to transfer the demonstration trajectory
Args:
Expand All @@ -26,8 +26,8 @@ def transfer(self, demo, test_scene_state, callback=None, plotting=False):
raise NotImplementedError

class TwoStepRegistrationAndTrajectoryTransferer(RegistrationAndTrajectoryTransferer):
def transfer(self, demo, test_scene_state, callback=None, plotting=False):
reg = self.registration_factory.register(demo, test_scene_state, callback=callback)
def transfer(self, demo, test_scene_state, callback=None, args=(), plotting=False):
reg = self.registration_factory.register(demo, test_scene_state, callback=callback, args=args)
test_aug_traj = self.trajectory_transferer.transfer(reg, demo, plotting=plotting)
return test_aug_traj

Expand All @@ -50,8 +50,8 @@ def __init__(self, registration_factory, trajectory_transferer,
self.use_collision_cost = use_collision_cost
self.init_trajectory_transferer = init_trajectory_transferer

def transfer(self, demo, test_scene_state, callback=None, plotting=False):
reg = self.registration_factory.register(demo, test_scene_state, callback=callback)
def transfer(self, demo, test_scene_state, callback=None, args=(), plotting=False):
reg = self.registration_factory.register(demo, test_scene_state, callback=callback, args=args)

handles = []
if plotting:
Expand Down

0 comments on commit 04df21e

Please sign in to comment.