Gắp – đặt là "hello world" của tay máy. Isaac Sim đi kèm sẵn lớp tay máy, tay kẹp và bộ điều khiển gắp – đặt mẫu cho Franka và UR10, đủ để bạn chạy ngay rồi thay bằng logic của mình.
- Tạo SingleManipulator có tay kẹp song song.
- Chạy và hiểu PickPlaceController.
- Biết cách làm cho vật không trượt khỏi tay kẹp và khi nào dùng giác hút.
1. SingleManipulator và ParallelGripper

SingleManipulator là articulation biết đâu là đầu công tác (end effector) và có một tay kẹp gắn kèm. ParallelGripper mô tả hai khớp ngón: vị trí mở, vị trí đóng, bước thay đổi mỗi lệnh.
2. Chương trình gắp – đặt
Dựa trên franka_pick_up.py của Isaac Sim 5.1:
from isaacsim import SimulationApp
simulation_app = SimulationApp({"headless": False})
import numpy as np
from isaacsim.core.api import World
from isaacsim.core.api.objects import DynamicCuboid
from isaacsim.core.utils.stage import add_reference_to_stage
from isaacsim.robot.manipulators import SingleManipulator
from isaacsim.robot.manipulators.grippers import ParallelGripper
from isaacsim.robot.manipulators.examples.franka.controllers.pick_place_controller import PickPlaceController
from isaacsim.storage.native import get_assets_root_path
world = World(stage_units_in_meters=1.0)
world.scene.add_default_ground_plane()
prim = add_reference_to_stage(get_assets_root_path() + "/Isaac/Robots/FrankaRobotics/FrankaPanda/franka.usd",
"/World/Franka")
prim.GetVariantSet("Gripper").SetVariantSelection("AlternateFinger")
gripper = ParallelGripper(
end_effector_prim_path="/World/Franka/panda_rightfinger",
joint_prim_names=["panda_finger_joint1", "panda_finger_joint2"],
joint_opened_positions=np.array([0.05, 0.05]),
joint_closed_positions=np.array([0.02, 0.02]),
action_deltas=np.array([0.01, 0.01]),
)
franka = world.scene.add(SingleManipulator(prim_path="/World/Franka", name="franka",
end_effector_prim_path="/World/Franka/panda_rightfinger",
gripper=gripper))
cube = world.scene.add(DynamicCuboid(prim_path="/World/Cube", name="cube",
position=np.array([0.3, 0.3, 0.3]),
scale=np.array([0.0515, 0.0515, 0.0515]), size=1.0,
color=np.array([0, 0, 1])))
franka.gripper.set_default_state(franka.gripper.joint_opened_positions)
world.reset()
ctrl = PickPlaceController(name="pp", gripper=franka.gripper, robot_articulation=franka)
art_ctrl = franka.get_articulation_controller()
goal = np.array([-0.3, -0.3, 0.0515 / 2.0])
while simulation_app.is_running():
world.step(render=True)
if world.is_playing():
actions = ctrl.forward(
picking_position=cube.get_local_pose()[0],
placing_position=goal,
current_joint_positions=franka.get_joint_positions(),
end_effector_offset=np.array([0, 0.005, 0]),
)
art_ctrl.apply_action(actions)
if ctrl.is_done():
print("Đã gắp và đặt xong")
simulation_app.close()
(Để gọn, đoạn trên bỏ phần xử lý Play/Stop – hãy thêm mẫu vòng lặp ở bài #11 khi dùng thật.)

3. Bên trong PickPlaceController

Bộ điều khiển là một máy trạng thái: mỗi pha có một điểm đích cho đầu công tác, và tốc độ tiến qua từng pha do danh sách tham số events_dt quyết định (giá trị nhỏ = pha kéo dài nhiều bước). Việc đi từ điểm này sang điểm khác do một bộ điều khiển chuyển động (RMPflow) đảm nhiệm, tay kẹp đóng/mở ở pha 3 và 7. Muốn đổi logic (gắp từ băng tải, xếp chồng), bạn viết máy trạng thái riêng và dùng RMPflow/IK của bài #15 cho phần di chuyển.
4. Vật bị tuột – kiểm tra gì?
- Ma sát giữa ngón và vật: gán physics material ma sát cao (0,8 – 1,0) cho ngón hoặc vật.
- Lực kẹp: stiffness và max force của drive ngón; mục tiêu "đóng" nhỏ hơn bề rộng vật một chút để drive luôn ép.
- Bước vật lý nhỏ hơn (1/120 – 1/240 s) cho tiếp xúc ổn định.
- Bản 5.1 bổ sung tùy chọn giải tiếp xúc của articulation sau cùng để giảm hiện tượng ngón xuyên vào vật, kèm tutorial chỉnh khớp tay kẹp.
- Khối lượng vật hợp lý (không để 0,001 kg hay 100 kg với khối 5 cm).
5. Giác hút: Surface Gripper
Với thùng carton, tấm phẳng, robot xếp pallet thường dùng giác hút. Extension Surface Gripper (Create > Robots > Surface Gripper) mô phỏng nó bằng các khớp được tạo khi bề mặt chạm vật và hủy khi "nhả", có giới hạn lực kéo/cắt. Ví dụ UR10 xếp thùng (ur10_pick_up.py) dùng loại tay kẹp này.
standalone_examples/api/isaacsim.robot.manipulators có ví dụ cho UR10, UR10e, Denso Cobotta. Cách làm giống hệt – chỉ khác đường dẫn asset, tên khớp ngón và bộ điều khiển chuyển động tương ứng.Bài tiếp theo (#15): motion generation – IK, RMPflow, RRT và quỹ đạo tối ưu thời gian.

Tài liệu tham khảo
- Core API Tutorial: Adding a Manipulator Robot
- Surface Gripper Extension
- Tutorial 9: Pick and Place Example
- Ví dụ standalone đi kèm Isaac Sim 5.1 (GitHub isaac-sim/IsaacSim)
Loạt bài "Robot với Isaac Sim" viết theo tài liệu và mã nguồn NVIDIA Isaac Sim 5.1.0. Isaac Sim, Omniverse, PhysX, RTX là thương hiệu của NVIDIA.
Một số ảnh minh họa lấy từ tài liệu NVIDIA Isaac Lab (github.com/isaac-sim/IsaacLab), Copyright © 2022-2025 The Isaac Lab Project Developers, phát hành theo giấy phép BSD-3-Clause; ảnh được thu nhỏ/ghép, giữ nguyên nội dung.