FrankTianTT/laikago_py

hyperparameters

Closed this issue · 2 comments

Hello.
How are the hyperparameters in laikago.py, laikago_constants.py and laikago_pose_utils.py designed?
Specifically, I would like to know the principles of these parameter designs:
laikago.py
INIT_RACK_POSITION = [0, 0, 1]
INIT_POSITION = [0, 0, 0.48]
JOINT_DIRECTIONS = np.array([-1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1])# ??
HIP_JOINT_OFFSET = 0.0# ??
UPPER_LEG_JOINT_OFFSET = -0.6 # ??
KNEE_JOINT_OFFSET = 0.66 # ??

MAX_MOTOR_ANGLE_CHANGE_PER_STEP = 0.2 # ??
_DEFAULT_HIP_POSITIONS = (
(0.21, -0.1157, 0),
(0.21, 0.1157, 0),
(-0.21, -0.1157, 0),
(-0.21, 0.1157, 0),
)

ABDUCTION_P_GAIN = 220.0
ABDUCTION_D_GAIN = 0.3
HIP_P_GAIN = 220.0
HIP_D_GAIN = 2.0
KNEE_P_GAIN = 220.0
KNEE_D_GAIN = 2.0

_BODY_B_FIELD_NUMBER = 2
_LINK_A_FIELD_NUMBER = 3

#--------------------------------------
laikago_constants.py
INIT_RACK_POSITION = [0, 0, 1]
INIT_POSITION = [0, 0, 0.48]

INIT_ORIENTATION = pyb.getQuaternionFromEuler([math.pi / 2.0, 0, math.pi / 2.0]) #??

INIT_ABDUCTION_ANGLE = 0 #?
INIT_HIP_ANGLE = 0.67
INIT_KNEE_ANGLE = -1.25

JOINT_DIRECTIONS = collections.OrderedDict(
zip(JOINT_NAMES, (-1, 1, 1, 1, 1, 1, -1, 1, 1, 1, 1, 1)))

HIP_JOINT_OFFSET = 0.0 #?
UPPER_LEG_JOINT_OFFSET = -0.6
KNEE_JOINT_OFFSET = 0.66

MAX_MOTOR_ANGLE_CHANGE_PER_STEP = 0.12

HIP_POSITIONS = collections.OrderedDict((
(LEG_NAMES[0], (0.21, -0.1157, 0)),
(LEG_NAMES[1], (0.21, 0.1157, 0)),
(LEG_NAMES[2], (-0.21, -0.1157, 0)),
(LEG_NAMES[3], (-0.21, 0.1157, 0)),
))

#---------------------------------------------------------
laikago_pose_utils.py
LAIKAGO_DEFAULT_ABDUCTION_ANGLE = 0
LAIKAGO_DEFAULT_HIP_ANGLE = 0.67
LAIKAGO_DEFAULT_KNEE_ANGLE = -1.25

Thank you very much.

Hi,
Some of them are intrinsic parameters of laikogo and others come from properties of pybullet.
Maybe it looks deliberate and even strange, the goal of setting these hyperparameters is make the model work well in the reality .
You can check https://github.com/google-research/motion_imitation for more information.
Hope this helps.

fine