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)
56 auto newRobot = baseRobot->clone(baseRobot->getName(), VirtualRobot::CollisionCheckerPtr(
new VirtualRobot::CollisionChecker()));
57 newRobot->inflateCollisionModel(inflation);
59 ARMARX_INFO <<
"created new robot clone n with inflation " << inflation;
60 robots[inflation].push_back(newRobot);
66 std::scoped_lock lock(mutex);
68 for (
auto& pair : robots)
70 size += pair.second.size();
77 std::scoped_lock lock(mutex);
79 for (
auto& pair : robots)
81 for (
auto& r : pair.second)
83 if (r.use_count() > 1)
94 std::scoped_lock lock(mutex);
96 for (
auto& pair : robots)
98 std::vector<VirtualRobot::RobotPtr> newList;
99 for (
auto& r : pair.second)
101 if (r.use_count() > 1)
103 newList.push_back(r);
110 pair.second = newList;