From 38c1fd00ad60fb3a58608d111c4213ebcc4fa109 Mon Sep 17 00:00:00 2001 From: Sebastian Jahr Date: Tue, 6 Aug 2024 15:13:19 +0200 Subject: [PATCH] Don't set reset observer callback & set CB after world_ is initialized (#2950) --- moveit_core/planning_scene/src/planning_scene.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/moveit_core/planning_scene/src/planning_scene.cpp b/moveit_core/planning_scene/src/planning_scene.cpp index 0b955ac888..8655117fb8 100644 --- a/moveit_core/planning_scene/src/planning_scene.cpp +++ b/moveit_core/planning_scene/src/planning_scene.cpp @@ -212,12 +212,12 @@ PlanningScene::PlanningScene(const PlanningSceneConstPtr& parent) : parent_(pare setStateFeasibilityPredicate(parent->getStateFeasibilityPredicate()); setMotionFeasibilityPredicate(parent->getMotionFeasibilityPredicate()); - setCollisionObjectUpdateCallback(parent_->current_world_object_update_callback_); // maintain a separate world. Copy on write ensures that most of the object // info is shared until it is modified. world_ = std::make_shared(*parent_->world_); world_const_ = world_; + setCollisionObjectUpdateCallback(parent_->current_world_object_update_callback_); // record changes to the world world_diff_ = std::make_shared(world_); @@ -1214,9 +1214,6 @@ void PlanningScene::decoupleParent() (object_types_.value())[it->first] = it->second; } } - - setCollisionObjectUpdateCallback(nullptr); - parent_.reset(); }