Skip to content

Commit d59acdb

Browse files
committed
Fix allowCollisions(object, enable_collision)
Call ACM::setDefaultEntry to also cover objects that are not yet known to the ACM.
1 parent 45ca1a6 commit d59acdb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/stages/modify_planning_scene.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ void ModifyPlanningScene::allowCollisions(planning_scene::PlanningScene& scene,
111111
collision_detection::AllowedCollisionMatrix& acm = scene.getAllowedCollisionMatrixNonConst();
112112
bool allow = invert ? !pairs.allow : pairs.allow;
113113
if (pairs.second.empty()) {
114-
for (const auto& name : pairs.first)
114+
for (const auto& name : pairs.first) {
115+
acm.setDefaultEntry(name, allow);
115116
acm.setEntry(name, allow);
117+
}
116118
} else
117119
acm.setEntry(pairs.first, pairs.second, allow);
118120
}

0 commit comments

Comments
 (0)