-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/mimic traj #361
base: master
Are you sure you want to change the base?
Feature/mimic traj #361
Conversation
Conflicts: src/prpy/planning/cbirrt.py
…lization. Added logic to get mimic trajectories. Changed parameter ordering to ensure parameters read in proper order
Conflicts: src/prpy/planning/cbirrt.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add an argument for list of mimic_bodies instead of save_mimic_trajectories
, and do the same process when the list is nonempty. That way, we don't have to loop over all bodies in traj_bodies
, and checking for number of dofs (in line 246) would be easy since we know what the goal_config
would contain.
@@ -163,7 +164,7 @@ def PlanToTSR(self, robot, tsr_chains, smoothingitrs=100, **kw_args): | |||
|
|||
def Plan(self, robot, smoothingitrs=None, timelimit=None, allowlimadj=0, | |||
jointstarts=None, jointgoals=None, psample=None, tsr_chains=None, | |||
extra_args=None, **kw_args): | |||
extra_args=None, save_mimic_trajectories=False, **kw_args): | |||
""" | |||
@param allowlimadj If True, adjust the joint limits to include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add docstring for save_mimic_trajectories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this also take a dict as an argument and just save the trajectory in there, i.e. a user-supplied out-arg? Then the user could do what they want with the trajectory.
@@ -287,6 +298,8 @@ def Plan(self, robot, smoothingitrs=None, timelimit=None, allowlimadj=0, | |||
contextlib.nested(*mimicbody_savers), save_dof_limits(robot): | |||
response = problem.SendCommand(args_str, True) | |||
|
|||
with CollisionOptionsStateSaver(env.GetCollisionChecker(), options): | |||
response = problem.SendCommand(args_str, True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block is redundant. See line 299.
if len(jointgoals) > 1: | ||
is_endpoint_deterministic = False | ||
|
||
raw_input("Continue?") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be removed.
Typically we plan with CBiRRT and we are only concerned with the trajectory of the robot. However, we can perform constrained planning where the robot and an object move together. Our example case has been HERB opening the frig. Therefore this extracts the non-robot trajectories from CBIRRT. To not disrupt the prpy planning pipeline, the class saves the other trajectories such that the user can grab them later.
There is an unresolved issue that I don't know how to deal with, detailed on line 239.