added black box tests and bug fixes
This commit is contained in:
@@ -166,6 +166,15 @@ def make_bb(
|
||||
# We have to learn the length when learning sub_trajectories trajectories
|
||||
phase_kwargs['learn_tau'] = True
|
||||
|
||||
# set tau bounds to minimum of two env steps otherwise computing the velocity is not possible.
|
||||
# maximum is full duration of one episode.
|
||||
if phase_kwargs.get('learn_tau'):
|
||||
phase_kwargs["tau_bound"] = [env.dt * 2, black_box_kwargs['duration']]
|
||||
|
||||
# Max delay is full duration minus two steps due to above reason
|
||||
if phase_kwargs.get('learn_delay'):
|
||||
phase_kwargs["delay_bound"] = [0, black_box_kwargs['duration'] - env.dt * 2]
|
||||
|
||||
phase_gen = get_phase_generator(**phase_kwargs)
|
||||
basis_gen = get_basis_generator(phase_generator=phase_gen, **basis_kwargs)
|
||||
controller = get_controller(**controller_kwargs)
|
||||
|
||||
Reference in New Issue
Block a user