Skip to content

Commit

Permalink
Don't set reset observer callback & set CB after world_ is initialized (
Browse files Browse the repository at this point in the history
  • Loading branch information
sjahr authored Aug 6, 2024
1 parent fc79933 commit 38c1fd0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions moveit_core/planning_scene/src/planning_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<collision_detection::World>(*parent_->world_);
world_const_ = world_;
setCollisionObjectUpdateCallback(parent_->current_world_object_update_callback_);

// record changes to the world
world_diff_ = std::make_shared<collision_detection::WorldDiff>(world_);
Expand Down Expand Up @@ -1214,9 +1214,6 @@ void PlanningScene::decoupleParent()
(object_types_.value())[it->first] = it->second;
}
}

setCollisionObjectUpdateCallback(nullptr);

parent_.reset();
}

Expand Down

0 comments on commit 38c1fd0

Please sign in to comment.