mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
fix autocomplete typo
This commit is contained in:
parent
4bee034768
commit
21f3d95128
@ -886,8 +886,8 @@ void MergerPrivate::onNewGeneratorSolution(const SolutionBase& s) {
|
|||||||
void MergerPrivate::mergeAnyCombination(const ChildSolutionMap& all_solutions, const SolutionBase& current,
|
void MergerPrivate::mergeAnyCombination(const ChildSolutionMap& all_solutions, const SolutionBase& current,
|
||||||
const planning_scene::PlanningSceneConstPtr& start_scene,
|
const planning_scene::PlanningSceneConstPtr& start_scene,
|
||||||
const Spawner& spawner) {
|
const Spawner& spawner) {
|
||||||
std::vector<size_t> indeces; // which solution index was considered last for i-th child?
|
std::vector<size_t> indices; // which solution index was considered last for i-th child?
|
||||||
indeces.reserve(children().size());
|
indices.reserve(children().size());
|
||||||
|
|
||||||
ChildSolutionList sub_solutions;
|
ChildSolutionList sub_solutions;
|
||||||
sub_solutions.reserve(children().size());
|
sub_solutions.reserve(children().size());
|
||||||
@ -895,8 +895,8 @@ void MergerPrivate::mergeAnyCombination(const ChildSolutionMap& all_solutions, c
|
|||||||
// initialize vector of sub solutions
|
// initialize vector of sub solutions
|
||||||
for (const auto& pair : all_solutions) {
|
for (const auto& pair : all_solutions) {
|
||||||
// all children, except current solution's creator, start with zero index
|
// all children, except current solution's creator, start with zero index
|
||||||
indeces.push_back(pair.first != current.creator() ? 0 : pair.second.size() - 1);
|
indices.push_back(pair.first != current.creator() ? 0 : pair.second.size() - 1);
|
||||||
sub_solutions.push_back(pair.second[indeces.back()]);
|
sub_solutions.push_back(pair.second[indices.back()]);
|
||||||
}
|
}
|
||||||
while (true) {
|
while (true) {
|
||||||
merge(sub_solutions, start_scene, spawner);
|
merge(sub_solutions, start_scene, spawner);
|
||||||
@ -906,13 +906,13 @@ void MergerPrivate::mergeAnyCombination(const ChildSolutionMap& all_solutions, c
|
|||||||
for (auto it = all_solutions.cbegin(), end = all_solutions.cend(); it != end; ++it, ++child) {
|
for (auto it = all_solutions.cbegin(), end = all_solutions.cend(); it != end; ++it, ++child) {
|
||||||
if (it->first == current.creator())
|
if (it->first == current.creator())
|
||||||
continue; // skip current solution's child
|
continue; // skip current solution's child
|
||||||
if (++indeces[child] >= it->second.size()) {
|
if (++indices[child] >= it->second.size()) {
|
||||||
indeces[child] = 0; // start over with zero
|
indices[child] = 0; // start over with zero
|
||||||
sub_solutions[child] = it->second[indeces[child]];
|
sub_solutions[child] = it->second[indices[child]];
|
||||||
continue; // and continue with next child
|
continue; // and continue with next child
|
||||||
}
|
}
|
||||||
// otherwise, a new solution combination is available
|
// otherwise, a new solution combination is available
|
||||||
sub_solutions[child] = it->second[indeces[child]];
|
sub_solutions[child] = it->second[indices[child]];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (child == children().size()) // all combinations exhausted?
|
if (child == children().size()) // all combinations exhausted?
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user