Fixes in various path of gym_manipulator

This commit is contained in:
Michel Aractingi
2025-06-02 16:21:48 +02:00
parent 906dd1396d
commit fddfafc487
3 changed files with 4 additions and 4 deletions

View File

@@ -89,9 +89,9 @@ class GamepadTeleop(Teleoperator):
# use HidApi for macos
if sys.platform == "darwin":
# NOTE: On macOS, pygame doesnt reliably detect input from some controllers so we fall back to hidapi
from lerobot.scripts.server.end_effector_control_utils import GamepadControllerHID as Gamepad
from lerobot.common.utils.end_effector_control import GamepadControllerHID as Gamepad
else:
from lerobot.scripts.server.end_effector_control_utils import GamepadController as Gamepad
from lerobot.common.utils.end_effector_control import GamepadController as Gamepad
self.gamepad = Gamepad(x_step_size=1.0, y_step_size=1.0, z_step_size=1.0)
self.gamepad.start()

View File

@@ -24,7 +24,7 @@ import torch
from lerobot.common.utils.robot_utils import busy_wait
from lerobot.common.utils.utils import init_logging
from lerobot.scripts.server.kinematics import RobotKinematics
from lerobot.common.model.kinematics import RobotKinematics
class InputController:

View File

@@ -2225,7 +2225,7 @@ def main(cfg: EnvConfig):
while num_episode < 10:
start_loop_s = time.perf_counter()
# Sample a new random action from the robot's action space.
new_random_action = env.action_space.sample()
new_random_action = env.action_space.sample() * 0
# Update the smoothed action using an exponential moving average.
smoothed_action = alpha * new_random_action + (1 - alpha) * smoothed_action