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 time | |
from pydrake.all import ( | |
StartMeshcat, | |
RigidTransform, | |
RotationMatrix | |
) | |
meshcat = StartMeshcat() |
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 os | |
from pydrake.all import ( | |
StartMeshcat, | |
DiagramBuilder, | |
AddMultibodyPlantSceneGraph, | |
Parser, | |
LoadModelDirectivesFromString, | |
ProcessModelDirectives, | |
) |
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 matplotlib.pyplot as plt | |
from sklearn.neighbors import kneighbors_graph | |
from collections import deque | |
def adj_mat_to_adj_list(adj_mat): | |
return [list(np.where(adj_mat[i] != 0)[0]) for i in range(adj_mat.shape[0])] | |
def edge_set_to_adj_mat(edge_set, n_points): | |
# Takes in a set of edges, and the number of points, and outputs an adjacency |
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
# In[2]: | |
import numpy as np | |
import os | |
import pydot | |
from IPython.display import display, Image, SVG | |
from tqdm import tqdm |
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
# In[2]: | |
import numpy as np | |
import os | |
import pydot | |
from IPython.display import display, Image, SVG | |
from tqdm import tqdm |
This file has been truncated, but you can view the full file.
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
<?xml version="1.0"?> | |
<robot name="box_scene"> | |
<material name="Blue"> | |
<color rgba="0.0 0.0 0.8 1.0"/> | |
</material> | |
<material name="Red"> | |
<color rgba="0.8 0.0 0.0 1.0"/> | |
</material> | |
<material name="Green"> |
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 | |
from pydrake.all import HPolyhedron | |
A=np.array([[ 1.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00 ],\ | |
[ 0.000000000000000000e+00, 0.000000000000000000e+00, -1.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00 ],\ | |
[ 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, -1.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00 ],\ | |
[ 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, -1.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00 ],\ | |
[ 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e+00, 0.000000000000000000e |
NewerOlder