1
1
from simple_playgrounds .agents .sensors import RgbCamera , GreyCamera , Lidar ,\
2
2
Touch , SemanticRay , SemanticCones , TopdownSensor
3
- from simple_playgrounds .agents . sensors . sensor import Sensor
3
+ from simple_playgrounds .playgrounds . collection . test . test_scene_elements import Basics , Teleports , Interactives
4
4
5
5
from simple_playgrounds .agents .controllers import Random
6
6
from simple_playgrounds .agents import BaseAgent
7
7
from simple_playgrounds .agents .parts import ForwardPlatform
8
8
from simple_playgrounds import Engine
9
9
10
- from simple_playgrounds .playground import PlaygroundRegister
11
-
12
10
13
11
def run_experiment_on_sensor (** sensor_config ):
14
12
@@ -28,7 +26,7 @@ def run_experiment_on_sensor(**sensor_config):
28
26
29
27
print ('Testing of sensor params ' , sensor_config )
30
28
31
- for pg_name , pg_class in PlaygroundRegister . playgrounds [ 'test' ]. items () :
29
+ for pg_class in [ Basics , Teleports , Interactives , ] :
32
30
playground = pg_class ()
33
31
playground .add_agent (agent )
34
32
@@ -52,14 +50,15 @@ def test_default_sensors():
52
50
53
51
def test_parameter_sensors ():
54
52
55
- for resolution in [2 , 16 , 32 ]:
53
+ for resolution in [2 , 16 ]:
56
54
57
- for range_sensor in [2 , 100 , 500 ]:
55
+ for range_sensor in [2 , 100 ]:
58
56
59
- for fov in [2 , 30 , 90 , 180 , 360 , 380 ]:
57
+ for fov in [2 , 180 , 360 , 380 ]:
60
58
61
59
run_experiment_on_sensor (resolution = resolution , max_range = range_sensor , fov = fov )
62
60
61
+
63
62
def test_rgb_on_teleports ():
64
63
65
64
agent = BaseAgent (controller = Random (), interactive = True , platform = ForwardPlatform )
@@ -68,7 +67,6 @@ def test_rgb_on_teleports():
68
67
invisible_elements = agent .parts ,
69
68
))
70
69
71
- from simple_playgrounds .playgrounds .collection import Teleports
72
70
playground = Teleports ()
73
71
playground .add_agent (agent )
74
72
0 commit comments