debugging on real robot

This commit is contained in:
HYUNHONOH98 2025-02-21 17:43:00 +09:00
parent 91344163ea
commit 1d5830fd51
2 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ action_scale: 0.5
# cmd_scale: [2.0, 2.0, 0.25] # cmd_scale: [2.0, 2.0, 0.25]
cmd_scale: [0.0, 0.0, 0.0] cmd_scale: [0.0, 0.0, 0.0]
num_actions: 29 # 22+7 num_actions: 29 # 22+7
num_obs: 132 num_obs: 97
# max_cmd: [0.8, 0.5, 1.57] # max_cmd: [0.8, 0.5, 1.57]
max_cmd: [1.0, 1.0, 1.0] max_cmd: [1.0, 1.0, 1.0]

View File

@ -365,7 +365,7 @@ class Controller:
robot_forward_vec_w = quat_apply(quat_w, torch.tensor([1,0,0]).float().to("cpu")) robot_forward_vec_w = quat_apply(quat_w, torch.tensor([1,0,0]).float().to("cpu"))
robot_heading_w = torch.atan2(robot_forward_vec_w[:, 1], robot_forward_vec_w[:, 0]) robot_heading_w = torch.atan2(robot_forward_vec_w[:, 1], robot_forward_vec_w[:, 0])
heading_command_b = wrap_to_pi(heading_w - robot_heading_w) heading_command_b = wrap_to_pi(heading_w - robot_heading_w)
return np.concatenate(xyz_cmd_b, heading_command_b) return np.append(xyz_cmd_b, heading_command_b)
def run_policy(self): def run_policy(self):
if self.remote_controller.button[KeyMap.select] == 1: if self.remote_controller.button[KeyMap.select] == 1: