-
Notifications
You must be signed in to change notification settings - Fork 156
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
Discontinuity in trajectory #485
Comments
After some more testing, I am pretty sure that the "Time out" error is what is causing this issue. I've increased the timeout setting in the stage and the number of solutions with the issue went down dramatically. Any clue how a not fully computed stage is being added to the solution? |
Thanks for reporting this issue. So far I was not able to reproduce the issue (timed-out solutions are not considered on my side). Do you mind providing a minimal example reproducing your issue? Which versions of MTC and MoveIt are you exactly working with? |
I am using humble binaries for MoveIt, and humble branch for MTC. |
Hi @rhaschke and @leander2189, I encountered a similar issue in April/May of this year, but I didn't have the time to investigate the root cause back then. After reading this issue, I tried extending the timeout, which has helped to significantly reduce incorrect solutions, although occasional discontinuous paths still pop up. I was utilizing PRM* initially, and I also tried RRT with the same results. Same configuration: moveit from binaries and MTC from humble branch. |
It could be that the starting position is invalid. This combined with default planning adapters like:
results in ompl just using some other position instead of the given start pose -> Discontinuity in trajectory e.x.: the solution of some state is not collision checked. You could remove the auto applicability_filter = std::make_unique<stages::PredicateFilter>("filter collision", std::move(stage));
applicability_filter->setPredicate([object](const SolutionBase& s, std::string& comment) {
if (s.end()->scene()->isStateColliding())
{
collision_detection::CollisionResult::ContactMap contacts;
s.end()->scene()->getCollidingPairs(contacts);
comment = "collision";
for(auto c : contacts) {
comment += " between '" + c.first.first + "' and '" + c.first.second + "'";
}
return false;
}
return true;
}); |
If the starting position is invalid, wouldn't every solution be the same? The situation that we are seeing is that only one of the solutions proposed by MTC is discontinous and the others are usually ok. In fact, further testing has led us to discover that the "jump" is between the last point of the trajectory and the goal position |
Normally (with the given code) the connect stage solves once for each pair e.g.
If you are sure that the error is with the planner you could maybe try to extract the subsolutions until you reach the state which is used as start for ompl and the given goal to reproduce where ompl produces a discontinuity I am not seeing your complete task but given the image section (complex task) i assume the error lies somewhere else. If you can provide some example we could try to work it out. |
Yeah the error lies somewhere in the Connect stage. This is a good idea, we already implemented some solution checking to automatically detect the error, so I think we can save that state somehow to improve reproducibility.
I am working on it. My code is tightly coupled with a lot of other stuff (it's part of a much bigger project), so it's taking me quite long to extract the relevant code into a standalone executable. |
@leander2189, instead of extracting your code into a standalone executable, try to reproduce the issue with |
Hi, I pushed here: https://github.com/leander2189/dtc_test a project with a motion planning that sometimes reproduces the error. I've been playing with stage timeouts but the test not always causes the discontinuity. In case that helps debugging, I got the log and a screenshot of an execution where the discontinuity happens. I've been diving through the log file but there are too many lines and I can't find anything in there. Any help on how to locate the stage that is failing would be appreciated. Solution #111 with a total cost of 59.7775, and the stage that fails is "move_to_fastener_registration" #8 with a partial cost of 8.3445. Screencast.from.10-09-2023.10.19.50.AM.webm |
Thanks for providing the example. I'm available to reproduce the issue (after reducing the connect-stage timeout to 0.1s) and will have a look now. |
I noticed several issues:
|
I was encountering this problem and added this check in the Here is what I added to the
One of the reasons for discontinuity came from using pick_ik as our IK solver. The joint limits were being mixed up (Ref - PickNikRobotics/pick_ik#54) and hence we would get partial solutions if the end goal was out of joint limits. |
I found the underlying culprit in MoveIt2. A fix is proposed in moveit/moveit2#2455. |
Awesome! |
I am building a complex movment comprised of several stages. In one of them, a connecting stage using RRT sampling planner, a discontinuty appears, and the movement is taken as correct
move_fail.mp4
I suspect that the issue might not be with MTC itself, but rather with the sampling planner configuration.
Can you point me in which direction I should look to debug this issue?
That stage is build using this:
I am also getting some logs that I suspect may be related, but don't know which config parameters I should tweak
The text was updated successfully, but these errors were encountered: