pretrain logic and small fixes

This commit is contained in:
2026-08-07 14:32:35 +02:00
parent a1eb7b8573
commit 3e6e40f0c5
8 changed files with 324 additions and 125 deletions
-6
View File
@@ -164,12 +164,6 @@ class Simulation:
"""Advances physics simulation by 1 time step."""
p.stepSimulation(physicsClientId=self.physics_client)
def set_robot_color(self, rgba: List[float]) -> None:
num_joints = p.getNumJoints(self.robot_id, physicsClientId=self.physics_client)
p.changeVisualShape(self.robot_id, -1, rgbaColor=rgba, physicsClientId=self.physics_client)
for j in range(num_joints):
p.changeVisualShape(self.robot_id, j, rgbaColor=rgba, physicsClientId=self.physics_client)
def settle_and_measure_height(
self, target_angles: Optional[np.ndarray] = None, steps: int = 100, fallback_height: float = 0.122
) -> float: