26 #include <VirtualRobot/CollisionDetection/CollisionChecker.h>
37 std::vector<VirtualRobot::RobotPtr> tempVec;
38 for (
size_t i = 0; i < defaultSize; ++i)
46 std::scoped_lock lock(mutex);
47 for (
auto& r : robots[inflation])
49 if (r.use_count() == 1)
54 auto newRobot = baseRobot->clone(baseRobot->getName(), VirtualRobot::CollisionCheckerPtr(
new VirtualRobot::CollisionChecker()));
55 newRobot->inflateCollisionModel(inflation);
57 ARMARX_DEBUG <<
"created new robot clone n with inflation " << inflation;
58 robots[inflation].push_back(newRobot);
64 std::scoped_lock lock(mutex);
66 for (
auto& pair : robots)
68 size += pair.second.size();
75 std::scoped_lock lock(mutex);
77 for (
auto& pair : robots)
79 for (
auto& r : pair.second)
81 if (r.use_count() > 1)
92 std::scoped_lock lock(mutex);
94 for (
auto& pair : robots)
96 std::vector<VirtualRobot::RobotPtr> newList;
97 for (
auto& r : pair.second)
99 if (r.use_count() > 1)
101 newList.push_back(r);
108 pair.second = newList;