Skip to content

Commit

Permalink
remove object removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Svastits committed Oct 20, 2023
1 parent 39835fe commit 52557ec
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions kuka_driver_examples/eci_demo/src/MoveitBasicPlan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ bool AttachObject(const std::string & object_id)
moveit_msgs::msg::PlanningScene planning_scene;
planning_scene.name = "scene";
moveit_msgs::msg::AttachedCollisionObject attached_object;
moveit_msgs::msg::CollisionObject remove_object;

attached_object.link_name = "flange";
auto it = std::find_if(
Expand All @@ -170,16 +169,13 @@ bool AttachObject(const std::string & object_id)
});
if (it != collision_objects_.end()) {
attached_object.object = *it;
remove_object = *it;
} else {
RCLCPP_INFO(LOGGER, "Object not found");
return false;
}

// Carry out the REMOVE + ATTACH operation
RCLCPP_INFO(LOGGER, "Attaching the object to the hand and removing it from the world.");
remove_object.operation = remove_object.REMOVE;
planning_scene.world.collision_objects.push_back(remove_object);
planning_scene.robot_state.attached_collision_objects.push_back(attached_object);
planning_scene.robot_state.is_diff = true;
planning_scene.is_diff = true;
Expand Down

0 comments on commit 52557ec

Please sign in to comment.