26 #include <VirtualRobot/CollisionDetection/CollisionChecker.h>
27 #include <VirtualRobot/Robot.h>
37 std::vector<VirtualRobot::RobotPtr> tempVec;
38 for (
size_t i = 0; i < defaultSize; ++i)
47 std::scoped_lock lock(mutex);
48 for (
auto& r : robots[inflation])
50 if (r.use_count() == 1)
57 auto newRobot = baseRobot->clone(
59 VirtualRobot::CollisionCheckerPtr(
new VirtualRobot::CollisionChecker()));
60 newRobot->inflateCollisionModel(inflation);
62 ARMARX_INFO <<
"created new robot clone n with inflation " << inflation;
63 robots[inflation].push_back(newRobot);
70 std::scoped_lock lock(mutex);
72 for (
auto& pair : robots)
74 size += pair.second.size();
82 std::scoped_lock lock(mutex);
84 for (
auto& pair : robots)
86 for (
auto& r : pair.second)
88 if (r.use_count() > 1)
100 std::scoped_lock lock(mutex);
102 for (
auto& pair : robots)
104 std::vector<VirtualRobot::RobotPtr> newList;
105 for (
auto& r : pair.second)
107 if (r.use_count() > 1)
109 newList.push_back(r);
116 pair.second = newList;