mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
simplify onNewFailure
give an elaborate reason for an empty overload that doesn't call the parent.
This commit is contained in:
parent
3d5cecd753
commit
aa733fcf5f
@ -867,11 +867,11 @@ void FallbacksPrivate::initializeExternalInterfaces(InterfaceFlags expected) {
|
|||||||
current_generator_ = children().begin();
|
current_generator_ = children().begin();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FallbacksPrivate::onNewFailure(const Stage& child, const InterfaceState* from, const InterfaceState* to) {
|
void FallbacksPrivate::onNewFailure(const Stage& /*child*/, const InterfaceState* /*from*/, const InterfaceState* /*to*/) {
|
||||||
// only react to failure if it's the last possible candidate failing
|
// This override is deliberately empty.
|
||||||
// otherwise there might still be a feasible solution
|
// The method prunes solution paths when a child failed to find a valid solution for it,
|
||||||
if(&child == &*children().back())
|
// but in Fallbacks the next child might still yield a successful solution
|
||||||
ContainerBasePrivate::onNewFailure(child, from, to);
|
// Thus pruning must only occur once the last child is exhausted (inside computeFromExternal)
|
||||||
}
|
}
|
||||||
|
|
||||||
void FallbacksPrivate::computeGenerate() {
|
void FallbacksPrivate::computeGenerate() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user