Allow units for 'start_pos' (initial agent position)
This commit is contained in:
parent
6d465c69c9
commit
1bf587c4da
@ -504,6 +504,8 @@ class ColumbusConfigDefined(ColumbusEnv):
|
|||||||
super().__init__(
|
super().__init__(
|
||||||
observable=observable, fps=fps, env_seed=env_seed, **kw)
|
observable=observable, fps=fps, env_seed=env_seed, **kw)
|
||||||
self.entities_definitions = entities
|
self.entities_definitions = entities
|
||||||
|
self.start_pos = self.conv_unit(self.start_pos[0], target='em', axis='x'), self.conv_unit(
|
||||||
|
self.start_pos[1], target='em', axis='y')
|
||||||
|
|
||||||
def is_unit(self, s):
|
def is_unit(self, s):
|
||||||
if type(s) in [int, float]:
|
if type(s) in [int, float]:
|
||||||
|
@ -65,14 +65,14 @@ params:
|
|||||||
pos: [0.75em, 60px]
|
pos: [0.75em, 60px]
|
||||||
- type: RectBarrier
|
- type: RectBarrier
|
||||||
num: 1
|
num: 1
|
||||||
width: 2ct
|
width: 20 # defaults to rx (px scaled from x-axis)
|
||||||
height: 3ct
|
height: 10 # defaults to ry (px scaled from y-axis)
|
||||||
pos: [0.75em, 90px]
|
pos: [0.75em, 90px]
|
||||||
- type: OnceReward
|
- type: OnceReward
|
||||||
reward: 100
|
reward: 100
|
||||||
radius: 3ct
|
radius: 3ct
|
||||||
pos: [0.3, 0.8]
|
pos: [0.3, 0.8] # defaults to em
|
||||||
start_pos: [0.1, 0.21]
|
start_pos: [90ct, 20ct]
|
||||||
default_collision_elasticity: 0.8
|
default_collision_elasticity: 0.8
|
||||||
start_score: 10
|
start_score: 10
|
||||||
speed_fac: 0.01
|
speed_fac: 0.01
|
||||||
|
Loading…
Reference in New Issue
Block a user