utiasDSL/safe-control-gym

Please explain the constraints

MukilSaravanan opened this issue · 5 comments

Please explain the constraints that need to be satisfied along with maximizing the rewards. What does info['constraint values'] mean?

Hello @MukilSaravanan

are is this a question relating the IROS 2022 competition?

The constraints are specified in the YAML files, e.g.

# Constraints
constraints:
# Input constraints
- constraint_form: default_constraint
constrained_variable: input
# State constraints
- constraint_form: bounded_constraint
constrained_variable: state
active_dims: [0, 2, 4] # The uncommented entries in the upper_bounds/lower_bounds vectors below
upper_bounds:
- 3 # x
# - 100 # x_dot
- 3 # y
# - 100 # y_dot
- 2 # z
# - 100 # z_dot
# - 3 # phi
# - 3 # theta
# - 3 # psi
# - 10 # p
# - 10 # q
# - 10 # r
lower_bounds:
- -3 # x
# - -100 # x_dot
- -3 # y
# - -100 # y_dot
- -0.1 # z
# - -100 # z_dot
# - -3 # phi
# - -3 # theta
# - -3 # psi
# - -10 # p
# - -10 # q
# - -10 # r

simply means that there are upper and lower bound for the input (identical to the action_space) and the x, y, z position of the Crazyflies (bounding it to be within a flyable arena of 6 by 6 by 2.1 meters)

info['constraint values'] are the numerical evaluations of those constraints (meaning that any negative value in that entry of the dictionary indicates a violation.

I'm also tagging @adamhall if you have further implementation-specific questions.

info['constraint values'] are the numerical evaluations of those constraints (meaning that any negative value in that entry of the dictionary indicates a violation.

It's actually the other way. ie, if any of those numerical evaluations of constraints is positive, it is said to be violating

info['constraint values'] are the numerical evaluations of those constraints (meaning that any negative value in that entry of the dictionary indicates a violation.

It's actually the other way. ie, if any of those numerical evaluations of constraints is positive, it is said to be violating

I'm sure you're right (@adamhall can confirm or refute), I don't remember the sign convention by heart.
The single boolean in info[constraint_violation] is intended to avoid any ambiguity.