Racks roll out flush with the tub face: travel -0.5425 / -0.5195
Browse files
frigidaire_fdpc4221as/parameters.json
CHANGED
|
@@ -620,11 +620,11 @@
|
|
| 620 |
90.0
|
| 621 |
],
|
| 622 |
"lower_slide": [
|
| 623 |
-
-0.
|
| 624 |
0.0
|
| 625 |
],
|
| 626 |
"upper_slide": [
|
| 627 |
-
-0.
|
| 628 |
0.0
|
| 629 |
]
|
| 630 |
},
|
|
|
|
| 620 |
90.0
|
| 621 |
],
|
| 622 |
"lower_slide": [
|
| 623 |
+
-0.5425,
|
| 624 |
0.0
|
| 625 |
],
|
| 626 |
"upper_slide": [
|
| 627 |
+
-0.5195,
|
| 628 |
0.0
|
| 629 |
]
|
| 630 |
},
|
frigidaire_fdpc4221as/source/asset.py
CHANGED
|
@@ -22,7 +22,39 @@ COMPONENT_FILES = {"Cabinet": "cabinet.usdc", "Door": "door.usdc",
|
|
| 22 |
"LowerRack": "lower_rack.usdc", "UpperRack": "upper_rack.usdc",
|
| 23 |
"SilverwareBasket": "silverware_basket.usdc"}
|
| 24 |
BODY_POSITIONS = {name: tuple(position) for name, position in PARAMETERS["origins"].items()}
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
MATERIALS = {
|
| 27 |
"CoatedWire": ((.61, .65, .68), 0.03, .31),
|
| 28 |
"BasketPlastic": ((.045, .050, .055), 0., .48),
|
|
@@ -677,7 +709,8 @@ def build(output_dir=ASSET_DIR, component=None):
|
|
| 677 |
"Open fdpc4221as.usdc for the appliance, or example_scene.usda for a lit scene. "
|
| 678 |
"Copy this entire directory to preserve relative component references.\n\n"
|
| 679 |
"Meters, Z up, front -Y, width X. Default prim /FrigidaireFDPC4221AS. "
|
| 680 |
-
"Door 0..90 degrees; lower_slide
|
|
|
|
| 681 |
"The basket is an independent rigid body.\n\n"
|
| 682 |
"For scripted motion or passive spring counterbalance, use dishsim_frigidaire.asset.spawn "
|
| 683 |
"and code/initialization/frigidaire/frigidaire_demo.py in the source repository. "
|
|
|
|
| 22 |
"LowerRack": "lower_rack.usdc", "UpperRack": "upper_rack.usdc",
|
| 23 |
"SilverwareBasket": "silverware_basket.usdc"}
|
| 24 |
BODY_POSITIONS = {name: tuple(position) for name, position in PARAMETERS["origins"].items()}
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
def _solid_max_y(spec):
|
| 28 |
+
"""The largest local y of a component solid (the racks carry X-axis wheel cylinders)."""
|
| 29 |
+
c = float(spec["center"][1])
|
| 30 |
+
if spec["kind"] == "cylinder":
|
| 31 |
+
return c + (float(spec["height"]) / 2 if spec.get("axis") == "Y" else float(spec["radius"]))
|
| 32 |
+
if spec["kind"] == "box":
|
| 33 |
+
return c + float(spec["size"][1]) / 2
|
| 34 |
+
return c
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def _flush_slide_limits():
|
| 38 |
+
"""The racks fully rolled out (plans/2026-10-29-racks-out.md; the user: "the robot can use all space above the racks"):
|
| 39 |
+
each slide's travel puts its rack's rearmost geometry, pushed in (every wire centreline + its radius, mesh point and
|
| 40 |
+
solid, in the rack body frame at its origin), flush with the tub's front face, the cabinet's opening_center y (-0.254):
|
| 41 |
+
travel = body origin y + rear extent - face y (lower 0.5425 m, upper 0.5195 m). It replaces the authored -0.49 / -0.44,
|
| 42 |
+
which left 7 cm of the lower rack inside the tub mouth under the upper rack."""
|
| 43 |
+
from geometry import build_components
|
| 44 |
+
comps = build_components()
|
| 45 |
+
face_y = float(comps["Cabinet"]["sites"]["opening_center"][1])
|
| 46 |
+
out = {}
|
| 47 |
+
for joint, rack in (("lower_slide", "LowerRack"), ("upper_slide", "UpperRack")):
|
| 48 |
+
c = comps[rack]
|
| 49 |
+
ys = [float(np.max(np.asarray(pts, dtype=float)[:, 1])) + float(r) for _, pts, r in c["wires"]]
|
| 50 |
+
ys += [float(np.max(np.asarray(m.points, dtype=float)[:, 1])) for m in c["meshes"].values()]
|
| 51 |
+
ys += [_solid_max_y(sp) for sp in c["solids"]]
|
| 52 |
+
rear = float(PARAMETERS["origins"][rack][1]) + max(ys)
|
| 53 |
+
out[joint] = (-round(rear - face_y, 4), 0.)
|
| 54 |
+
return out
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
JOINT_LIMITS = {"door_hinge": (0., 90.), **_flush_slide_limits()}
|
| 58 |
MATERIALS = {
|
| 59 |
"CoatedWire": ((.61, .65, .68), 0.03, .31),
|
| 60 |
"BasketPlastic": ((.045, .050, .055), 0., .48),
|
|
|
|
| 709 |
"Open fdpc4221as.usdc for the appliance, or example_scene.usda for a lit scene. "
|
| 710 |
"Copy this entire directory to preserve relative component references.\n\n"
|
| 711 |
"Meters, Z up, front -Y, width X. Default prim /FrigidaireFDPC4221AS. "
|
| 712 |
+
f"Door 0..90 degrees; lower_slide {JOINT_LIMITS['lower_slide'][0]:g}..0 m; upper_slide {JOINT_LIMITS['upper_slide'][0]:g}..0 m "
|
| 713 |
+
"(each rack's rear wall flush with the tub's front face when out). "
|
| 714 |
"The basket is an independent rigid body.\n\n"
|
| 715 |
"For scripted motion or passive spring counterbalance, use dishsim_frigidaire.asset.spawn "
|
| 716 |
"and code/initialization/frigidaire/frigidaire_demo.py in the source repository. "
|
frigidaire_fdpc4221as/source/frigidaire_asset_evidence.py
CHANGED
|
@@ -49,9 +49,11 @@ import torch # noqa: E402
|
|
| 49 |
from pxr import Gf, Usd, UsdGeom, UsdPhysics # noqa: E402
|
| 50 |
|
| 51 |
from dishsim.media import release_sim_for_close # noqa: E402
|
|
|
|
| 52 |
|
| 53 |
JOINTS = ("door_hinge", "lower_slide", "upper_slide")
|
| 54 |
-
EXTENDED = {"door_hinge": math.pi / 2, "lower_slide":
|
|
|
|
| 55 |
TOLERANCE = {"door_hinge": math.radians(.5), "lower_slide": .005, "upper_slide": .005}
|
| 56 |
COMMAND_SPEED = {"door_hinge": .35, "lower_slide": .10, "upper_slide": .10}
|
| 57 |
COMPONENTS = {"cabinet": "Cabinet", "door": "Door", "lower_rack": "LowerRack",
|
|
|
|
| 49 |
from pxr import Gf, Usd, UsdGeom, UsdPhysics # noqa: E402
|
| 50 |
|
| 51 |
from dishsim.media import release_sim_for_close # noqa: E402
|
| 52 |
+
from dishsim_frigidaire.asset import JOINT_LIMITS # noqa: E402 (the shipped parameters.json joint_limits_usd)
|
| 53 |
|
| 54 |
JOINTS = ("door_hinge", "lower_slide", "upper_slide")
|
| 55 |
+
EXTENDED = {"door_hinge": math.pi / 2, "lower_slide": JOINT_LIMITS["lower_slide"][0], # the racks' rear walls flush with
|
| 56 |
+
"upper_slide": JOINT_LIMITS["upper_slide"][0]} # the tub face (asset.JOINT_LIMITS)
|
| 57 |
TOLERANCE = {"door_hinge": math.radians(.5), "lower_slide": .005, "upper_slide": .005}
|
| 58 |
COMMAND_SPEED = {"door_hinge": .35, "lower_slide": .10, "upper_slide": .10}
|
| 59 |
COMPONENTS = {"cabinet": "Cabinet", "door": "Door", "lower_rack": "LowerRack",
|
frigidaire_fdpc4221as/usd/fdpc4221as.usdc
CHANGED
|
Binary files a/frigidaire_fdpc4221as/usd/fdpc4221as.usdc and b/frigidaire_fdpc4221as/usd/fdpc4221as.usdc differ
|
|
|