Skip to content

Commit

Permalink
fix: cpp bug;
Browse files Browse the repository at this point in the history
  • Loading branch information
fan-ziqi committed May 21, 2024
1 parent d53d207 commit a37fa1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 38 deletions.
36 changes: 0 additions & 36 deletions src/rl_sar/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,39 +104,3 @@ lite3_wheel:
"FR_hip_joint", "FR_thigh_joint", "FR_calf_joint",
"RL_hip_joint", "RL_thigh_joint", "RL_calf_joint",
"RR_hip_joint", "RR_thigh_joint", "RR_calf_joint"]

fldlar:
model_name: "model_0514.pt"
num_observations: 45
clip_obs: 100.0
clip_actions: 100.0
# damping: 0.5
# stiffness: 20.0
p_gains: [200, 200, 200, # FL
200, 200, 200, # FR
200, 200, 200, # RL
200, 200, 200] # RR
d_gains: [11, 11, 11, # FL
11, 11, 11, # FR
11, 11, 11, # RL
11, 11, 11] # RR
action_scale: 0.25
hip_scale_reduction: 0.5
num_of_dofs: 12
lin_vel_scale: 2.0
ang_vel_scale: 0.25
dof_pos_scale: 1.0
dof_vel_scale: 0.05
commands_scale: [1.0, 1.0, 1.0]
torque_limits: [151.0, 151.0, 151.0, # FL
151.0, 151.0, 151.0, # FR
151.0, 151.0, 151.0, # RL
151.0, 151.0, 151.0] # RR
default_dof_pos: [0.0, 0.0, 0.0, # FL
0.0, 0.0, 0.0, # FR
0.0, 0.0, 0.0, # RL
0.0, 0.0, 0.0] # RR
joint_names: ["ip1x_hip_roll_joint", "ip1x_hip_pitch_joint", "ip1x_knee_joint",
"ip3x_hip_roll_joint", "ip3x_hip_pitch_joint", "ip3x_knee_joint",
"ip5x_hip_roll_joint", "ip5x_hip_pitch_joint", "ip5x_knee_joint",
"ip7x_hip_roll_joint", "ip7x_hip_pitch_joint", "ip7x_knee_joint"]
4 changes: 2 additions & 2 deletions src/rl_sar/library/rl_sdk/rl_sdk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ void RL::ReadYaml(std::string robot_name)
this->params.ang_vel_scale = config["ang_vel_scale"].as<float>();
this->params.dof_pos_scale = config["dof_pos_scale"].as<float>();
this->params.dof_vel_scale = config["dof_vel_scale"].as<float>();
this->params.commands_scale = torch::tensor(ReadVectorFromYaml<float>(config["commands_scale"])).view({1, -1})
this->params.commands_scale = torch::tensor(ReadVectorFromYaml<float>(config["commands_scale"])).view({1, -1});
// this->params.damping = config["damping"].as<float>();
// this->params.stiffness = config["stiffness"].as<float>();
// this->params.d_gains = torch::ones(12) * this->params.damping;
// this->params.p_gains = torch::ones(12) * this->params.stiffness;
this->params.p_gains = torch::tensor(ReadVectorFromYaml<float>(config["p_gains"])).view({1, -1})
this->params.p_gains = torch::tensor(ReadVectorFromYaml<float>(config["p_gains"])).view({1, -1});
this->params.d_gains = torch::tensor(ReadVectorFromYaml<float>(config["d_gains"])).view({1, -1});
this->params.torque_limits = torch::tensor(ReadVectorFromYaml<float>(config["torque_limits"])).view({1, -1});
this->params.default_dof_pos = torch::tensor(ReadVectorFromYaml<float>(config["default_dof_pos"])).view({1, -1});
Expand Down

0 comments on commit a37fa1c

Please sign in to comment.