Skip to content

Commit

Permalink
Merge pull request #28 from edbeeching/fix-env-tests
Browse files Browse the repository at this point in the history
Fix env tests
  • Loading branch information
edbeeching authored Feb 21, 2024
2 parents 879ec38 + bf19489 commit 6b59f6c
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 46 deletions.
2 changes: 1 addition & 1 deletion examples/3DCarParking/3DCarParkingExample.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Godot.NET.Sdk/4.1.3">
<Project Sdk="Godot.NET.Sdk/4.2.1">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
Expand Down
4 changes: 2 additions & 2 deletions examples/3DCarParking/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ config_version=5

config/name="3DCarParkingExample"
config/description="An example of a simple 3d car parking RL environment. "
run/main_scene="res://scenes/TestingScene.tscn"
config/features=PackedStringArray("4.1", "C#", "Forward Plus")
run/main_scene="res://scenes/TrainingScene.tscn"
config/features=PackedStringArray("4.2", "C#", "Forward Plus")
config/icon="res://icon.svg"

[dotnet]
Expand Down
2 changes: 1 addition & 1 deletion examples/ItemSortingCart/CartExamples.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Godot.NET.Sdk/4.2.0-rc.2">
<Project Sdk="Godot.NET.Sdk/4.2.1">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
Expand Down
2 changes: 1 addition & 1 deletion examples/ItemSortingCart/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config_version=5

config/name="ItemSortingCartExample"
config/description="A RL example of a cart that sorts items by category."
run/main_scene="res://scenes/batch_scene.tscn"
run/main_scene="res://scenes/training_scene.tscn"
config/features=PackedStringArray("4.2", "C#", "Forward Plus")
config/icon="res://icon.svg"

Expand Down
151 changes: 151 additions & 0 deletions examples/ItemSortingCart/scenes/testing_scene.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
[gd_scene load_steps=7 format=3 uid="uid://c7uiab12qu14e"]

[ext_resource type="PackedScene" uid="uid://ca6csk8y5nvuu" path="res://scenes/playing_area.tscn" id="1_4hh40"]
[ext_resource type="Script" path="res://addons/godot_rl_agents/sync.gd" id="2_kgrhh"]

