-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add path profile to plan and move instruction and modify simple plan profile interface #159
Add path profile to plan and move instruction and modify simple plan profile interface #159
Conversation
169cd20
to
05baa86
Compare
Does this not duplicate the purpose of the composite instruction profile? |
I don't think so. The composite profile is a way to apply a set of cost and constraints to all instruction within the composite like velocity, acceleration, and jerk smoothing. The path profile will be used for two purposes. The first is for the simple planner during the interpolation where it will assign the path profile as the waypoint profile for interpolated waypoints. The second is during execution where it would use the path profile when transitioning and the waypoint profile for the waypoint. |
05baa86
to
ebde525
Compare
If we're planning on doing the refactor proposed in #156, it seems like
Why couldn't an execution module just use the profile string in the composite instruction that holds a particular instruction for "transitions"? I'm not necessarily opposed to this change, but it seems like the functionality you're looking for is already captured by the composite instruction profile string and the updated design concept for planner configuration |
My original thought for the composite instruction profile was for solver parameters and for cost and constraints which require a series of instructions as input. Then Plan/Move profiles apply specifically to the instruction which would be the same for Path Profile which has been my separation used. I put the graphic together below showing my comparison where the middle is my desired for the execution where each plan instruction in the original program has different profiles for the transition. |
I see. Why don't you just nest each plan instruction in a second layer of composite instructions? That seems like the intuitive way to convey to the simple planner that anything generated for a particular waypoint should be independent of the other instructions. Then you could use the profile of the nested composite as the path profile |
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.
Looks fine overall to me. I like the concept. My main question would be if we should remove the PlanInstructionType and MoveInstructionType. Is there a case where this profile could not (or should not) be used to encode those types? It seems like this is just a more general case of those.
tesseract_command_language/include/tesseract_command_language/move_instruction.h
Outdated
Show resolved
Hide resolved
tesseract_command_language/include/tesseract_command_language/move_instruction.h
Outdated
Show resolved
Hide resolved
tesseract_command_language/include/tesseract_command_language/plan_instruction.h
Outdated
Show resolved
Hide resolved
This would create complications at the motion planners due to the previous described separation between the composite profile and plan profile. Currently the OMPL, TrajOpt, Descartes and TrajOptIfopt will all fail if you have nested composites not that this could be changed but it expects a single composite of instructions. The challenge is how do you handle the sub composite instructions profiles relative to using the global composite profile. In the case of trajopt which one applies the velocity smoothing and collision avoidance. I think keeping this separation between the composite profile and plane profile along with only allowing a single composite with instructions as input to the motion planner simplifies things in the motion planners. |
In addition, I wanted the command language to align with industrial robot programming and having a two profiles for a plan instructions does seem to align. In the case of Fanuc you have Termination Type and Motion Options where for our plan instruction the profile is the termination type and the path profile is the motion options. |
This is a good observation. Based on issue #158, it aligns since the simple planner will be doing the interpolation and allow for more complicated interpolation approaches. Since we usually have different profiles for linear versus freespace move, we would move the linear/freespace type to the simple planner. |
Nesting composites does have some tricky implications and it would be complicated to do. Maybe we think harder about that when we start refactoring the other planners. I suppose this is a better short-term alternative, but it feels like there should be a better way to do this. You might consider renaming from |
I am not fully understanding the suggested remaining. The path profile (I originally had transition profile) applies during the transition from the previous plan instruction to the current plan instruction where the profile is defined. This applies to anything upstream of the current instruction until the previous plan instruction. Do you like transition profile better? |
Yes, but it is the "current" instruction that controls the profile of any "transition" instruction generated from it (i.e. its children in a sense). It doesn't matter if the generated instructions get placed before or after the instruction used to define their properties, so the prefixes |
I see your point of view and would agree if the primary intent was for interpolation, but that is not the intent of the path profile. The path profile would still be needed regardless of interpolation because the primary function is to define different set of cost/constraints on the path taken versus the termination waypoint similar to industrial robots. The interpolation is only done because the current motion planners are discrete planners and the interpolated points would still have a need for the path profile. If we every updated trajopt to operate on splines, then interpolation would not be need but the path profile is still needed. |
The path profile will eventually replace the plan_type as @mpowelson suggested providing more flexibility instead of the hard coded LINEAR, FREESPACE, and CIRCULAR. |
11728d4
to
483aa2a
Compare
Codecov Report
@@ Coverage Diff @@
## master #159 +/- ##
==========================================
+ Coverage 66.33% 66.53% +0.19%
==========================================
Files 199 199
Lines 9407 9478 +71
==========================================
+ Hits 6240 6306 +66
- Misses 3167 3172 +5
|
Okay; my concern primarily about semantics now and it doesn't really make a practical difference. We should at least document the intent of the |
This adds a path profile for both move and plan instruction to allows using different costs/constraints for the path to the waypoint versus the waypoint itself.
Updates the simple planners interface to provide next instruction.