-
Notifications
You must be signed in to change notification settings - Fork 525
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
Better path quality when using MoveItCpp #1200
Comments
Hey Mark.
? That was you writing it, right? :) To be honest what you describe is exactly one of the use-cases I want to have solved in MTC, including different parallel containers and scheduling methods. Additionally wrappers can be used to define pipelines such as RRTConnect+CHOMP as Bryce looked into. I'm not saying the demos we have for these things are perfect or the underlying implementation exactly what you want yet, but I would definitely not want to go for yet another "some way to define planner approaches with multiple planners involved". Of course we could have some text declaration to describe the structure, but this quickly becomes more than "just use |
This seems like a reasonable wish, but the text does not explicitly explain how
results in:
I believe. How would the results of the planners ran in parallel be evaluated for their "wacky-ness"? |
Adding to Gijs statement, in my experience adding parallel methods to solve something will actually make the whole system *less* predictable. But it depends on the exact scenarios the solvers are used in.
Imagine you setup Pilz PTP as a first solver and fall back to RRT: *Usually* it will generate short intuitive motions. But if some noise renders the short motions infeasible you will suddenly get a wacky RRT path without expecting it.
On the other hand if the only source of rendering PTP infeasible can be a well-defined collision state of, e.g., another robot arm/human/... obviously getting in the way, the resulting behavior will be exactly what you expect: the obvious way is blocked, so the result will be less obvious.
But this is talking about fallbacks only. If you run planners in parallel and just pick the first one finished you have introduced another (discrete) source of randomness to your system that totally changes the nature of your path (e.g., fetch the sandwich from the fridge or go buy one at the closest kiosk).
|
I think it would be very nice to have a mode where you can run multiple planners in parallel, and the output will tell you which one solved fastest. Even better if you could preview the output of each planner to inspect visually -- but then this change becomes a lot bigger. What if you request a constrained motion? I don't think Pilz regards motion constraints.
^He's trying a technique to put himself in the shoes of the user ;) Could be more clearly stated, I think
I think the L2 norm would be better because it weights large joint angle changes more heavily automatically. |
Maybe this idea should be limited to running OMPL planning threads with different settings in parallel. |
My solution should be considered a hypothesis that is easily testable without setting up a whole bunch of other infrastructure. As @gavanderhoorn points out, there is no guarantee that wackiness is minimized. A more sophisticated scheme would allow you to express that some pipeline solutions might be preferable over others even if they take longer to return a solution. However, that requires a lot more engineering, whereas my proposed solution seems like a good first step to inform next steps. @v4hn, adding MTC would add a lot more complexity that's not really needed at this point. The RRTConnect+CHOMP example you give is already possible at this point without MTC using a Planning Request Adapter. I don't understand your comment why the proposed solution would make the whole system less predictable than the status quo. @AndyZe, previewing alternative solutions would increase scope and could perhaps be done at a later stage. Re. constraints, if a planning pipeline / planner cannot handle constraints, it should simply not be invoked on that planning request. Re. switching to L2 norm, that's a different question. |
@AndyZe limiting this idea to OMPL is already possible without any code change by using the AnytimePathShortening planner which allows you specify a portfolio of planners (and their parameters). This can be done in the ompl yaml config file that is part of a MoveIt config package. By choosing the right optimization objective (path length, smoothness, "wackiness") and termination condition (first feasible, convergence, time-out), you can experiment a lot. I like the idea of having something that is planning pipeline agnostic, though. |
I understand the thought, but I can't say I agree (you don't have to care of course 🐈).
These things either exist or are supported in the MTC structure. I can only reiterate my previous comment:
If you pool, e.g., PTP and RRTConnect as first-solution-wins you add another discrete random variable to your probabilistic model, thus changing the sample distribution. So where you previously sampled from |
Done with #1420 |
Is your feature request related to a problem? Please describe.
As a non-motion planning expert, I want predictable performance on easy to moderately-hard motion planning problems, where performance is broadly defined to include: fast planning times, "intuitive" motions, high repeatability. The default planner in the default planning pipeline (RRTConnect from the OMPL pipeline) is typically fast, requires minimal to no parameter tuning, but can produce wacky solutions on seemingly easy problems.
Describe the solution you'd like
I am looking at how
moveitcpp::PlanningComponent::plan
plans a path. I see it looks up the planning pipeline by some parameter, callsgeneratePlan
for the selected pipeline and returns the solution if it finds one. I would like to propose to augment the semantics of theparameters.planning_pipeline
parameter: instead of selecting one pipeline, you can select multiple, e.g., by setting its value to “ompl|stomp|pilz
”. The only change would then be inmoveitcpp::PlanningComponent::plan
: it spawns interruptible threads for each planning pipeline, picks the first found solution, terminates the other threads. All existing code will behave the same way. This seems simple enough to try and might result in faster, more deterministic behavior in many cases. With some extra code, we can keep some stats around insidemoveitcpp::PlanningComponent
that tracks how often each planner “wins” and how much time it needs. These stats could be printed/logged upon destruction. (You could also further augment the parameter syntax to allow pipelines to run sequentially until one succeeds, e.g., using>
as a separator: “pilz>stomp>ompl
”.)Describe alternatives you've considered
ompl_interface
in MoveIt measures distance as the unweighted L1 norm over joint angles. Weighting the distance in each joint differently might help a little bit, but picking “good” weights automatically may be hard. Alternatively, using swept volume as a distance measure to get more intuitive motions sounds nice, but is computationally too expensive. Another distance measure that is trying to capture some aspect of swept volume is to measure the distance between two robot configurations is to measure the sum of distances between the Cartesian positions of each joint in the two configurations (i.e. use FK to compute 3D positions of each joint, measure the sum of distances between corresponding 3D joint positions). Even that might be somewhat expensive. None of the alternative distance measures would eliminate the occasional wacky path. It would only make it more likely that the shortest path corresponds to what the user actually wants.The text was updated successfully, but these errors were encountered: