robot-keyframe-kit 0.3.2__tar.gz → 0.3.4__tar.gz
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.
- {robot_keyframe_kit-0.3.2/src/robot_keyframe_kit.egg-info → robot_keyframe_kit-0.3.4}/PKG-INFO +1 -1
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/pyproject.toml +1 -1
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit/editor.py +2 -3
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit/sim_worker.py +15 -4
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4/src/robot_keyframe_kit.egg-info}/PKG-INFO +1 -1
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/LICENSE +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/MANIFEST.in +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/README.md +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/setup.cfg +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit/__init__.py +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit/config.py +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit/keyframe.py +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit/math_utils.py +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit.egg-info/SOURCES.txt +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit.egg-info/dependency_links.txt +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit.egg-info/entry_points.txt +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit.egg-info/requires.txt +0 -0
- {robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit.egg-info/top_level.txt +0 -0
{robot_keyframe_kit-0.3.2/src/robot_keyframe_kit.egg-info → robot_keyframe_kit-0.3.4}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: robot-keyframe-kit
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: A generalizable Viser-based keyframe editor for any MuJoCo robot
|
|
5
5
|
Author-email: Stanford TML <yuming29@stanford.edu>
|
|
6
6
|
Maintainer-email: Stanford TML <yuming29@stanford.edu>
|
|
@@ -46,7 +46,7 @@ except Exception as exc:
|
|
|
46
46
|
|
|
47
47
|
from .config import EditorConfig
|
|
48
48
|
from .keyframe import Keyframe
|
|
49
|
-
from .math_utils import interpolate_action
|
|
49
|
+
from .math_utils import interpolate_action
|
|
50
50
|
from .sim_worker import SimWorker
|
|
51
51
|
|
|
52
52
|
|
|
@@ -1276,9 +1276,8 @@ class ViserKeyframeEditor:
|
|
|
1276
1276
|
raise ValueError(f"Could not find site or body named '{name}'")
|
|
1277
1277
|
|
|
1278
1278
|
def _forward(self) -> None:
|
|
1279
|
-
"""Run forward kinematics
|
|
1279
|
+
"""Run forward kinematics."""
|
|
1280
1280
|
mujoco.mj_forward(self.model, self.data)
|
|
1281
|
-
solve_equality_constraints(self.model, self.data)
|
|
1282
1281
|
|
|
1283
1282
|
def _estimate_robot_height(self) -> float:
|
|
1284
1283
|
"""Estimate robot height from geom bounds in the current model state."""
|
|
@@ -395,9 +395,14 @@ class SimWorker(threading.Thread):
|
|
|
395
395
|
self.data.joint(name).qpos = value
|
|
396
396
|
|
|
397
397
|
def _forward(self, locked_joint_names: Optional[list[str]] = None) -> None:
|
|
398
|
-
"""Run forward kinematics
|
|
398
|
+
"""Run forward kinematics, optionally solving equality constraints.
|
|
399
|
+
|
|
400
|
+
Constraint projection only runs when *locked_joint_names* is provided
|
|
401
|
+
(i.e. during slider dragging). All other callers just need mj_forward.
|
|
402
|
+
"""
|
|
399
403
|
mujoco.mj_forward(self.model, self.data)
|
|
400
|
-
|
|
404
|
+
if locked_joint_names is not None:
|
|
405
|
+
solve_equality_constraints(self.model, self.data, locked_joint_names=locked_joint_names)
|
|
401
406
|
|
|
402
407
|
def _step(self) -> None:
|
|
403
408
|
"""Step physics simulation."""
|
|
@@ -662,8 +667,14 @@ class SimWorker(threading.Thread):
|
|
|
662
667
|
aligned_torso_t = torso_t_curr.copy()
|
|
663
668
|
aligned_torso_t[2, 3] -= dz
|
|
664
669
|
|
|
665
|
-
self.
|
|
666
|
-
|
|
670
|
+
if self.q_start_idx == 7:
|
|
671
|
+
# Floating base: write position + quaternion into freejoint qpos.
|
|
672
|
+
self.data.qpos[:3] = aligned_torso_t[:3, 3]
|
|
673
|
+
self.data.qpos[3:7] = R.from_matrix(aligned_torso_t[:3, :3]).as_quat(scalar_first=True)
|
|
674
|
+
else:
|
|
675
|
+
# Fixed base: no freejoint to adjust, skip ground placement.
|
|
676
|
+
print("[Ground] No freejoint — skipping ground placement", flush=True)
|
|
677
|
+
return
|
|
667
678
|
self._forward()
|
|
668
679
|
print(
|
|
669
680
|
f"[Ground] Placed robot on ground (moved down {dz:.4f}m, lowest geom was at z={lowest_z:.4f}m)",
|
{robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4/src/robot_keyframe_kit.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: robot-keyframe-kit
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: A generalizable Viser-based keyframe editor for any MuJoCo robot
|
|
5
5
|
Author-email: Stanford TML <yuming29@stanford.edu>
|
|
6
6
|
Maintainer-email: Stanford TML <yuming29@stanford.edu>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit.egg-info/requires.txt
RENAMED
|
File without changes
|
{robot_keyframe_kit-0.3.2 → robot_keyframe_kit-0.3.4}/src/robot_keyframe_kit.egg-info/top_level.txt
RENAMED
|
File without changes
|