This commit is contained in:
yjinzero 2025-02-13 21:22:18 +09:00
parent 701ca6b366
commit 06529d53df
2 changed files with 4 additions and 4 deletions

View File

@ -242,7 +242,7 @@ class Controller:
res_q = self.ikctrl(self.qj, delta, rel=True) res_q = self.ikctrl(self.qj, delta, rel=True)
else: else:
# FIXME(ycho): 0.01 --> cmd_scale ? # FIXME(ycho): 0.01 --> cmd_scale ?
self.target_pose[..., :3] += 0.01 * self.cmd self.target_pose[..., :3] += 0.001 * self.cmd
res_q = self.ikctrl(self.qj, res_q = self.ikctrl(self.qj,
self.target_pose, self.target_pose,
rel=False) rel=False)
@ -258,8 +258,8 @@ class Controller:
self.lim_hi_pin[i_pin]) self.lim_hi_pin[i_pin])
self.low_cmd.motor_cmd[i_mot].q = target_q self.low_cmd.motor_cmd[i_mot].q = target_q
self.low_cmd.motor_cmd[i_mot].dq = 0.0 self.low_cmd.motor_cmd[i_mot].dq = 0.0
self.low_cmd.motor_cmd[i_mot].kp = float(self.config.kps[i_mot]) self.low_cmd.motor_cmd[i_mot].kp = 0.01*float(self.config.kps[i_mot])
self.low_cmd.motor_cmd[i_mot].kd = float(self.config.kps[i_mot]) self.low_cmd.motor_cmd[i_mot].kd = 0.01*float(self.config.kps[i_mot])
self.low_cmd.motor_cmd[i_mot].tau = 0.0 self.low_cmd.motor_cmd[i_mot].tau = 0.0
# send the command # send the command
self.send_cmd(self.low_cmd) self.send_cmd(self.low_cmd)

View File

@ -7,7 +7,7 @@ import time
import yaml import yaml
import numpy as np import numpy as np
import torch as th import torch as th
from yourdfpy import URDF # from yourdfpy import URDF
import pinocchio as pin import pinocchio as pin
import pink import pink