This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import numpy as np | |
arr = sys.stdin.read().split() | |
arr = np.array(arr) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import random | |
import time | |
try: | |
import numpy as np | |
import pybullet as p | |
import pybullet_data | |
except ImportError: | |
print("Run `pip install numpy pybullet`") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import open3d | |
import trimesh | |
def from_trimesh(trimesh_geometry): | |
if isinstance(trimesh_geometry, trimesh.Trimesh): | |
geometry = open3d.geometry.TriangleMesh() | |
geometry.vertices = open3d.utility.Vector3dVector( | |
trimesh_geometry.vertices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import trimesh | |
import pickpp | |
scene = trimesh.Scene() | |
coord = pickpp.geometry.Coordinate() | |
axis = trimesh.creation.axis() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import trimesh | |
import numpy as np | |
voxel_size = 0.01 # 1cm | |
encoding = np.random.randint(0, 2, size=(32, 32, 32), dtype=bool) | |
colors = np.random.random((32, 32, 32, 3)) | |
transform = trimesh.transformations.scale_and_translate( | |
scale=voxel_size, translate=(0, 0, 0) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import trimesh | |
import pickpp | |
models = pickpp.datasets.YCBVideoModelDataset() | |
# cad_ids = models.get_cad_ids(class_id=15) | |
cad_ids = models.get_cad_ids(class_id=20) | |
visual_file = models.get_cad_file_from_id(cad_ids[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import torch | |
import trimesh | |
import pickpp | |
import contrib | |
np.random.seed(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import os.path as osp | |
import sys | |
import imgviz | |
try: | |
import pycocotools.coco |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import contrib | |
import numpy as np | |
import pickpp | |
env = contrib.RlightPickAndPlaceEnv( | |
version="v3", num_instances=1, train=False | |
).env | |
env.launch() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import contrib | |
import numpy as np | |
import pickpp | |
import trimesh | |
env = contrib.RlightPickAndPlaceEnv(version="v3", num_instances=1).env | |
obs = env.reset() |
NewerOlder