Skip to content

Commit c8c5c75

Browse files
Fixing some minor issues (utiasDSL#156)
1 parent 0c0274d commit c8c5c75

File tree

8 files changed

+10
-9
lines changed

8 files changed

+10
-9
lines changed

examples/cbf/config_overrides/ppo_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ algo: ppo
22
algo_config:
33
# model args
44
hidden_dim: 64
5-
activation: relu
5+
activation: tanh
66
norm_obs: False
77
norm_reward: False
88
clip_obs: 10.0

examples/mpsc/config_overrides/cartpole/ppo_cartpole.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ algo: ppo
22
algo_config:
33
# model args
44
hidden_dim: 64
5-
activation: relu
5+
activation: tanh
66
norm_obs: False
77
norm_reward: False
88
clip_obs: 10.0

examples/mpsc/config_overrides/quadrotor_2D/ppo_quadrotor_2D.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ algo: ppo
22
algo_config:
33
# model args
44
hidden_dim: 256
5-
activation: relu
5+
activation: tanh
66

77
# loss args
88
use_gae: True

examples/rl/config_overrides/quadrotor_2D/ppo_quadrotor_2D.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ algo: ppo
22
algo_config:
33
# model args
44
hidden_dim: 128
5-
activation: relu
5+
activation: tanh
66

77
# loss args
88
use_gae: True

examples/rl/config_overrides/quadrotor_3D/ppo_quadrotor_3D.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ algo: ppo
22
algo_config:
33
# model args
44
hidden_dim: 128
5-
activation: relu
5+
activation: tanh
66

77
# loss args
88
use_gae: True

safe_control_gym/controllers/ppo/ppo.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Model args
22
hidden_dim: 64
3-
activation: 'tanh'
3+
activation: tanh
44
norm_obs: False
55
norm_reward: False
66
clip_obs: 10

safe_control_gym/controllers/sac/sac.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# model args
22
hidden_dim: 256
3-
activation: 'relu'
3+
activation: relu
44
norm_obs: False
55
norm_reward: False
66
clip_obs: 10.

safe_control_gym/experiments/base_experiment.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ def _select_action(self, obs, info):
170170
if self.safety_filter is not None:
171171
physical_action = self.env.denormalize_action(action)
172172
unextended_obs = obs[:self.env.symbolic.nx]
173-
certified_action, _ = self.safety_filter.certify_action(unextended_obs, physical_action, info)
174-
action = self.env.normalize_action(certified_action)
173+
certified_action, success = self.safety_filter.certify_action(unextended_obs, physical_action, info)
174+
if success:
175+
action = self.env.normalize_action(certified_action)
175176

176177
return action
177178

0 commit comments

Comments
 (0)