quangounet / bimanual

Bimanual manipulation
4 stars 1 forks source link

Bug in ccplanner shortcut method #3

Closed zhouxian closed 7 years ago

zhouxian commented 7 years ago

Sometimes timestamps don't match in path shorcutting. Need to fix this later.

Puttichai commented 7 years ago

Are you talking about exception raised from the following chunk of code (this line)?

if not 0 <= t0 < t1 <= lie_traj.duration:
  raise Exception('Incorrect time stamp.')

I have checked that. It turned out to be because of some numerical discrepancies between t1 and lie_traj.duration. I suggest changing it to something like

if (t0 < -epsilon):
  # do something
if (t0 > t1 + epsilon):
  # do something.
if (t1 > lie_traj.duration + epsilon):
  # do something
zhouxian commented 7 years ago

Fixed in commit 7d9b8a. Note: Since the sample waypoints taken for shortcutting could be those generated by interpolation in planning, which is not perfectly attached to the object transformation at the corresponding timestamp, it sometimes cannot pass waypoints continuity checking in shortcut() and raises exceptions. Now tolerance eps for checking waypoints continuity is set to a relatively big value to avoid such issue. We need to see if there will be any notable jerk later when executing the trajectory with real robots.