Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Svastits committed Oct 25, 2023
1 parent 914e7e4 commit 7cd25aa
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions kuka_driver_examples/eci_demo/src/MoveitDepalletizingExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ class Depalletizer : public MoveitExample
for (int k = 0; k < 3; k++) {
for (int j = 0; j < 3; j++) {
for (int i = 0; i < 3; i++) {
moveit_msgs::msg::CollisionObject pallet_object;
pallet_object.header.frame_id = move_group_interface_->getPlanningFrame();

std::string obejct_name = "pallet_" + std::to_string(9 * k + 3 * j + i);
RCLCPP_INFO(LOGGER, "Going for object %s", obejct_name.c_str());
std::string object_name = "pallet_" + std::to_string(9 * k + 3 * j + i);
RCLCPP_INFO(LOGGER, "Going for object %s", object_name.c_str());

// Go to pickup
Eigen::Isometry3d pose = Eigen::Isometry3d(
Expand All @@ -47,9 +44,9 @@ class Depalletizer : public MoveitExample
}

// Attach object
AttachObject(obejct_name);
AttachObject(object_name);

// Drop off
// Drop off to -0.3, 0.0, 0.35 pointing down
Eigen::Isometry3d dropoff_pose = Eigen::Isometry3d(
Eigen::Translation3d(-0.3, 0.0, 0.35) * Eigen::Quaterniond(0, 1, 0, 0));
auto drop_trajectory = planToPointUntilSuccess(
Expand All @@ -62,7 +59,7 @@ class Depalletizer : public MoveitExample
}

// Detach
DetachAndRemoveObject(obejct_name);
DetachAndRemoveObject(object_name);
}
}
}
Expand Down

0 comments on commit 7cd25aa

Please sign in to comment.