mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
add more asserts to onNewSolution
Strictly speaking there is no need for the invariant, but if something violates it a stage computed something it wasn't meant to.
This commit is contained in:
parent
3b6c13e26b
commit
b7f80939ef
@ -353,7 +353,13 @@ inline void updateStatePrios(const SolutionSequence::container_type& partial_sol
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SerialContainer::onNewSolution(const SolutionBase& current) {
|
void SerialContainer::onNewSolution(const SolutionBase& current) {
|
||||||
|
// failures should never trigger this callback
|
||||||
assert(!current.isFailure());
|
assert(!current.isFailure());
|
||||||
|
|
||||||
|
// states of solution must be active, otherwise this would not have been computed
|
||||||
|
assert(current.start()->priority().enabled());
|
||||||
|
assert(current.end()->priority().enabled());
|
||||||
|
|
||||||
auto impl = pimpl();
|
auto impl = pimpl();
|
||||||
const Stage* creator = current.creator();
|
const Stage* creator = current.creator();
|
||||||
auto& children = impl->children();
|
auto& children = impl->children();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user