[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_hfpel"]
auto_exposure_enabled = true
dof_blur_far_distance = 21.3
dof_blur_amount = 0.3

[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_g5l5s"]

[sub_resource type="Sky" id="Sky_a413c"]
sky_material = SubResource("ProceduralSkyMaterial_g5l5s")

[sub_resource type="Environment" id="Environment_xy0xn"]
background_mode = 2
background_energy_multiplier = 1.2
sky = SubResource("Sky_a413c")
ssil_enabled = true
volumetric_fog_enabled = true
volumetric_fog_density = 0.01

[node name="testing_scene" type="Node3D"]

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.857167, 0.364187, -0.364187, 0, 0.707107, 0.707107, 0.515038, -0.606109, 0.606109, 0, 0, 0)
shadow_enabled = true

[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(-4.37114e-08, 0.532876, -0.846193, 0, 0.846193, 0.532876, 1, 2.32928e-08, -3.69883e-08, -5.495, 4.285, 0)
attributes = SubResource("CameraAttributesPractical_hfpel")
fov = 93.0
size = 65.0

[node name="playing_area" parent="." instance=ExtResource("1_4hh40")]

[node name="playing_area2" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)

[node name="playing_area3" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 0)

[node name="playing_area4" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 30)

[node name="playing_area5" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, 0)

[node name="playing_area6" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, 30)

[node name="playing_area7" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 0)

[node name="playing_area8" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 30)

[node name="playing_area9" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, 0)

[node name="playing_area10" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, 30)

[node name="playing_area11" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, 0)

[node name="playing_area12" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, 30)

[node name="playing_area13" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 60)

[node name="playing_area14" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 90)

[node name="playing_area15" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 60)

[node name="playing_area16" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 90)

[node name="playing_area17" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, 60)

[node name="playing_area18" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, 90)

[node name="playing_area19" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 60)

[node name="playing_area20" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 90)

[node name="playing_area21" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, 60)

[node name="playing_area22" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, 90)

[node name="playing_area23" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, 60)

[node name="playing_area24" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, 90)

[node name="playing_area25" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -60)

[node name="playing_area26" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -30)

[node name="playing_area27" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, -60)

[node name="playing_area28" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, -30)

[node name="playing_area29" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, -60)

[node name="playing_area30" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, -30)

[node name="playing_area31" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, -60)

[node name="playing_area32" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, -30)

[node name="playing_area33" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, -60)

[node name="playing_area34" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, -30)

[node name="playing_area35" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, -60)

[node name="playing_area36" parent="." instance=ExtResource("1_4hh40")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, -30)

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_xy0xn")

[node name="Sync" type="Node" parent="."]
script = ExtResource("2_kgrhh")
control_mode = 2
action_repeat = 15
speed_up = 4
onnx_model_path = "onnx/model.onnx"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[gd_scene load_steps=7 format=3 uid="uid://b4f2hcn0g5vjg"]

[ext_resource type="PackedScene" uid="uid://ca6csk8y5nvuu" path="res://scenes/playing_area.tscn" id="1_niooi"]
[ext_resource type="Script" path="res://addons/godot_rl_agents/sync.gd" id="2_15xtr"]
[ext_resource type="PackedScene" uid="uid://ca6csk8y5nvuu" path="res://scenes/playing_area.tscn" id="1_jusby"]
[ext_resource type="Script" path="res://addons/godot_rl_agents/sync.gd" id="2_a6ui1"]

[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_hfpel"]
auto_exposure_enabled = true
Expand Down Expand Up @@ -33,119 +33,117 @@ attributes = SubResource("CameraAttributesPractical_hfpel")
fov = 93.0
size = 65.0

[node name="playing_area" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area" parent="." instance=ExtResource("1_jusby")]

[node name="playing_area2" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area2" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 30)

[node name="playing_area3" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area3" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 0)

[node name="playing_area4" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area4" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 30)

[node name="playing_area5" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area5" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, 0)

[node name="playing_area6" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area6" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, 30)

[node name="playing_area7" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area7" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 0)

[node name="playing_area8" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area8" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 30)

[node name="playing_area9" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area9" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, 0)

[node name="playing_area10" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area10" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, 30)

[node name="playing_area11" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area11" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, 0)

[node name="playing_area12" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area12" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, 30)

[node name="playing_area13" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area13" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 60)

[node name="playing_area14" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area14" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 90)

[node name="playing_area15" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area15" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 60)

[node name="playing_area16" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area16" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, 90)

[node name="playing_area17" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area17" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, 60)

[node name="playing_area18" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area18" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, 90)

[node name="playing_area19" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area19" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 60)

[node name="playing_area20" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area20" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, 90)

[node name="playing_area21" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area21" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, 60)

[node name="playing_area22" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area22" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, 90)

[node name="playing_area23" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area23" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, 60)

[node name="playing_area24" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area24" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, 90)

[node name="playing_area25" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area25" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -60)

[node name="playing_area26" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area26" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -30)

[node name="playing_area27" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area27" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, -60)

[node name="playing_area28" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area28" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -30, 0, -30)

[node name="playing_area29" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area29" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, -60)

[node name="playing_area30" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area30" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 60, 0, -30)

[node name="playing_area31" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area31" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, -60)

[node name="playing_area32" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area32" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 30, 0, -30)

[node name="playing_area33" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area33" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, -60)

[node name="playing_area34" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area34" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -60, 0, -30)

[node name="playing_area35" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area35" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, -60)

[node name="playing_area36" parent="." instance=ExtResource("1_niooi")]
[node name="playing_area36" parent="." instance=ExtResource("1_jusby")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -90, 0, -30)

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_xy0xn")

[node name="Sync" type="Node" parent="."]
script = ExtResource("2_15xtr")
control_mode = 2
script = ExtResource("2_a6ui1")
action_repeat = 15
speed_up = 4
onnx_model_path = "onnx/model.onnx"

0 comments on commit 6b59f6c

Please sign in to comment.