kscale 0.3.14__py3-none-any.whl → 0.3.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kscale/__init__.py +1 -1
- kscale/web/cli/robot_class.py +15 -2
- kscale/web/gen/api.py +5 -1
- {kscale-0.3.14.dist-info → kscale-0.3.16.dist-info}/METADATA +1 -1
- {kscale-0.3.14.dist-info → kscale-0.3.16.dist-info}/RECORD +9 -9
- {kscale-0.3.14.dist-info → kscale-0.3.16.dist-info}/WHEEL +1 -1
- {kscale-0.3.14.dist-info → kscale-0.3.16.dist-info}/entry_points.txt +0 -0
- {kscale-0.3.14.dist-info → kscale-0.3.16.dist-info}/licenses/LICENSE +0 -0
- {kscale-0.3.14.dist-info → kscale-0.3.16.dist-info}/top_level.txt +0 -0
kscale/__init__.py
CHANGED
kscale/web/cli/robot_class.py
CHANGED
@@ -442,15 +442,23 @@ async def run_pybullet(
|
|
442
442
|
|
443
443
|
@urdf.command("mujoco")
|
444
444
|
@click.argument("class_name")
|
445
|
+
@click.option("--scene", type=str, default="smooth")
|
445
446
|
@click.option("--no-cache", is_flag=True, default=False)
|
446
447
|
@coro
|
447
|
-
async def run_mujoco(class_name: str, no_cache: bool) -> None:
|
448
|
+
async def run_mujoco(class_name: str, scene: str, no_cache: bool) -> None:
|
448
449
|
"""Shows the URDF file for a robot class in Mujoco.
|
449
450
|
|
450
451
|
This command downloads and extracts the robot class URDF folder,
|
451
452
|
searches for an MJCF file (unless --mjcf-path is provided), and then
|
452
453
|
launches the Mujoco viewer using the provided MJCF file.
|
453
454
|
"""
|
455
|
+
try:
|
456
|
+
from mujoco_scenes.errors import TemplateNotFoundError
|
457
|
+
from mujoco_scenes.mjcf import list_scenes, load_mjmodel
|
458
|
+
except ImportError:
|
459
|
+
click.echo(click.style("Mujoco Scenes is required; install with `pip install mujoco-scenes`", fg="red"))
|
460
|
+
return
|
461
|
+
|
454
462
|
try:
|
455
463
|
import mujoco.viewer
|
456
464
|
except ImportError:
|
@@ -474,7 +482,12 @@ async def run_mujoco(class_name: str, no_cache: bool) -> None:
|
|
474
482
|
|
475
483
|
mjcf_path_str = str(mjcf_file.resolve())
|
476
484
|
click.echo(f"Launching Mujoco viewer with: {click.style(mjcf_path_str, fg='green')}")
|
477
|
-
|
485
|
+
try:
|
486
|
+
model = load_mjmodel(mjcf_path_str, scene)
|
487
|
+
except TemplateNotFoundError:
|
488
|
+
click.echo(click.style(f"Failed to load scene {scene}. Available scenes: {', '.join(list_scenes())}", fg="red"))
|
489
|
+
return
|
490
|
+
mujoco.viewer.launch(model)
|
478
491
|
|
479
492
|
|
480
493
|
if __name__ == "__main__":
|
kscale/web/gen/api.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# generated by datamodel-codegen:
|
4
4
|
# filename: openapi.json
|
5
|
-
# timestamp: 2025-05-
|
5
|
+
# timestamp: 2025-05-24T14:48:07+00:00
|
6
6
|
|
7
7
|
from __future__ import annotations
|
8
8
|
|
@@ -73,6 +73,8 @@ class JointMetadataInput(BaseModel):
|
|
73
73
|
actuator_type: Optional[str] = Field(None, title="Actuator Type")
|
74
74
|
nn_id: Optional[int] = Field(None, title="Nn Id")
|
75
75
|
soft_torque_limit: Optional[Union[float, str]] = Field(None, title="Soft Torque Limit")
|
76
|
+
min_angle_deg: Optional[Union[float, str]] = Field(None, title="Min Angle Deg")
|
77
|
+
max_angle_deg: Optional[Union[float, str]] = Field(None, title="Max Angle Deg")
|
76
78
|
|
77
79
|
|
78
80
|
class JointMetadataOutput(BaseModel):
|
@@ -86,6 +88,8 @@ class JointMetadataOutput(BaseModel):
|
|
86
88
|
actuator_type: Optional[str] = Field(None, title="Actuator Type")
|
87
89
|
nn_id: Optional[int] = Field(None, title="Nn Id")
|
88
90
|
soft_torque_limit: Optional[str] = Field(None, title="Soft Torque Limit")
|
91
|
+
min_angle_deg: Optional[str] = Field(None, title="Min Angle Deg")
|
92
|
+
max_angle_deg: Optional[str] = Field(None, title="Max Angle Deg")
|
89
93
|
|
90
94
|
|
91
95
|
class OICDInfo(BaseModel):
|
@@ -1,4 +1,4 @@
|
|
1
|
-
kscale/__init__.py,sha256=
|
1
|
+
kscale/__init__.py,sha256=5x-_pHWpOD5zG1UOxmRMHWvFPV0wM_MPn7MhE8xYFgg,201
|
2
2
|
kscale/cli.py,sha256=JvaPtmWvF7s0D4I3K98eZAItf3oOi2ULsn5aPGxDcu4,795
|
3
3
|
kscale/conf.py,sha256=dm35XSnzJp93St-ixVtYN4Nvqvb5upPGBrWkSI6Yb-4,1743
|
4
4
|
kscale/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -15,7 +15,7 @@ kscale/web/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
15
|
kscale/web/utils.py,sha256=Mme-FAQ0_zbjjOQeX8wyq8F4kL4i9fH7ytri16U6qOA,1046
|
16
16
|
kscale/web/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
kscale/web/cli/robot.py,sha256=rI-A4_0uvJPeA71Apl4Z3mV5fIfWkgmzT9JRmJYxz3A,3307
|
18
|
-
kscale/web/cli/robot_class.py,sha256=
|
18
|
+
kscale/web/cli/robot_class.py,sha256=dOmB1z1l0bkSXnwgb4M6kbcJpHV4YAdT9l_po83C05w,19647
|
19
19
|
kscale/web/cli/user.py,sha256=9IGsJBPyhjsmT04mZ2RGOs35ePfqB2RltYP0Ty5zF5o,1290
|
20
20
|
kscale/web/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
21
|
kscale/web/clients/base.py,sha256=P5AZdoawNpocgx_8j5v0eauowG5suUf8SnnD7q1_gx0,16213
|
@@ -24,10 +24,10 @@ kscale/web/clients/robot.py,sha256=PI8HHkU-4Re9I5rLpp6dGbekRE-rBNVfXZxR_mO2MqE,1
|
|
24
24
|
kscale/web/clients/robot_class.py,sha256=LCKje6nNsDBeKDxZAGCO9vQXdyOwtx0woMmB5vDoUmE,7230
|
25
25
|
kscale/web/clients/user.py,sha256=jsa1_s6qXRM-AGBbHlPhd1NierUtynjY9tVAPNr6_Os,568
|
26
26
|
kscale/web/gen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
27
|
-
kscale/web/gen/api.py,sha256=
|
28
|
-
kscale-0.3.
|
29
|
-
kscale-0.3.
|
30
|
-
kscale-0.3.
|
31
|
-
kscale-0.3.
|
32
|
-
kscale-0.3.
|
33
|
-
kscale-0.3.
|
27
|
+
kscale/web/gen/api.py,sha256=eV_IiF6-RhD7fd8naqKwK56bQtG1_-XVlr5PMpYr38E,7607
|
28
|
+
kscale-0.3.16.dist-info/licenses/LICENSE,sha256=HCN2bImAzUOXldAZZI7JZ9PYq6OwMlDAP_PpX1HnuN0,1071
|
29
|
+
kscale-0.3.16.dist-info/METADATA,sha256=cI35QIX6j-cVeWr_if6dv-5EQIneJk3jsqd_72Nph94,2350
|
30
|
+
kscale-0.3.16.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
31
|
+
kscale-0.3.16.dist-info/entry_points.txt,sha256=N_0pCpPnwGDYVzOeuaSOrbJkS5L3lS9d8CxpJF1f8UI,62
|
32
|
+
kscale-0.3.16.dist-info/top_level.txt,sha256=C2ynjYwopg6YjgttnI2dJjasyq3EKNmYp-IfQg9Xms4,7
|
33
|
+
kscale-0.3.16.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|