Last active
September 17, 2024 17:37
-
-
Save cohnt/b791eecd186769dd5eb91a737faae394 to your computer and use it in GitHub Desktop.
Inertia Error
This file contains hidden or 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, | |
) | |
directives_str = """directives: | |
- add_model: | |
name: tets | |
file: package://symmetries/test.obj | |
""" | |
meshcat = StartMeshcat() | |
builder = DiagramBuilder() | |
plant, scene_graph = AddMultibodyPlantSceneGraph(builder, time_step=0.0) | |
parser = Parser(plant) | |
parser.package_map().Add("symmetries", os.getcwd()) | |
directives = LoadModelDirectivesFromString(directives_str) | |
models = ProcessModelDirectives(directives, plant, parser) | |
plant.Finalize() | |
diagram = builder.Build() |
This file contains hidden or 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"?> | |
<package format="2"> | |
<name>symmetries</name> | |
<version>0.0.0</version> | |
</package> |
This file contains hidden or 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
g test | |
v 0.000000 0.000000 0.500000 | |
v 0.000000 0.000000 -0.500000 | |
v 0.000000 1.000000 0.500000 | |
v 0.000000 1.000000 -0.500000 | |
v 1.000000 0.000000 0.500000 | |
v 1.000000 0.000000 -0.500000 | |
f 1 3 5 | |
f 2 4 6 | |
f 1 2 3 | |
f 2 3 4 | |
f 3 4 5 | |
f 4 5 6 | |
f 5 6 1 | |
f 6 1 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment