Skip to content

Commit

Permalink
Fixing some minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico-PizarroBejarano committed Jun 17, 2024
1 parent 0c0274d commit c73c21e
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/cbf/config_overrides/ppo_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ algo: ppo
algo_config:
# model args
hidden_dim: 64
activation: relu
activation: tanh
norm_obs: False
norm_reward: False
clip_obs: 10.0
Expand Down
2 changes: 1 addition & 1 deletion examples/mpsc/config_overrides/cartpole/ppo_cartpole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ algo: ppo
algo_config:
# model args
hidden_dim: 64
activation: relu
activation: tanh
norm_obs: False
norm_reward: False
clip_obs: 10.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ algo: ppo
algo_config:
# model args
hidden_dim: 256
activation: relu
activation: tanh

# loss args
use_gae: True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ algo: ppo
algo_config:
# model args
hidden_dim: 128
activation: relu
activation: tanh

# loss args
use_gae: True
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ algo: ppo
algo_config:
# model args
hidden_dim: 128
activation: relu
activation: tanh

# loss args
use_gae: True
Expand Down
2 changes: 1 addition & 1 deletion safe_control_gym/controllers/ppo/ppo.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Model args
hidden_dim: 64
activation: 'tanh'
activation: tanh
norm_obs: False
norm_reward: False
clip_obs: 10
Expand Down
2 changes: 1 addition & 1 deletion safe_control_gym/controllers/sac/sac.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# model args
hidden_dim: 256
activation: 'relu'
activation: relu
norm_obs: False
norm_reward: False
clip_obs: 10.
Expand Down
5 changes: 3 additions & 2 deletions safe_control_gym/experiments/base_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ def _select_action(self, obs, info):
if self.safety_filter is not None:
physical_action = self.env.denormalize_action(action)
unextended_obs = obs[:self.env.symbolic.nx]
certified_action, _ = self.safety_filter.certify_action(unextended_obs, physical_action, info)
action = self.env.normalize_action(certified_action)
certified_action, success = self.safety_filter.certify_action(unextended_obs, physical_action, info)
if success:
action = self.env.normalize_action(certified_action)

return action

Expand Down

0 comments on commit c73c21e

Please sign in to comment.