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 | |
# -*- coding: utf-8 -*- | |
import rospy | |
from tf2_msgs.msg import TFMessage | |
from jsk_recognition_msgs.msg import BoundingBoxArray | |
import message_filters | |
def cb_1(msg): |
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
CC :=gcc | |
CPP :=g++ | |
LDFLAGS := | |
C_SOURCES :=$(wildcard *.c) | |
C_EXECUTABLE :=$(C_SOURCES:.c=) | |
CPP_SOURCES :=$(wildcard *.cpp) | |
CPP_EXECUTABLE :=$(CPP_SOURCES:.cpp=) | |
all:$(C_EXECUTABLE) $(CPP_EXECUTABLE) |
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
#!/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 base64 | |
import json | |
import os | |
import numpy as np | |
np.random.seed(0) | |
img_file = "lena.png" |
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 numpy as np | |
import trimesh | |
scene = trimesh.Scene() | |
# plane | |
plane = trimesh.creation.box(extents=[1, 1, 0.01]) |
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 numpy as np | |
import open3d | |
import trimesh | |
import objslampp | |
def get_scenes(): |
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) | |
) |
NewerOlder