{ "cells": [ { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Wed Dec 11 15:28:03 2024 \n", "+-----------------------------------------------------------------------------+\n", "| NVIDIA-SMI 525.116.04 Driver Version: 525.116.04 CUDA Version: 12.0 |\n", "|-------------------------------+----------------------+----------------------+\n", "| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |\n", "| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |\n", "| | | MIG M. |\n", "|===============================+======================+======================|\n", "| 0 NVIDIA GeForce ... On | 00000000:3D:00.0 Off | N/A |\n", "| 27% 28C P8 10W / 250W | 3MiB / 11264MiB | 0% Default |\n", "| | | N/A |\n", "+-------------------------------+----------------------+----------------------+\n", " \n", "+-----------------------------------------------------------------------------+\n", "| Processes: |\n", "| GPU GI CI PID Type Process name GPU Memory |\n", "| ID ID Usage |\n", "|=============================================================================|\n", "| No running processes found |\n", "+-----------------------------------------------------------------------------+\n" ] } ], "source": [ "!nvidia-smi" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "only got 88/128 samples!\n", "only got 117/128 samples!\n", "only got 120/128 samples!\n", "only got 119/128 samples!\n", "only got 126/128 samples!\n", "only got 124/128 samples!\n", "only got 120/128 samples!\n", "only got 116/128 samples!\n", "only got 120/128 samples!\n", "only got 121/128 samples!\n", "only got 124/128 samples!\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Processing link #0: base_link\n", "Processing link #1: link_0.0\n", "Processing link #2: link_1.0\n", "Processing link #3: link_2.0\n", "Processing link #4: link_3.0\n", "Processing link #5: link_3.0_tip\n", "Processing link #6: link_4.0\n", "Processing link #7: link_5.0\n", "Processing link #8: link_6.0\n", "Processing link #9: link_7.0\n", "Processing link #10: link_7.0_tip\n", "Processing link #11: link_8.0\n", "Processing link #12: link_9.0\n", "Processing link #13: link_10.0\n", "Processing link #14: link_11.0\n", "Processing link #15: link_11.0_tip\n", "Processing link #16: link_12.0\n", "Processing link #17: link_13.0\n", "Processing link #18: link_14.0\n", "Processing link #19: link_15.0\n", "Processing link #20: link_15.0_tip\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "only got 58/64 samples!\n", "only got 59/64 samples!\n", "only got 63/64 samples!\n", "only got 62/64 samples!\n", "only got 63/64 samples!\n", "only got 62/64 samples!\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Processing link #0: palm\n", "Processing link #1: ffknuckle\n", "Processing link #2: ffproximal\n", "Processing link #3: ffmiddle\n", "Processing link #4: ffdistal\n", "Processing link #5: fftip\n", "Processing link #6: mfknuckle\n", "Processing link #7: mfproximal\n", "Processing link #8: mfmiddle\n", "Processing link #9: mfdistal\n", "Processing link #10: mftip\n", "Processing link #11: rfknuckle\n", "Processing link #12: rfproximal\n", "Processing link #13: rfmiddle\n", "Processing link #14: rfdistal\n", "Processing link #15: rftip\n", "Processing link #16: lfmetacarpal\n", "Processing link #17: lfknuckle\n", "Processing link #18: lfproximal\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "only got 62/64 samples!\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Processing link #19: lfmiddle\n", "Processing link #20: lfdistal\n", "Processing link #21: lftip\n", "Processing link #22: thbase\n", "Processing link #23: thproximal\n", "Processing link #24: thhub\n", "Processing link #25: thmiddle\n", "Processing link #26: thdistal\n", "Processing link #27: thtip\n" ] } ], "source": [ "# ROOT_DIR = \"/data/Multi-GraspLLM\"\n", "# import os\n", "# import sys\n", "# sys.path.append(ROOT_DIR)\n", "# os.chdir(ROOT_DIR)\n", "\n", "from utils.hand_model import HandModel\n", "from utils.panda_gripper import PandaGripper\n", "import json\n", "\n", "\n", "urdf_allegro_path=\"./hand_model/allegro_hand_description/allegro_hand_description_right.urdf\"\n", "meshes_allegro_path=\"./hand_model/allegro_hand_description/meshes\"\n", "allegro_hand_model = HandModel(\"allegro\", urdf_allegro_path, meshes_allegro_path, batch_size=1, device=\"cuda\", hand_scale=1)\n", "\n", "urdf_shadow_path=\"./hand_model/shadow_hand_description/urdf/shadowhand_adjust.urdf\"\n", "meshes_shadow_path=\"./hand_model/shadow_hand_description/meshes\"\n", "shadow_hand_model = HandModel(\"shadowhand\", urdf_shadow_path, meshes_shadow_path, batch_size=1, device=\"cuda\", hand_scale=1)\n", "\n", "\n", "panda_gripper=PandaGripper()\n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import pickle\n", "\n", "with open(\"./mid-level-data/shadow.pkl\",\"rb\") as f:\n", " meta_shadow=pickle.load(f)\n", "\n", "with open(\"./mid-level-data/allegro.pkl\",\"rb\") as f:\n", " meta_allegro=pickle.load(f)\n", " \n", "with open(\"./mid-level-data/panda.pkl\",\"rb\") as f:\n", " meta_panda=pickle.load(f)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Visualize Allegro Hand" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['Little finger,middle finger,thumb finger and index finger touch the bottle body of cylinder_bottle.', 'Little finger,middle finger,thumb finger and index finger touch the bottle body of cylinder_bottle.']\n" ] }, { "data": { "text/html": [ "
" ], "text/plain": [ "