def __init__(self, x_min=-20.0, x_max=20.0, seed=0, **kwargs): super().__init__(**kwargs) self.seed = seed rng = np.random.RandomState(self.seed) gap_centers = np.arange(0.5, x_max, 0.7) gap_centers += rng.normal(0.0, 0.05, size=gap_centers.shape) gap_widths = np.zeros(len(gap_centers)) for i in range(len(gap_widths)): gap_widths[i] = rng.uniform(min(0.06 * (i + 1), 0.2), min(0.12 * (i + 1), 0.4)) platform_x_min = np.concatenate( ([x_min], gap_centers + 0.5 * gap_widths)) platform_x_max = np.concatenate( (gap_centers - 0.5 * gap_widths, [x_max])) platform_x = 0.5 * (platform_x_min + platform_x_max) platform_half_widths = 0.5 * (platform_x_max - platform_x_min) self.platform_x = platform_x self.platforms = [ rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [half_width, 1.0, 10.0]) for half_width in platform_half_widths ] self.floor_x = 0.5 * (x_min + x_max) self.floor = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [0.5 * (x_max - x_min), 1.0, 10.0]) self.objective_fn.base_dir_weight = np.array([-1.0, 0.0, 0.0]) self.objective_fn.base_up_weight = np.array([0.0, 1.0, 0.0]) self.objective_fn.base_vel_weight = np.array([3.0, 0.0, 0.0])
def __init__(self, seed=0, **kwargs): super().__init__(horizon=32, **kwargs) self.seed = seed self.floor = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [20.0, 1.0, 10.0]) self.wall = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [0.05, 0.5, 0.25]) self.side_wall = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [20, 0.5, 0.05])
def __init__(self, seed=0, **kwargs): super().__init__(**kwargs) self.seed = seed self.floor = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [20.0, 1.0, 10.0]) self.bump = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [0.1, 0.2, 10.0]) self.objective_fn.base_dir_weight = np.array([-1.0, 0.0, 0.0]) self.objective_fn.base_up_weight = np.array([0.0, 1.0, 0.0]) self.objective_fn.base_vel_weight = np.array([8.0, 0.0, 0.0])
def __init__(self, seed=0, **kwargs): super().__init__(horizon=32, **kwargs) self.seed = seed self.floor = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [20.0, 1.0, 10.0]) self.wall = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [0.05, 0.5, 0.45]) self.side_wall = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [20, 0.5, 0.05]) self.objective_fn.base_dir_weight = np.array([-1.0, 0.0, 0.0]) self.objective_fn.base_up_weight = np.array([0.0, 1.0, 0.0]) self.objective_fn.base_vel_weight = np.array([8.0, 0.0, 0.0])
def __init__(self, x_min=-20.0, x_max=20.0, seed=0, **kwargs): super().__init__(**kwargs) self.seed = seed rng = np.random.RandomState(self.seed) gap_centers = np.arange(0.5, x_max, 1.0) gap_centers += rng.normal(0.0, 0.1, size=gap_centers.shape) gap_widths = np.linspace(0.1, 0.5, num=len(gap_centers)) platform_x_min = np.concatenate( ([x_min], gap_centers + 0.5 * gap_widths)) platform_x_max = np.concatenate( (gap_centers - 0.5 * gap_widths, [x_max])) platform_x = 0.5 * (platform_x_min + platform_x_max) platform_half_widths = 0.5 * (platform_x_max - platform_x_min) self.platform_x = platform_x self.platforms = [ rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [half_width, 1.0, 10.0]) for half_width in platform_half_widths ] self.floor_x = 0.5 * (x_min + x_max) self.floor = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [0.5 * (x_max - x_min), 1.0, 10.0])
def __init__(self, x_min=-20.0, x_max=20.0, seed=0, **kwargs): super().__init__(**kwargs) self.seed = seed rng = np.random.RandomState(self.seed) edge_x = np.arange(0.0, x_max, 0.3) # edge_x += rng.normal(0.0, 0.1, size=edge_x.shape) platform_x_min = np.concatenate(([x_min], edge_x)) platform_x_max = np.concatenate((edge_x, [x_max])) platform_x = 0.5 * (platform_x_min + platform_x_max) platform_half_widths = 0.5 * (platform_x_max - platform_x_min) self.platform_x = platform_x self.platforms = [ rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [half_width, 5.0, 10.0]) for half_width in platform_half_widths ]
def __init__(self, seed=0, **kwargs): super().__init__(**kwargs) self.seed = seed self.floor = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [20.0, 1.0, 10.0]) self.bump = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [0.1, 0.2, 10.0])
def __init__(self, **kwargs): super().__init__(**kwargs) self.floor = rd.Prop(rd.PropShape.BOX, 0.0, 0.5, [40.0, 1.0, 10.0])
def __init__(self, **kwargs): super().__init__(**kwargs) self.floor = rd.Prop(rd.PropShape.BOX, 0.0, 0.05, [20.0, 1.0, 10.0]) self.floor.color = [0.8, 0.9, 1.0]