v0.1.13 finish all goals eval (even crash)
This commit is contained in:
@@ -53,6 +53,10 @@ class Go2(BaseRobot):
|
||||
raise NotImplementedError(f"Goal type '{goal_data.goal_type}' not implemented in Go2 robot.")
|
||||
return obs
|
||||
|
||||
def reset(self):
|
||||
self.last_action = np.zeros(self.num_action, dtype=np.float32)
|
||||
self.model.reset() # reset history
|
||||
|
||||
def get_action(self, obs: np.ndarray):
|
||||
obs_tensor = torch.tensor(obs, dtype=torch.float32).unsqueeze(0).to(self.device)
|
||||
action = self.model(obs_tensor).detach().cpu().numpy().squeeze(0)[self.model2mj_idx]
|
||||
|
||||
@@ -48,7 +48,7 @@ class Go2Config(RobotConfig):
|
||||
|
||||
class commands(RobotConfig.commands):
|
||||
lin_vel_x = [-2.0, 2.0] # min max [m/s]
|
||||
lin_vel_y = [-1.0, 1.0] # min max [m/s]
|
||||
lin_vel_y = [-2.0, 2.0] # min max [m/s]
|
||||
lin_vel_z = None # min max [m/s]
|
||||
ang_vel_roll = None # min max [rad/s]
|
||||
ang_vel_pitch = None # min max [rad/s]
|
||||
|
||||
Reference in New Issue
Block a user