edbeeching HF staff commited on
Commit
197258d
1 Parent(s): 1aa6035

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +28 -0
  2. CartExamples.csproj +10 -0
  3. CartExamples.csproj.old +10 -0
  4. CartExamples.sln +19 -0
  5. README.md +25 -0
  6. addons/godot_rl_agents/controller/ai_controller_2d.gd +82 -0
  7. addons/godot_rl_agents/controller/ai_controller_3d.gd +80 -0
  8. addons/godot_rl_agents/godot_rl_agents.gd +16 -0
  9. addons/godot_rl_agents/icon.png +3 -0
  10. addons/godot_rl_agents/icon.png.import +34 -0
  11. addons/godot_rl_agents/onnx/csharp/ONNXInference.cs +103 -0
  12. addons/godot_rl_agents/onnx/csharp/SessionConfigurator.cs +131 -0
  13. addons/godot_rl_agents/onnx/csharp/docs/ONNXInference.xml +31 -0
  14. addons/godot_rl_agents/onnx/csharp/docs/SessionConfigurator.xml +29 -0
  15. addons/godot_rl_agents/onnx/wrapper/ONNX_wrapper.gd +24 -0
  16. addons/godot_rl_agents/plugin.cfg +7 -0
  17. addons/godot_rl_agents/sensors/sensors_2d/ExampleRaycastSensor2D.tscn +48 -0
  18. addons/godot_rl_agents/sensors/sensors_2d/GridSensor2D.gd +216 -0
  19. addons/godot_rl_agents/sensors/sensors_2d/ISensor2D.gd +20 -0
  20. addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd +118 -0
  21. addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.tscn +7 -0
  22. addons/godot_rl_agents/sensors/sensors_3d/ExampleRaycastSensor3D.tscn +6 -0
  23. addons/godot_rl_agents/sensors/sensors_3d/GridSensor3D.gd +233 -0
  24. addons/godot_rl_agents/sensors/sensors_3d/ISensor3D.gd +20 -0
  25. addons/godot_rl_agents/sensors/sensors_3d/RGBCameraSensor3D.gd +11 -0
  26. addons/godot_rl_agents/sensors/sensors_3d/RGBCameraSensor3D.tscn +41 -0
  27. addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.gd +166 -0
  28. addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.tscn +27 -0
  29. addons/godot_rl_agents/sync.gd +342 -0
  30. bin/ItemSortingCart.console.exe +0 -0
  31. bin/ItemSortingCart.exe +3 -0
  32. bin/ItemSortingCart.pck +3 -0
  33. bin/ItemSortingCart.sh +4 -0
  34. bin/ItemSortingCart.x86_64 +3 -0
  35. bin/data_CartExamples_x86_64/CartExamples.deps.json +1074 -0
  36. bin/data_CartExamples_x86_64/CartExamples.dll +0 -0
  37. bin/data_CartExamples_x86_64/CartExamples.pdb +0 -0
  38. bin/data_CartExamples_x86_64/CartExamples.runtimeconfig.json +14 -0
  39. bin/data_CartExamples_x86_64/GodotSharp.dll +3 -0
  40. bin/data_CartExamples_x86_64/Microsoft.CSharp.dll +3 -0
  41. bin/data_CartExamples_x86_64/Microsoft.DiaSymReader.Native.amd64.dll +3 -0
  42. bin/data_CartExamples_x86_64/Microsoft.ML.OnnxRuntime.dll +0 -0
  43. bin/data_CartExamples_x86_64/Microsoft.VisualBasic.Core.dll +3 -0
  44. bin/data_CartExamples_x86_64/Microsoft.VisualBasic.dll +0 -0
  45. bin/data_CartExamples_x86_64/Microsoft.Win32.Primitives.dll +0 -0
  46. bin/data_CartExamples_x86_64/Microsoft.Win32.Registry.dll +0 -0
  47. bin/data_CartExamples_x86_64/System.AppContext.dll +0 -0
  48. bin/data_CartExamples_x86_64/System.Buffers.dll +0 -0
  49. bin/data_CartExamples_x86_64/System.Collections.Concurrent.dll +0 -0
  50. bin/data_CartExamples_x86_64/System.Collections.Immutable.dll +0 -0
.gitattributes CHANGED
@@ -53,3 +53,31 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  *.jpg filter=lfs diff=lfs merge=lfs -text
54
  *.jpeg filter=lfs diff=lfs merge=lfs -text
55
  *.webp filter=lfs diff=lfs merge=lfs -text
56
+ bin/ItemSortingCart.exe filter=lfs diff=lfs merge=lfs -text
57
+ bin/ItemSortingCart.pck filter=lfs diff=lfs merge=lfs -text
58
+ bin/ItemSortingCart.x86_64 filter=lfs diff=lfs merge=lfs -text
59
+ bin/data_CartExamples_x86_64/GodotSharp.dll filter=lfs diff=lfs merge=lfs -text
60
+ bin/data_CartExamples_x86_64/Microsoft.CSharp.dll filter=lfs diff=lfs merge=lfs -text
61
+ bin/data_CartExamples_x86_64/Microsoft.DiaSymReader.Native.amd64.dll filter=lfs diff=lfs merge=lfs -text
62
+ bin/data_CartExamples_x86_64/Microsoft.VisualBasic.Core.dll filter=lfs diff=lfs merge=lfs -text
63
+ bin/data_CartExamples_x86_64/System.Data.Common.dll filter=lfs diff=lfs merge=lfs -text
64
+ bin/data_CartExamples_x86_64/System.Linq.Expressions.dll filter=lfs diff=lfs merge=lfs -text
65
+ bin/data_CartExamples_x86_64/System.Net.Http.dll filter=lfs diff=lfs merge=lfs -text
66
+ bin/data_CartExamples_x86_64/System.Private.CoreLib.dll filter=lfs diff=lfs merge=lfs -text
67
+ bin/data_CartExamples_x86_64/System.Private.DataContractSerialization.dll filter=lfs diff=lfs merge=lfs -text
68
+ bin/data_CartExamples_x86_64/System.Private.Xml.dll filter=lfs diff=lfs merge=lfs -text
69
+ bin/data_CartExamples_x86_64/System.Reflection.Metadata.dll filter=lfs diff=lfs merge=lfs -text
70
+ bin/data_CartExamples_x86_64/System.Text.Json.dll filter=lfs diff=lfs merge=lfs -text
71
+ bin/data_CartExamples_x86_64/clrjit.dll filter=lfs diff=lfs merge=lfs -text
72
+ bin/data_CartExamples_x86_64/coreclr.dll filter=lfs diff=lfs merge=lfs -text
73
+ bin/data_CartExamples_x86_64/libclrjit.so filter=lfs diff=lfs merge=lfs -text
74
+ bin/data_CartExamples_x86_64/libcoreclr.so filter=lfs diff=lfs merge=lfs -text
75
+ bin/data_CartExamples_x86_64/libmscordaccore.so filter=lfs diff=lfs merge=lfs -text
76
+ bin/data_CartExamples_x86_64/libmscordbi.so filter=lfs diff=lfs merge=lfs -text
77
+ bin/data_CartExamples_x86_64/libonnxruntime.so filter=lfs diff=lfs merge=lfs -text
78
+ bin/data_CartExamples_x86_64/mscordaccore.dll filter=lfs diff=lfs merge=lfs -text
79
+ bin/data_CartExamples_x86_64/mscordaccore_amd64_amd64_6.0.2523.51912.dll filter=lfs diff=lfs merge=lfs -text
80
+ bin/data_CartExamples_x86_64/mscordbi.dll filter=lfs diff=lfs merge=lfs -text
81
+ bin/data_CartExamples_x86_64/onnxruntime.dll filter=lfs diff=lfs merge=lfs -text
82
+ bin/data_CartExamples_x86_64/ucrtbase.dll filter=lfs diff=lfs merge=lfs -text
83
+ scenes/static_decorations/static_decorations.blend filter=lfs diff=lfs merge=lfs -text
CartExamples.csproj ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <Project Sdk="Godot.NET.Sdk/4.1.1">
2
+ <PropertyGroup>
3
+ <TargetFramework>net6.0</TargetFramework>
4
+ <EnableDynamicLoading>true</EnableDynamicLoading>
5
+ <RootNamespace>GodotRLAgents</RootNamespace>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.15.1" />
9
+ </ItemGroup>
10
+ </Project>
CartExamples.csproj.old ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <Project Sdk="Godot.NET.Sdk/4.2.0-rc.2">
2
+ <PropertyGroup>
3
+ <TargetFramework>net6.0</TargetFramework>
4
+ <EnableDynamicLoading>true</EnableDynamicLoading>
5
+ <RootNamespace>GodotRLAgents</RootNamespace>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <PackageReference Include="Microsoft.ML.OnnxRuntime" Version="1.15.1" />
9
+ </ItemGroup>
10
+ </Project>
CartExamples.sln ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Microsoft Visual Studio Solution File, Format Version 12.00
2
+ # Visual Studio 2012
3
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CartExamples", "CartExamples.csproj", "{E883D553-AA7C-4CD8-9C89-A966186B3776}"
4
+ EndProject
5
+ Global
6
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
7
+ Debug|Any CPU = Debug|Any CPU
8
+ ExportDebug|Any CPU = ExportDebug|Any CPU
9
+ ExportRelease|Any CPU = ExportRelease|Any CPU
10
+ EndGlobalSection
11
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
12
+ {E883D553-AA7C-4CD8-9C89-A966186B3776}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13
+ {E883D553-AA7C-4CD8-9C89-A966186B3776}.Debug|Any CPU.Build.0 = Debug|Any CPU
14
+ {E883D553-AA7C-4CD8-9C89-A966186B3776}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
15
+ {E883D553-AA7C-4CD8-9C89-A966186B3776}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
16
+ {E883D553-AA7C-4CD8-9C89-A966186B3776}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
17
+ {E883D553-AA7C-4CD8-9C89-A966186B3776}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
18
+ EndGlobalSection
19
+ EndGlobal
README.md ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: godot-rl
3
+ tags:
4
+ - deep-reinforcement-learning
5
+ - reinforcement-learning
6
+ - godot-rl
7
+ - environments
8
+ - video-games
9
+ ---
10
+
11
+ A RL environment called ItemSortingCart for the Godot Game Engine.
12
+
13
+ This environment was created with: https://github.com/edbeeching/godot_rl_agents
14
+
15
+
16
+ ## Downloading the environment
17
+
18
+ After installing Godot RL Agents, download the environment with:
19
+
20
+ ```
21
+ gdrl.env_from_hub -r edbeeching/godot_rl_ItemSortingCart
22
+ ```
23
+
24
+
25
+
addons/godot_rl_agents/controller/ai_controller_2d.gd ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node2D
2
+ class_name AIController2D
3
+
4
+ @export var reset_after := 1000
5
+
6
+ var heuristic := "human"
7
+ var done := false
8
+ var reward := 0.0
9
+ var n_steps := 0
10
+ var needs_reset := false
11
+
12
+ var _player: Node2D
13
+
14
+ func _ready():
15
+ add_to_group("AGENT")
16
+
17
+ func init(player: Node2D):
18
+ _player = player
19
+
20
+ #-- Methods that need implementing using the "extend script" option in Godot --#
21
+ func get_obs() -> Dictionary:
22
+ assert(false, "the get_obs method is not implemented when extending from ai_controller")
23
+ return {"obs":[]}
24
+
25
+ func get_reward() -> float:
26
+ assert(false, "the get_reward method is not implemented when extending from ai_controller")
27
+ return 0.0
28
+
29
+ func get_action_space() -> Dictionary:
30
+ assert(false, "the get get_action_space method is not implemented when extending from ai_controller")
31
+ return {
32
+ "example_actions_continous" : {
33
+ "size": 2,
34
+ "action_type": "continuous"
35
+ },
36
+ "example_actions_discrete" : {
37
+ "size": 2,
38
+ "action_type": "discrete"
39
+ },
40
+ }
41
+
42
+ func set_action(action) -> void:
43
+ assert(false, "the get set_action method is not implemented when extending from ai_controller")
44
+ # -----------------------------------------------------------------------------#
45
+
46
+ func _physics_process(delta):
47
+ n_steps += 1
48
+ if n_steps > reset_after:
49
+ needs_reset = true
50
+
51
+ func get_obs_space():
52
+ # may need overriding if the obs space is complex
53
+ var obs = get_obs()
54
+ return {
55
+ "obs": {
56
+ "size": [len(obs["obs"])],
57
+ "space": "box"
58
+ },
59
+ }
60
+
61
+ func reset():
62
+ n_steps = 0
63
+ needs_reset = false
64
+
65
+ func reset_if_done():
66
+ if done:
67
+ reset()
68
+
69
+ func set_heuristic(h):
70
+ # sets the heuristic from "human" or "model" nothing to change here
71
+ heuristic = h
72
+
73
+ func get_done():
74
+ return done
75
+
76
+ func set_done_false():
77
+ done = false
78
+
79
+ func zero_reward():
80
+ reward = 0.0
81
+
82
+
addons/godot_rl_agents/controller/ai_controller_3d.gd ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node3D
2
+ class_name AIController3D
3
+
4
+ @export var reset_after := 1000
5
+
6
+ var heuristic := "human"
7
+ var done := false
8
+ var reward := 0.0
9
+ var n_steps := 0
10
+ var needs_reset := false
11
+
12
+ var _player: Node3D
13
+
14
+ func _ready():
15
+ add_to_group("AGENT")
16
+
17
+ func init(player: Node3D):
18
+ _player = player
19
+
20
+ #-- Methods that need implementing using the "extend script" option in Godot --#
21
+ func get_obs() -> Dictionary:
22
+ assert(false, "the get_obs method is not implemented when extending from ai_controller")
23
+ return {"obs":[]}
24
+
25
+ func get_reward() -> float:
26
+ assert(false, "the get_reward method is not implemented when extending from ai_controller")
27
+ return 0.0
28
+
29
+ func get_action_space() -> Dictionary:
30
+ assert(false, "the get get_action_space method is not implemented when extending from ai_controller")
31
+ return {
32
+ "example_actions_continous" : {
33
+ "size": 2,
34
+ "action_type": "continuous"
35
+ },
36
+ "example_actions_discrete" : {
37
+ "size": 2,
38
+ "action_type": "discrete"
39
+ },
40
+ }
41
+
42
+ func set_action(action) -> void:
43
+ assert(false, "the get set_action method is not implemented when extending from ai_controller")
44
+ # -----------------------------------------------------------------------------#
45
+
46
+ func _physics_process(delta):
47
+ n_steps += 1
48
+ if n_steps > reset_after:
49
+ needs_reset = true
50
+
51
+ func get_obs_space():
52
+ # may need overriding if the obs space is complex
53
+ var obs = get_obs()
54
+ return {
55
+ "obs": {
56
+ "size": [len(obs["obs"])],
57
+ "space": "box"
58
+ },
59
+ }
60
+
61
+ func reset():
62
+ n_steps = 0
63
+ needs_reset = false
64
+
65
+ func reset_if_done():
66
+ if done:
67
+ reset()
68
+
69
+ func set_heuristic(h):
70
+ # sets the heuristic from "human" or "model" nothing to change here
71
+ heuristic = h
72
+
73
+ func get_done():
74
+ return done
75
+
76
+ func set_done_false():
77
+ done = false
78
+
79
+ func zero_reward():
80
+ reward = 0.0
addons/godot_rl_agents/godot_rl_agents.gd ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @tool
2
+ extends EditorPlugin
3
+
4
+
5
+ func _enter_tree():
6
+ # Initialization of the plugin goes here.
7
+ # Add the new type with a name, a parent type, a script and an icon.
8
+ add_custom_type("Sync", "Node", preload("sync.gd"), preload("icon.png"))
9
+ #add_custom_type("RaycastSensor2D2", "Node", preload("raycast_sensor_2d.gd"), preload("icon.png"))
10
+
11
+
12
+ func _exit_tree():
13
+ # Clean-up of the plugin goes here.
14
+ # Always remember to remove it from the engine when deactivated.
15
+ remove_custom_type("Sync")
16
+ #remove_custom_type("RaycastSensor2D2")
addons/godot_rl_agents/icon.png ADDED

Git LFS Details

  • SHA256: e3a8bc372d3313ce1ede4e7554472e37b322178b9488bfb709e296585abd3c44
  • Pointer size: 128 Bytes
  • Size of remote file: 198 Bytes
addons/godot_rl_agents/icon.png.import ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [remap]
2
+
3
+ importer="texture"
4
+ type="CompressedTexture2D"
5
+ uid="uid://w5slviv77m7y"
6
+ path="res://.godot/imported/icon.png-45a871b53434e556222f5901d598ab34.ctex"
7
+ metadata={
8
+ "vram_texture": false
9
+ }
10
+
11
+ [deps]
12
+
13
+ source_file="res://addons/godot_rl_agents/icon.png"
14
+ dest_files=["res://.godot/imported/icon.png-45a871b53434e556222f5901d598ab34.ctex"]
15
+
16
+ [params]
17
+
18
+ compress/mode=0
19
+ compress/high_quality=false
20
+ compress/lossy_quality=0.7
21
+ compress/hdr_compression=1
22
+ compress/normal_map=0
23
+ compress/channel_pack=0
24
+ mipmaps/generate=false
25
+ mipmaps/limit=-1
26
+ roughness/mode=0
27
+ roughness/src_normal=""
28
+ process/fix_alpha_border=true
29
+ process/premult_alpha=false
30
+ process/normal_map_invert_y=false
31
+ process/hdr_as_srgb=false
32
+ process/hdr_clamp_exposure=false
33
+ process/size_limit=0
34
+ detect_3d/compress_to=1
addons/godot_rl_agents/onnx/csharp/ONNXInference.cs ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using Godot;
2
+ using Microsoft.ML.OnnxRuntime;
3
+ using Microsoft.ML.OnnxRuntime.Tensors;
4
+ using System.Collections.Generic;
5
+ using System.Linq;
6
+
7
+ namespace GodotONNX
8
+ {
9
+ /// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/ONNXInference/*'/>
10
+ public partial class ONNXInference : GodotObject
11
+ {
12
+
13
+ private InferenceSession session;
14
+ /// <summary>
15
+ /// Path to the ONNX model. Use Initialize to change it.
16
+ /// </summary>
17
+ private string modelPath;
18
+ private int batchSize;
19
+
20
+ private SessionOptions SessionOpt;
21
+
22
+ //init function
23
+ /// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/Initialize/*'/>
24
+ public void Initialize(string Path, int BatchSize)
25
+ {
26
+ modelPath = Path;
27
+ batchSize = BatchSize;
28
+ SessionOpt = SessionConfigurator.MakeConfiguredSessionOptions();
29
+ session = LoadModel(modelPath);
30
+
31
+ }
32
+ /// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/Run/*'/>
33
+ public Godot.Collections.Dictionary<string, Godot.Collections.Array<float>> RunInference(Godot.Collections.Array<float> obs, int state_ins)
34
+ {
35
+ //Current model: Any (Godot Rl Agents)
36
+ //Expects a tensor of shape [batch_size, input_size] type float named obs and a tensor of shape [batch_size] type float named state_ins
37
+
38
+ //Fill the input tensors
39
+ // create span from inputSize
40
+ var span = new float[obs.Count]; //There's probably a better way to do this
41
+ for (int i = 0; i < obs.Count; i++)
42
+ {
43
+ span[i] = obs[i];
44
+ }
45
+
46
+ IReadOnlyCollection<NamedOnnxValue> inputs = new List<NamedOnnxValue>
47
+ {
48
+ NamedOnnxValue.CreateFromTensor("obs", new DenseTensor<float>(span, new int[] { batchSize, obs.Count })),
49
+ NamedOnnxValue.CreateFromTensor("state_ins", new DenseTensor<float>(new float[] { state_ins }, new int[] { batchSize }))
50
+ };
51
+ IReadOnlyCollection<string> outputNames = new List<string> { "output", "state_outs" }; //ONNX is sensible to these names, as well as the input names
52
+
53
+ IDisposableReadOnlyCollection<DisposableNamedOnnxValue> results;
54
+ //We do not use "using" here so we get a better exception explaination later
55
+ try
56
+ {
57
+ results = session.Run(inputs, outputNames);
58
+ }
59
+ catch (OnnxRuntimeException e)
60
+ {
61
+ //This error usually means that the model is not compatible with the input, beacause of the input shape (size)
62
+ GD.Print("Error at inference: ", e);
63
+ return null;
64
+ }
65
+ //Can't convert IEnumerable<float> to Variant, so we have to convert it to an array or something
66
+ Godot.Collections.Dictionary<string, Godot.Collections.Array<float>> output = new Godot.Collections.Dictionary<string, Godot.Collections.Array<float>>();
67
+ DisposableNamedOnnxValue output1 = results.First();
68
+ DisposableNamedOnnxValue output2 = results.Last();
69
+ Godot.Collections.Array<float> output1Array = new Godot.Collections.Array<float>();
70
+ Godot.Collections.Array<float> output2Array = new Godot.Collections.Array<float>();
71
+
72
+ foreach (float f in output1.AsEnumerable<float>())
73
+ {
74
+ output1Array.Add(f);
75
+ }
76
+
77
+ foreach (float f in output2.AsEnumerable<float>())
78
+ {
79
+ output2Array.Add(f);
80
+ }
81
+
82
+ output.Add(output1.Name, output1Array);
83
+ output.Add(output2.Name, output2Array);
84
+
85
+ //Output is a dictionary of arrays, ex: { "output" : [0.1, 0.2, 0.3, 0.4, ...], "state_outs" : [0.5, ...]}
86
+ results.Dispose();
87
+ return output;
88
+ }
89
+ /// <include file='docs/ONNXInference.xml' path='docs/members[@name="ONNXInference"]/Load/*'/>
90
+ public InferenceSession LoadModel(string Path)
91
+ {
92
+ using Godot.FileAccess file = FileAccess.Open(Path, Godot.FileAccess.ModeFlags.Read);
93
+ byte[] model = file.GetBuffer((int)file.GetLength());
94
+ //file.Close(); file.Dispose(); //Close the file, then dispose the reference.
95
+ return new InferenceSession(model, SessionOpt); //Load the model
96
+ }
97
+ public void FreeDisposables()
98
+ {
99
+ session.Dispose();
100
+ SessionOpt.Dispose();
101
+ }
102
+ }
103
+ }
addons/godot_rl_agents/onnx/csharp/SessionConfigurator.cs ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using Godot;
2
+ using Microsoft.ML.OnnxRuntime;
3
+
4
+ namespace GodotONNX
5
+ {
6
+ /// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/SessionConfigurator/*'/>
7
+
8
+ public static class SessionConfigurator
9
+ {
10
+ public enum ComputeName
11
+ {
12
+ CUDA,
13
+ ROCm,
14
+ DirectML,
15
+ CoreML,
16
+ CPU
17
+ }
18
+
19
+ /// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/GetSessionOptions/*'/>
20
+ public static SessionOptions MakeConfiguredSessionOptions()
21
+ {
22
+ SessionOptions sessionOptions = new();
23
+ SetOptions(sessionOptions);
24
+ return sessionOptions;
25
+ }
26
+
27
+ private static void SetOptions(SessionOptions sessionOptions)
28
+ {
29
+ sessionOptions.LogSeverityLevel = OrtLoggingLevel.ORT_LOGGING_LEVEL_WARNING;
30
+ ApplySystemSpecificOptions(sessionOptions);
31
+ }
32
+
33
+ /// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/SystemCheck/*'/>
34
+ static public void ApplySystemSpecificOptions(SessionOptions sessionOptions)
35
+ {
36
+ //Most code for this function is verbose only, the only reason it exists is to track
37
+ //implementation progress of the different compute APIs.
38
+
39
+ //December 2022: CUDA is not working.
40
+
41
+ string OSName = OS.GetName(); //Get OS Name
42
+
43
+ //ComputeName ComputeAPI = ComputeCheck(); //Get Compute API
44
+ // //TODO: Get CPU architecture
45
+
46
+ //Linux can use OpenVINO (C#) on x64 and ROCm on x86 (GDNative/C++)
47
+ //Windows can use OpenVINO (C#) on x64
48
+ //TODO: try TensorRT instead of CUDA
49
+ //TODO: Use OpenVINO for Intel Graphics
50
+
51
+ // Temporarily using CPU on all platforms to avoid errors detected with DML
52
+ ComputeName ComputeAPI = ComputeName.CPU;
53
+
54
+ //match OS and Compute API
55
+ GD.Print($"OS: {OSName} Compute API: {ComputeAPI}");
56
+
57
+ // CPU is set by default without appending necessary
58
+ // sessionOptions.AppendExecutionProvider_CPU(0);
59
+
60
+ /*
61
+ switch (OSName)
62
+ {
63
+ case "Windows": //Can use CUDA, DirectML
64
+ if (ComputeAPI is ComputeName.CUDA)
65
+ {
66
+ //CUDA
67
+ //sessionOptions.AppendExecutionProvider_CUDA(0);
68
+ //sessionOptions.AppendExecutionProvider_DML(0);
69
+ }
70
+ else if (ComputeAPI is ComputeName.DirectML)
71
+ {
72
+ //DirectML
73
+ //sessionOptions.AppendExecutionProvider_DML(0);
74
+ }
75
+ break;
76
+ case "X11": //Can use CUDA, ROCm
77
+ if (ComputeAPI is ComputeName.CUDA)
78
+ {
79
+ //CUDA
80
+ //sessionOptions.AppendExecutionProvider_CUDA(0);
81
+ }
82
+ if (ComputeAPI is ComputeName.ROCm)
83
+ {
84
+ //ROCm, only works on x86
85
+ //Research indicates that this has to be compiled as a GDNative plugin
86
+ //GD.Print("ROCm not supported yet, using CPU.");
87
+ //sessionOptions.AppendExecutionProvider_CPU(0);
88
+ }
89
+ break;
90
+ case "macOS": //Can use CoreML
91
+ if (ComputeAPI is ComputeName.CoreML)
92
+ { //CoreML
93
+ //TODO: Needs testing
94
+ //sessionOptions.AppendExecutionProvider_CoreML(0);
95
+ //CoreML on ARM64, out of the box, on x64 needs .tar file from GitHub
96
+ }
97
+ break;
98
+ default:
99
+ GD.Print("OS not Supported.");
100
+ break;
101
+ }
102
+ */
103
+ }
104
+
105
+
106
+ /// <include file='docs/SessionConfigurator.xml' path='docs/members[@name="SessionConfigurator"]/ComputeCheck/*'/>
107
+ public static ComputeName ComputeCheck()
108
+ {
109
+ string adapterName = Godot.RenderingServer.GetVideoAdapterName();
110
+ //string adapterVendor = Godot.RenderingServer.GetVideoAdapterVendor();
111
+ adapterName = adapterName.ToUpper(new System.Globalization.CultureInfo(""));
112
+ //TODO: GPU vendors for MacOS, what do they even use these days?
113
+
114
+ if (adapterName.Contains("INTEL"))
115
+ {
116
+ return ComputeName.DirectML;
117
+ }
118
+ if (adapterName.Contains("AMD") || adapterName.Contains("RADEON"))
119
+ {
120
+ return ComputeName.DirectML;
121
+ }
122
+ if (adapterName.Contains("NVIDIA"))
123
+ {
124
+ return ComputeName.CUDA;
125
+ }
126
+
127
+ GD.Print("Graphics Card not recognized."); //Should use CPU
128
+ return ComputeName.CPU;
129
+ }
130
+ }
131
+ }
addons/godot_rl_agents/onnx/csharp/docs/ONNXInference.xml ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <docs>
2
+ <members name="ONNXInference">
3
+ <ONNXInference>
4
+ <summary>
5
+ The main <c>ONNXInference</c> Class that handles the inference process.
6
+ </summary>
7
+ </ONNXInference>
8
+ <Initialize>
9
+ <summary>
10
+ Starts the inference process.
11
+ </summary>
12
+ <param name="Path">Path to the ONNX model, expects a path inside resources.</param>
13
+ <param name="BatchSize">How many observations will the model recieve.</param>
14
+ </Initialize>
15
+ <Run>
16
+ <summary>
17
+ Runs the given input through the model and returns the output.
18
+ </summary>
19
+ <param name="obs">Dictionary containing all observations.</param>
20
+ <param name="state_ins">How many different agents are creating these observations.</param>
21
+ <returns>A Dictionary of arrays, containing instructions based on the observations.</returns>
22
+ </Run>
23
+ <Load>
24
+ <summary>
25
+ Loads the given model into the inference process, using the best Execution provider available.
26
+ </summary>
27
+ <param name="Path">Path to the ONNX model, expects a path inside resources.</param>
28
+ <returns>InferenceSession ready to run.</returns>
29
+ </Load>
30
+ </members>
31
+ </docs>
addons/godot_rl_agents/onnx/csharp/docs/SessionConfigurator.xml ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <docs>
2
+ <members name="SessionConfigurator">
3
+ <SessionConfigurator>
4
+ <summary>
5
+ The main <c>SessionConfigurator</c> Class that handles the execution options and providers for the inference process.
6
+ </summary>
7
+ </SessionConfigurator>
8
+ <GetSessionOptions>
9
+ <summary>
10
+ Creates a SessionOptions with all available execution providers.
11
+ </summary>
12
+ <returns>SessionOptions with all available execution providers.</returns>
13
+ </GetSessionOptions>
14
+ <SystemCheck>
15
+ <summary>
16
+ Appends any execution provider available in the current system.
17
+ </summary>
18
+ <remarks>
19
+ This function is mainly verbose for tracking implementation progress of different compute APIs.
20
+ </remarks>
21
+ </SystemCheck>
22
+ <ComputeCheck>
23
+ <summary>
24
+ Checks for available GPUs.
25
+ </summary>
26
+ <returns>An integer identifier for each compute platform.</returns>
27
+ </ComputeCheck>
28
+ </members>
29
+ </docs>
addons/godot_rl_agents/onnx/wrapper/ONNX_wrapper.gd ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Resource
2
+ class_name ONNXModel
3
+ var inferencer_script = load("res://addons/godot_rl_agents/onnx/csharp/ONNXInference.cs")
4
+
5
+ var inferencer = null
6
+
7
+ # Must provide the path to the model and the batch size
8
+ func _init(model_path, batch_size):
9
+ inferencer = inferencer_script.new()
10
+ inferencer.Initialize(model_path, batch_size)
11
+
12
+ # This function is the one that will be called from the game,
13
+ # requires the observation as an array and the state_ins as an int
14
+ # returns an Array containing the action the model takes.
15
+ func run_inference(obs : Array, state_ins : int) -> Dictionary:
16
+ if inferencer == null:
17
+ printerr("Inferencer not initialized")
18
+ return {}
19
+ return inferencer.RunInference(obs, state_ins)
20
+
21
+ func _notification(what):
22
+ if what == NOTIFICATION_PREDELETE:
23
+ inferencer.FreeDisposables()
24
+ inferencer.free()
addons/godot_rl_agents/plugin.cfg ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [plugin]
2
+
3
+ name="GodotRLAgents"
4
+ description="Custom nodes for the godot rl agents toolkit "
5
+ author="Edward Beeching"
6
+ version="0.1"
7
+ script="godot_rl_agents.gd"
addons/godot_rl_agents/sensors/sensors_2d/ExampleRaycastSensor2D.tscn ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [gd_scene load_steps=5 format=3 uid="uid://ddeq7mn1ealyc"]
2
+
3
+ [ext_resource type="Script" path="res://addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd" id="1"]
4
+
5
+ [sub_resource type="GDScript" id="2"]
6
+ script/source = "extends Node2D
7
+
8
+
9
+
10
+ func _physics_process(delta: float) -> void:
11
+ print(\"step start\")
12
+
13
+ "
14
+
15
+ [sub_resource type="GDScript" id="1"]
16
+ script/source = "extends RayCast2D
17
+
18
+ var steps = 1
19
+
20
+ func _physics_process(delta: float) -> void:
21
+ print(\"processing raycast\")
22
+ steps += 1
23
+ if steps % 2:
24
+ force_raycast_update()
25
+
26
+ print(is_colliding())
27
+ "
28
+
29
+ [sub_resource type="CircleShape2D" id="3"]
30
+
31
+ [node name="ExampleRaycastSensor2D" type="Node2D"]
32
+ script = SubResource("2")
33
+
34
+ [node name="ExampleAgent" type="Node2D" parent="."]
35
+ position = Vector2(573, 314)
36
+ rotation = 0.286234
37
+
38
+ [node name="RaycastSensor2D" type="Node2D" parent="ExampleAgent"]
39
+ script = ExtResource("1")
40
+
41
+ [node name="TestRayCast2D" type="RayCast2D" parent="."]
42
+ script = SubResource("1")
43
+
44
+ [node name="StaticBody2D" type="StaticBody2D" parent="."]
45
+ position = Vector2(1, 52)
46
+
47
+ [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
48
+ shape = SubResource("3")
addons/godot_rl_agents/sensors/sensors_2d/GridSensor2D.gd ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @tool
2
+ extends ISensor2D
3
+ class_name GridSensor2D
4
+
5
+ @export var debug_view := false:
6
+ get: return debug_view
7
+ set(value):
8
+ debug_view = value
9
+ _update()
10
+
11
+ @export_flags_2d_physics var detection_mask := 0:
12
+ get: return detection_mask
13
+ set(value):
14
+ detection_mask = value
15
+ _update()
16
+
17
+ @export var collide_with_areas := false:
18
+ get: return collide_with_areas
19
+ set(value):
20
+ collide_with_areas = value
21
+ _update()
22
+
23
+ @export var collide_with_bodies := true:
24
+ get: return collide_with_bodies
25
+ set(value):
26
+ collide_with_bodies = value
27
+ _update()
28
+
29
+ @export_range(1, 200, 0.1) var cell_width := 20.0:
30
+ get: return cell_width
31
+ set(value):
32
+ cell_width = value
33
+ _update()
34
+
35
+ @export_range(1, 200, 0.1) var cell_height := 20.0:
36
+ get: return cell_height
37
+ set(value):
38
+ cell_height = value
39
+ _update()
40
+
41
+ @export_range(1, 21, 2, "or_greater") var grid_size_x := 3:
42
+ get: return grid_size_x
43
+ set(value):
44
+ grid_size_x = value
45
+ _update()
46
+
47
+ @export_range(1, 21, 2, "or_greater") var grid_size_y := 3:
48
+ get: return grid_size_y
49
+ set(value):
50
+ grid_size_y = value
51
+ _update()
52
+
53
+ var _obs_buffer: PackedFloat64Array
54
+ var _rectangle_shape: RectangleShape2D
55
+ var _collision_mapping: Dictionary
56
+ var _n_layers_per_cell: int
57
+
58
+ var _highlighted_cell_color: Color
59
+ var _standard_cell_color: Color
60
+
61
+ func get_observation():
62
+ return _obs_buffer
63
+
64
+ func _update():
65
+ if Engine.is_editor_hint():
66
+ if is_node_ready():
67
+ _spawn_nodes()
68
+
69
+ func _ready() -> void:
70
+ _set_colors()
71
+
72
+ if Engine.is_editor_hint():
73
+ if get_child_count() == 0:
74
+ _spawn_nodes()
75
+ else:
76
+ _spawn_nodes()
77
+
78
+
79
+ func _set_colors() -> void:
80
+ _standard_cell_color = Color(100.0/255.0, 100.0/255.0, 100.0/255.0, 100.0/255.0)
81
+ _highlighted_cell_color = Color(255.0/255.0, 100.0/255.0, 100.0/255.0, 100.0/255.0)
82
+
83
+ func _get_collision_mapping() -> Dictionary:
84
+ # defines which layer is mapped to which cell obs index
85
+ var total_bits = 0
86
+ var collision_mapping = {}
87
+ for i in 32:
88
+ var bit_mask = 2**i
89
+ if (detection_mask & bit_mask) > 0:
90
+ collision_mapping[i] = total_bits
91
+ total_bits += 1
92
+
93
+ return collision_mapping
94
+
95
+ func _spawn_nodes():
96
+ for cell in get_children():
97
+ cell.name = "_%s" % cell.name # Otherwise naming below will fail
98
+ cell.queue_free()
99
+
100
+ _collision_mapping = _get_collision_mapping()
101
+ #prints("collision_mapping", _collision_mapping, len(_collision_mapping))
102
+ # allocate memory for the observations
103
+ _n_layers_per_cell = len(_collision_mapping)
104
+ _obs_buffer = PackedFloat64Array()
105
+ _obs_buffer.resize(grid_size_x*grid_size_y*_n_layers_per_cell)
106
+ _obs_buffer.fill(0)
107
+ #prints(len(_obs_buffer), _obs_buffer )
108
+
109
+ _rectangle_shape = RectangleShape2D.new()
110
+ _rectangle_shape.set_size(Vector2(cell_width, cell_height))
111
+
112
+ var shift := Vector2(
113
+ -(grid_size_x/2)*cell_width,
114
+ -(grid_size_y/2)*cell_height,
115
+ )
116
+
117
+ for i in grid_size_x:
118
+ for j in grid_size_y:
119
+ var cell_position = Vector2(i*cell_width, j*cell_height) + shift
120
+ _create_cell(i, j, cell_position)
121
+
122
+
123
+ func _create_cell(i:int, j:int, position: Vector2):
124
+ var cell : = Area2D.new()
125
+ cell.position = position
126
+ cell.name = "GridCell %s %s" %[i, j]
127
+ cell.modulate = _standard_cell_color
128
+
129
+ if collide_with_areas:
130
+ cell.area_entered.connect(_on_cell_area_entered.bind(i, j))
131
+ cell.area_exited.connect(_on_cell_area_exited.bind(i, j))
132
+
133
+ if collide_with_bodies:
134
+ cell.body_entered.connect(_on_cell_body_entered.bind(i, j))
135
+ cell.body_exited.connect(_on_cell_body_exited.bind(i, j))
136
+
137
+ cell.collision_layer = 0
138
+ cell.collision_mask = detection_mask
139
+ cell.monitorable = true
140
+ add_child(cell)
141
+ cell.set_owner(get_tree().edited_scene_root)
142
+
143
+ var col_shape : = CollisionShape2D.new()
144
+ col_shape.shape = _rectangle_shape
145
+ col_shape.name = "CollisionShape2D"
146
+ cell.add_child(col_shape)
147
+ col_shape.set_owner(get_tree().edited_scene_root)
148
+
149
+ if debug_view:
150
+ var quad = MeshInstance2D.new()
151
+ quad.name = "MeshInstance2D"
152
+ var quad_mesh = QuadMesh.new()
153
+
154
+ quad_mesh.set_size(Vector2(cell_width, cell_height))
155
+
156
+ quad.mesh = quad_mesh
157
+ cell.add_child(quad)
158
+ quad.set_owner(get_tree().edited_scene_root)
159
+
160
+ func _update_obs(cell_i:int, cell_j:int, collision_layer:int, entered: bool):
161
+ for key in _collision_mapping:
162
+ var bit_mask = 2**key
163
+ if (collision_layer & bit_mask) > 0:
164
+ var collison_map_index = _collision_mapping[key]
165
+
166
+ var obs_index = (
167
+ (cell_i * grid_size_x * _n_layers_per_cell) +
168
+ (cell_j * _n_layers_per_cell) +
169
+ collison_map_index
170
+ )
171
+ #prints(obs_index, cell_i, cell_j)
172
+ if entered:
173
+ _obs_buffer[obs_index] += 1
174
+ else:
175
+ _obs_buffer[obs_index] -= 1
176
+
177
+ func _toggle_cell(cell_i:int, cell_j:int):
178
+ var cell = get_node_or_null("GridCell %s %s" %[cell_i, cell_j])
179
+
180
+ if cell == null:
181
+ print("cell not found, returning")
182
+
183
+ var n_hits = 0
184
+ var start_index = (cell_i * grid_size_x * _n_layers_per_cell) + (cell_j * _n_layers_per_cell)
185
+ for i in _n_layers_per_cell:
186
+ n_hits += _obs_buffer[start_index+i]
187
+
188
+ if n_hits > 0:
189
+ cell.modulate = _highlighted_cell_color
190
+ else:
191
+ cell.modulate = _standard_cell_color
192
+
193
+ func _on_cell_area_entered(area:Area2D, cell_i:int, cell_j:int):
194
+ #prints("_on_cell_area_entered", cell_i, cell_j)
195
+ _update_obs(cell_i, cell_j, area.collision_layer, true)
196
+ if debug_view:
197
+ _toggle_cell(cell_i, cell_j)
198
+ #print(_obs_buffer)
199
+
200
+ func _on_cell_area_exited(area:Area2D, cell_i:int, cell_j:int):
201
+ #prints("_on_cell_area_exited", cell_i, cell_j)
202
+ _update_obs(cell_i, cell_j, area.collision_layer, false)
203
+ if debug_view:
204
+ _toggle_cell(cell_i, cell_j)
205
+
206
+ func _on_cell_body_entered(body: Node2D, cell_i:int, cell_j:int):
207
+ #prints("_on_cell_body_entered", cell_i, cell_j)
208
+ _update_obs(cell_i, cell_j, body.collision_layer, true)
209
+ if debug_view:
210
+ _toggle_cell(cell_i, cell_j)
211
+
212
+ func _on_cell_body_exited(body: Node2D, cell_i:int, cell_j:int):
213
+ #prints("_on_cell_body_exited", cell_i, cell_j)
214
+ _update_obs(cell_i, cell_j, body.collision_layer, false)
215
+ if debug_view:
216
+ _toggle_cell(cell_i, cell_j)
addons/godot_rl_agents/sensors/sensors_2d/ISensor2D.gd ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node2D
2
+ class_name ISensor2D
3
+
4
+ var _obs : Array = []
5
+ var _active := false
6
+
7
+ func get_observation():
8
+ pass
9
+
10
+ func activate():
11
+ _active = true
12
+
13
+ func deactivate():
14
+ _active = false
15
+
16
+ func _update_observation():
17
+ pass
18
+
19
+ func reset():
20
+ pass
addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @tool
2
+ extends ISensor2D
3
+ class_name RaycastSensor2D
4
+
5
+ @export_flags_2d_physics var collision_mask := 1:
6
+ get: return collision_mask
7
+ set(value):
8
+ collision_mask = value
9
+ _update()
10
+
11
+ @export var collide_with_areas := false:
12
+ get: return collide_with_areas
13
+ set(value):
14
+ collide_with_areas = value
15
+ _update()
16
+
17
+ @export var collide_with_bodies := true:
18
+ get: return collide_with_bodies
19
+ set(value):
20
+ collide_with_bodies = value
21
+ _update()
22
+
23
+ @export var n_rays := 16.0:
24
+ get: return n_rays
25
+ set(value):
26
+ n_rays = value
27
+ _update()
28
+
29
+ @export_range(5,200,5.0) var ray_length := 200:
30
+ get: return ray_length
31
+ set(value):
32
+ ray_length = value
33
+ _update()
34
+ @export_range(5,360,5.0) var cone_width := 360.0:
35
+ get: return cone_width
36
+ set(value):
37
+ cone_width = value
38
+ _update()
39
+
40
+ @export var debug_draw := true :
41
+ get: return debug_draw
42
+ set(value):
43
+ debug_draw = value
44
+ _update()
45
+
46
+
47
+ var _angles = []
48
+ var rays := []
49
+
50
+ func _update():
51
+ if Engine.is_editor_hint():
52
+ if debug_draw:
53
+ _spawn_nodes()
54
+ else:
55
+ for ray in get_children():
56
+ if ray is RayCast2D:
57
+ remove_child(ray)
58
+
59
+ func _ready() -> void:
60
+ _spawn_nodes()
61
+
62
+ func _spawn_nodes():
63
+ for ray in rays:
64
+ ray.queue_free()
65
+ rays = []
66
+
67
+ _angles = []
68
+ var step = cone_width / (n_rays)
69
+ var start = step/2 - cone_width/2
70
+
71
+ for i in n_rays:
72
+ var angle = start + i * step
73
+ var ray = RayCast2D.new()
74
+ ray.set_target_position(Vector2(
75
+ ray_length*cos(deg_to_rad(angle)),
76
+ ray_length*sin(deg_to_rad(angle))
77
+ ))
78
+ ray.set_name("node_"+str(i))
79
+ ray.enabled = true
80
+ ray.collide_with_areas = collide_with_areas
81
+ ray.collide_with_bodies = collide_with_bodies
82
+ ray.collision_mask = collision_mask
83
+ add_child(ray)
84
+ rays.append(ray)
85
+
86
+
87
+ _angles.append(start + i * step)
88
+
89
+
90
+ func _physics_process(delta: float) -> void:
91
+ if self._active:
92
+ self._obs = calculate_raycasts()
93
+
94
+ func get_observation() -> Array:
95
+ if len(self._obs) == 0:
96
+ print("obs was null, forcing raycast update")
97
+ return self.calculate_raycasts()
98
+ return self._obs
99
+
100
+
101
+ func calculate_raycasts() -> Array:
102
+ var result = []
103
+ for ray in rays:
104
+ ray.force_raycast_update()
105
+ var distance = _get_raycast_distance(ray)
106
+ result.append(distance)
107
+ return result
108
+
109
+ func _get_raycast_distance(ray : RayCast2D) -> float :
110
+ if !ray.is_colliding():
111
+ return 0.0
112
+
113
+ var distance = (global_position - ray.get_collision_point()).length()
114
+ distance = clamp(distance, 0.0, ray_length)
115
+ return (ray_length - distance) / ray_length
116
+
117
+
118
+
addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.tscn ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ [gd_scene load_steps=2 format=3 uid="uid://drvfihk5esgmv"]
2
+
3
+ [ext_resource type="Script" path="res://addons/godot_rl_agents/sensors/sensors_2d/RaycastSensor2D.gd" id="1"]
4
+
5
+ [node name="RaycastSensor2D" type="Node2D"]
6
+ script = ExtResource("1")
7
+ n_rays = 17.0
addons/godot_rl_agents/sensors/sensors_3d/ExampleRaycastSensor3D.tscn ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ [gd_scene format=3 uid="uid://biu787qh4woik"]
2
+
3
+ [node name="ExampleRaycastSensor3D" type="Node3D"]
4
+
5
+ [node name="Camera3D" type="Camera3D" parent="."]
6
+ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.804183, 0, 2.70146)
addons/godot_rl_agents/sensors/sensors_3d/GridSensor3D.gd ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @tool
2
+ extends ISensor3D
3
+ class_name GridSensor3D
4
+
5
+ @export var debug_view := false:
6
+ get: return debug_view
7
+ set(value):
8
+ debug_view = value
9
+ _update()
10
+
11
+ @export_flags_3d_physics var detection_mask := 0:
12
+ get: return detection_mask
13
+ set(value):
14
+ detection_mask = value
15
+ _update()
16
+
17
+ @export var collide_with_areas := false:
18
+ get: return collide_with_areas
19
+ set(value):
20
+ collide_with_areas = value
21
+ _update()
22
+
23
+ @export var collide_with_bodies := false:
24
+ # NOTE! The sensor will not detect StaticBody3D, add an area to static bodies to detect them
25
+ get: return collide_with_bodies
26
+ set(value):
27
+ collide_with_bodies = value
28
+ _update()
29
+
30
+ @export_range(0.1, 2, 0.1) var cell_width := 1.0:
31
+ get: return cell_width
32
+ set(value):
33
+ cell_width = value
34
+ _update()
35
+
36
+ @export_range(0.1, 2, 0.1) var cell_height := 1.0:
37
+ get: return cell_height
38
+ set(value):
39
+ cell_height = value
40
+ _update()
41
+
42
+ @export_range(1, 21, 2, "or_greater") var grid_size_x := 3:
43
+ get: return grid_size_x
44
+ set(value):
45
+ grid_size_x = value
46
+ _update()
47
+
48
+ @export_range(1, 21, 2, "or_greater") var grid_size_z := 3:
49
+ get: return grid_size_z
50
+ set(value):
51
+ grid_size_z = value
52
+ _update()
53
+
54
+ var _obs_buffer: PackedFloat64Array
55
+ var _box_shape: BoxShape3D
56
+ var _collision_mapping: Dictionary
57
+ var _n_layers_per_cell: int
58
+
59
+ var _highlighted_box_material: StandardMaterial3D
60
+ var _standard_box_material: StandardMaterial3D
61
+
62
+ func get_observation():
63
+ return _obs_buffer
64
+
65
+ func reset():
66
+ _obs_buffer.fill(0)
67
+
68
+ func _update():
69
+ if Engine.is_editor_hint():
70
+ if is_node_ready():
71
+ _spawn_nodes()
72
+
73
+ func _ready() -> void:
74
+ _make_materials()
75
+
76
+ if Engine.is_editor_hint():
77
+ if get_child_count() == 0:
78
+ _spawn_nodes()
79
+ else:
80
+ _spawn_nodes()
81
+
82
+ func _make_materials() -> void:
83
+ if _highlighted_box_material != null and _standard_box_material != null:
84
+ return
85
+
86
+ _standard_box_material = StandardMaterial3D.new()
87
+ _standard_box_material.set_transparency(1) # ALPHA
88
+ _standard_box_material.albedo_color = Color(100.0/255.0, 100.0/255.0, 100.0/255.0, 100.0/255.0)
89
+
90
+ _highlighted_box_material = StandardMaterial3D.new()
91
+ _highlighted_box_material.set_transparency(1) # ALPHA
92
+ _highlighted_box_material.albedo_color = Color(255.0/255.0, 100.0/255.0, 100.0/255.0, 100.0/255.0)
93
+
94
+ func _get_collision_mapping() -> Dictionary:
95
+ # defines which layer is mapped to which cell obs index
96
+ var total_bits = 0
97
+ var collision_mapping = {}
98
+ for i in 32:
99
+ var bit_mask = 2**i
100
+ if (detection_mask & bit_mask) > 0:
101
+ collision_mapping[i] = total_bits
102
+ total_bits += 1
103
+
104
+ return collision_mapping
105
+
106
+ func _spawn_nodes():
107
+ for cell in get_children():
108
+ cell.name = "_%s" % cell.name # Otherwise naming below will fail
109
+ cell.queue_free()
110
+
111
+ _collision_mapping = _get_collision_mapping()
112
+ #prints("collision_mapping", _collision_mapping, len(_collision_mapping))
113
+ # allocate memory for the observations
114
+ _n_layers_per_cell = len(_collision_mapping)
115
+ _obs_buffer = PackedFloat64Array()
116
+ _obs_buffer.resize(grid_size_x*grid_size_z*_n_layers_per_cell)
117
+ _obs_buffer.fill(0)
118
+ #prints(len(_obs_buffer), _obs_buffer )
119
+
120
+ _box_shape = BoxShape3D.new()
121
+ _box_shape.set_size(Vector3(cell_width, cell_height, cell_width))
122
+
123
+ var shift := Vector3(
124
+ -(grid_size_x/2)*cell_width,
125
+ 0,
126
+ -(grid_size_z/2)*cell_width,
127
+ )
128
+
129
+ for i in grid_size_x:
130
+ for j in grid_size_z:
131
+ var cell_position = Vector3(i*cell_width, 0.0, j*cell_width) + shift
132
+ _create_cell(i, j, cell_position)
133
+
134
+
135
+ func _create_cell(i:int, j:int, position: Vector3):
136
+ var cell : = Area3D.new()
137
+ cell.position = position
138
+ cell.name = "GridCell %s %s" %[i, j]
139
+
140
+ if collide_with_areas:
141
+ cell.area_entered.connect(_on_cell_area_entered.bind(i, j))
142
+ cell.area_exited.connect(_on_cell_area_exited.bind(i, j))
143
+
144
+ if collide_with_bodies:
145
+ cell.body_entered.connect(_on_cell_body_entered.bind(i, j))
146
+ cell.body_exited.connect(_on_cell_body_exited.bind(i, j))
147
+
148
+ # cell.body_shape_entered.connect(_on_cell_body_shape_entered.bind(i, j))
149
+ # cell.body_shape_exited.connect(_on_cell_body_shape_exited.bind(i, j))
150
+
151
+ cell.collision_layer = 0
152
+ cell.collision_mask = detection_mask
153
+ cell.monitorable = true
154
+ cell.input_ray_pickable = false
155
+ add_child(cell)
156
+ cell.set_owner(get_tree().edited_scene_root)
157
+
158
+ var col_shape : = CollisionShape3D.new()
159
+ col_shape.shape = _box_shape
160
+ col_shape.name = "CollisionShape3D"
161
+ cell.add_child(col_shape)
162
+ col_shape.set_owner(get_tree().edited_scene_root)
163
+
164
+ if debug_view:
165
+ var box = MeshInstance3D.new()
166
+ box.name = "MeshInstance3D"
167
+ var box_mesh = BoxMesh.new()
168
+
169
+ box_mesh.set_size(Vector3(cell_width, cell_height, cell_width))
170
+ box_mesh.material = _standard_box_material
171
+
172
+ box.mesh = box_mesh
173
+ cell.add_child(box)
174
+ box.set_owner(get_tree().edited_scene_root)
175
+
176
+ func _update_obs(cell_i:int, cell_j:int, collision_layer:int, entered: bool):
177
+ for key in _collision_mapping:
178
+ var bit_mask = 2**key
179
+ if (collision_layer & bit_mask) > 0:
180
+ var collison_map_index = _collision_mapping[key]
181
+
182
+ var obs_index = (
183
+ (cell_i * grid_size_x * _n_layers_per_cell) +
184
+ (cell_j * _n_layers_per_cell) +
185
+ collison_map_index
186
+ )
187
+ #prints(obs_index, cell_i, cell_j)
188
+ if entered:
189
+ _obs_buffer[obs_index] += 1
190
+ else:
191
+ _obs_buffer[obs_index] -= 1
192
+
193
+ func _toggle_cell(cell_i:int, cell_j:int):
194
+ var cell = get_node_or_null("GridCell %s %s" %[cell_i, cell_j])
195
+
196
+ if cell == null:
197
+ print("cell not found, returning")
198
+
199
+ var n_hits = 0
200
+ var start_index = (cell_i * grid_size_x * _n_layers_per_cell) + (cell_j * _n_layers_per_cell)
201
+ for i in _n_layers_per_cell:
202
+ n_hits += _obs_buffer[start_index+i]
203
+
204
+ var cell_mesh = cell.get_node_or_null("MeshInstance3D")
205
+ if n_hits > 0:
206
+ cell_mesh.mesh.material = _highlighted_box_material
207
+ else:
208
+ cell_mesh.mesh.material = _standard_box_material
209
+
210
+ func _on_cell_area_entered(area:Area3D, cell_i:int, cell_j:int):
211
+ #prints("_on_cell_area_entered", cell_i, cell_j)
212
+ _update_obs(cell_i, cell_j, area.collision_layer, true)
213
+ if debug_view:
214
+ _toggle_cell(cell_i, cell_j)
215
+ #print(_obs_buffer)
216
+
217
+ func _on_cell_area_exited(area:Area3D, cell_i:int, cell_j:int):
218
+ #prints("_on_cell_area_exited", cell_i, cell_j)
219
+ _update_obs(cell_i, cell_j, area.collision_layer, false)
220
+ if debug_view:
221
+ _toggle_cell(cell_i, cell_j)
222
+
223
+ func _on_cell_body_entered(body: Node3D, cell_i:int, cell_j:int):
224
+ #prints("_on_cell_body_entered", cell_i, cell_j)
225
+ _update_obs(cell_i, cell_j, body.collision_layer, true)
226
+ if debug_view:
227
+ _toggle_cell(cell_i, cell_j)
228
+
229
+ func _on_cell_body_exited(body: Node3D, cell_i:int, cell_j:int):
230
+ #prints("_on_cell_body_exited", cell_i, cell_j)
231
+ _update_obs(cell_i, cell_j, body.collision_layer, false)
232
+ if debug_view:
233
+ _toggle_cell(cell_i, cell_j)
addons/godot_rl_agents/sensors/sensors_3d/ISensor3D.gd ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node3D
2
+ class_name ISensor3D
3
+
4
+ var _obs : Array = []
5
+ var _active := false
6
+
7
+ func get_observation():
8
+ pass
9
+
10
+ func activate():
11
+ _active = true
12
+
13
+ func deactivate():
14
+ _active = false
15
+
16
+ func _update_observation():
17
+ pass
18
+
19
+ func reset():
20
+ pass
addons/godot_rl_agents/sensors/sensors_3d/RGBCameraSensor3D.gd ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node3D
2
+ class_name RGBCameraSensor3D
3
+ var camera_pixels = null
4
+
5
+ @onready var camera_texture := $Control/TextureRect/CameraTexture as Sprite2D
6
+
7
+ func get_camera_pixel_encoding():
8
+ return camera_texture.get_texture().get_data().data["data"].hex_encode()
9
+
10
+ func get_camera_shape()-> Array:
11
+ return [$SubViewport.size[0], $SubViewport.size[1], 4]
addons/godot_rl_agents/sensors/sensors_3d/RGBCameraSensor3D.tscn ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [gd_scene load_steps=3 format=3 uid="uid://baaywi3arsl2m"]
2
+
3
+ [ext_resource type="Script" path="res://addons/godot_rl_agents/sensors/sensors_3d/RGBCameraSensor3D.gd" id="1"]
4
+
5
+ [sub_resource type="ViewportTexture" id="1"]
6
+ viewport_path = NodePath("SubViewport")
7
+
8
+ [node name="RGBCameraSensor3D" type="Node3D"]
9
+ script = ExtResource("1")
10
+
11
+ [node name="RemoteTransform3D" type="RemoteTransform3D" parent="."]
12
+ remote_path = NodePath("../SubViewport/Camera3D")
13
+
14
+ [node name="SubViewport" type="SubViewport" parent="."]
15
+ size = Vector2i(32, 32)
16
+ render_target_update_mode = 3
17
+
18
+ [node name="Camera3D" type="Camera3D" parent="SubViewport"]
19
+ near = 0.5
20
+
21
+ [node name="Control" type="Control" parent="."]
22
+ layout_mode = 3
23
+ anchors_preset = 15
24
+ anchor_right = 1.0
25
+ anchor_bottom = 1.0
26
+ grow_horizontal = 2
27
+ grow_vertical = 2
28
+
29
+ [node name="TextureRect" type="ColorRect" parent="Control"]
30
+ layout_mode = 0
31
+ offset_left = 1096.0
32
+ offset_top = 534.0
33
+ offset_right = 1114.0
34
+ offset_bottom = 552.0
35
+ scale = Vector2(10, 10)
36
+ color = Color(0.00784314, 0.00784314, 0.00784314, 1)
37
+
38
+ [node name="CameraTexture" type="Sprite2D" parent="Control/TextureRect"]
39
+ texture = SubResource("1")
40
+ offset = Vector2(9, 9)
41
+ flip_v = true
addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.gd ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @tool
2
+ extends ISensor3D
3
+ class_name RayCastSensor3D
4
+ @export_flags_3d_physics var collision_mask = 1:
5
+ get: return collision_mask
6
+ set(value):
7
+ collision_mask = value
8
+ _update()
9
+ @export_flags_3d_physics var boolean_class_mask = 1:
10
+ get: return boolean_class_mask
11
+ set(value):
12
+ boolean_class_mask = value
13
+ _update()
14
+
15
+ @export var n_rays_width := 6.0:
16
+ get: return n_rays_width
17
+ set(value):
18
+ n_rays_width = value
19
+ _update()
20
+
21
+ @export var n_rays_height := 6.0:
22
+ get: return n_rays_height
23
+ set(value):
24
+ n_rays_height = value
25
+ _update()
26
+
27
+ @export var ray_length := 10.0:
28
+ get: return ray_length
29
+ set(value):
30
+ ray_length = value
31
+ _update()
32
+
33
+ @export var cone_width := 60.0:
34
+ get: return cone_width
35
+ set(value):
36
+ cone_width = value
37
+ _update()
38
+
39
+ @export var cone_height := 60.0:
40
+ get: return cone_height
41
+ set(value):
42
+ cone_height = value
43
+ _update()
44
+
45
+ @export var collide_with_areas := false:
46
+ get: return collide_with_areas
47
+ set(value):
48
+ collide_with_areas = value
49
+ _update()
50
+
51
+ @export var collide_with_bodies := true:
52
+ get: return collide_with_bodies
53
+ set(value):
54
+ collide_with_bodies = value
55
+ _update()
56
+
57
+ @export var class_sensor := false
58
+
59
+ var rays := []
60
+ var geo = null
61
+
62
+ func _update():
63
+ if Engine.is_editor_hint():
64
+ if is_node_ready():
65
+ _spawn_nodes()
66
+
67
+ func _ready() -> void:
68
+ if Engine.is_editor_hint():
69
+ if get_child_count() == 0:
70
+ _spawn_nodes()
71
+ else:
72
+ _spawn_nodes()
73
+
74
+ func _spawn_nodes():
75
+ print("spawning nodes")
76
+ for ray in get_children():
77
+ ray.queue_free()
78
+ if geo:
79
+ geo.clear()
80
+ #$Lines.remove_points()
81
+ rays = []
82
+
83
+ var horizontal_step = cone_width / (n_rays_width)
84
+ var vertical_step = cone_height / (n_rays_height)
85
+
86
+ var horizontal_start = horizontal_step/2 - cone_width/2
87
+ var vertical_start = vertical_step/2 - cone_height/2
88
+
89
+ var points = []
90
+
91
+ for i in n_rays_width:
92
+ for j in n_rays_height:
93
+ var angle_w = horizontal_start + i * horizontal_step
94
+ var angle_h = vertical_start + j * vertical_step
95
+ #angle_h = 0.0
96
+ var ray = RayCast3D.new()
97
+ var cast_to = to_spherical_coords(ray_length, angle_w, angle_h)
98
+ ray.set_target_position(cast_to)
99
+
100
+ points.append(cast_to)
101
+
102
+ ray.set_name("node_"+str(i)+" "+str(j))
103
+ ray.enabled = true
104
+ ray.collide_with_bodies = collide_with_bodies
105
+ ray.collide_with_areas = collide_with_areas
106
+ ray.collision_mask = collision_mask
107
+ add_child(ray)
108
+ ray.set_owner(get_tree().edited_scene_root)
109
+ rays.append(ray)
110
+ ray.force_raycast_update()
111
+
112
+ # if Engine.editor_hint:
113
+ # _create_debug_lines(points)
114
+
115
+ func _create_debug_lines(points):
116
+ if not geo:
117
+ geo = ImmediateMesh.new()
118
+ add_child(geo)
119
+
120
+ geo.clear()
121
+ geo.begin(Mesh.PRIMITIVE_LINES)
122
+ for point in points:
123
+ geo.set_color(Color.AQUA)
124
+ geo.add_vertex(Vector3.ZERO)
125
+ geo.add_vertex(point)
126
+ geo.end()
127
+
128
+ func display():
129
+ if geo:
130
+ geo.display()
131
+
132
+ func to_spherical_coords(r, inc, azimuth) -> Vector3:
133
+ return Vector3(
134
+ r*sin(deg_to_rad(inc))*cos(deg_to_rad(azimuth)),
135
+ r*sin(deg_to_rad(azimuth)),
136
+ r*cos(deg_to_rad(inc))*cos(deg_to_rad(azimuth))
137
+ )
138
+
139
+ func get_observation() -> Array:
140
+ return self.calculate_raycasts()
141
+
142
+ func calculate_raycasts() -> Array:
143
+ var result = []
144
+ for ray in rays:
145
+ ray.set_enabled(true)
146
+ ray.force_raycast_update()
147
+ var distance = _get_raycast_distance(ray)
148
+
149
+ result.append(distance)
150
+ if class_sensor:
151
+ var hit_class = 0
152
+ if ray.get_collider():
153
+ var hit_collision_layer = ray.get_collider().collision_layer
154
+ hit_collision_layer = hit_collision_layer & collision_mask
155
+ hit_class = (hit_collision_layer & boolean_class_mask) > 0
156
+ result.append(hit_class)
157
+ ray.set_enabled(false)
158
+ return result
159
+
160
+ func _get_raycast_distance(ray : RayCast3D) -> float :
161
+ if !ray.is_colliding():
162
+ return 0.0
163
+
164
+ var distance = (global_transform.origin - ray.get_collision_point()).length()
165
+ distance = clamp(distance, 0.0, ray_length)
166
+ return (ray_length - distance) / ray_length
addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.tscn ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [gd_scene load_steps=2 format=3 uid="uid://b803cbh1fmy66"]
2
+
3
+ [ext_resource type="Script" path="res://addons/godot_rl_agents/sensors/sensors_3d/RaycastSensor3D.gd" id="1"]
4
+
5
+ [node name="RaycastSensor3D" type="Node3D"]
6
+ script = ExtResource("1")
7
+ n_rays_width = 4.0
8
+ n_rays_height = 2.0
9
+ ray_length = 11.0
10
+
11
+ [node name="node_1 0" type="RayCast3D" parent="."]
12
+ target_position = Vector3(-1.38686, -2.84701, 10.5343)
13
+
14
+ [node name="node_1 1" type="RayCast3D" parent="."]
15
+ target_position = Vector3(-1.38686, 2.84701, 10.5343)
16
+
17
+ [node name="node_2 0" type="RayCast3D" parent="."]
18
+ target_position = Vector3(1.38686, -2.84701, 10.5343)
19
+
20
+ [node name="node_2 1" type="RayCast3D" parent="."]
21
+ target_position = Vector3(1.38686, 2.84701, 10.5343)
22
+
23
+ [node name="node_3 0" type="RayCast3D" parent="."]
24
+ target_position = Vector3(4.06608, -2.84701, 9.81639)
25
+
26
+ [node name="node_3 1" type="RayCast3D" parent="."]
27
+ target_position = Vector3(4.06608, 2.84701, 9.81639)
addons/godot_rl_agents/sync.gd ADDED
@@ -0,0 +1,342 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ extends Node
2
+
3
+ # --fixed-fps 2000 --disable-render-loop
4
+
5
+ enum ControlModes {HUMAN, TRAINING, ONNX_INFERENCE}
6
+ @export var control_mode: ControlModes = ControlModes.TRAINING
7
+ @export_range(1, 10, 1, "or_greater") var action_repeat := 8
8
+ @export_range(1, 10, 1, "or_greater") var speed_up = 1
9
+ @export var onnx_model_path := ""
10
+
11
+ @onready var start_time = Time.get_ticks_msec()
12
+
13
+ const MAJOR_VERSION := "0"
14
+ const MINOR_VERSION := "3"
15
+ const DEFAULT_PORT := "11008"
16
+ const DEFAULT_SEED := "1"
17
+ var stream : StreamPeerTCP = null
18
+ var connected = false
19
+ var message_center
20
+ var should_connect = true
21
+ var agents
22
+ var need_to_send_obs = false
23
+ var args = null
24
+ var initialized = false
25
+ var just_reset = false
26
+ var onnx_model = null
27
+ var n_action_steps = 0
28
+
29
+ var _action_space : Dictionary
30
+ var _obs_space : Dictionary
31
+
32
+ # Called when the node enters the scene tree for the first time.
33
+ func _ready():
34
+ await get_tree().root.ready
35
+ get_tree().set_pause(true)
36
+ _initialize()
37
+ await get_tree().create_timer(1.0).timeout
38
+ get_tree().set_pause(false)
39
+
40
+ func _initialize():
41
+ _get_agents()
42
+ _obs_space = agents[0].get_obs_space()
43
+ _action_space = agents[0].get_action_space()
44
+ args = _get_args()
45
+ Engine.physics_ticks_per_second = _get_speedup() * 60 # Replace with function body.
46
+ Engine.time_scale = _get_speedup() * 1.0
47
+ prints("physics ticks", Engine.physics_ticks_per_second, Engine.time_scale, _get_speedup(), speed_up)
48
+
49
+ _set_heuristic("human")
50
+ match control_mode:
51
+ ControlModes.TRAINING:
52
+ connected = connect_to_server()
53
+ if connected:
54
+ _set_heuristic("model")
55
+ _handshake()
56
+ _send_env_info()
57
+ else:
58
+ push_warning("Couldn't connect to Python server, using human controls instead. ",
59
+ "Did you start the training server using e.g. `gdrl` from the console?")
60
+ ControlModes.ONNX_INFERENCE:
61
+ assert(FileAccess.file_exists(onnx_model_path), "Onnx Model Path set on Sync node does not exist: %s" % onnx_model_path)
62
+ onnx_model = ONNXModel.new(onnx_model_path, 1)
63
+ _set_heuristic("model")
64
+
65
+ _set_seed()
66
+ _set_action_repeat()
67
+ initialized = true
68
+
69
+ func _physics_process(_delta):
70
+ # two modes, human control, agent control
71
+ # pause tree, send obs, get actions, set actions, unpause tree
72
+ if n_action_steps % action_repeat != 0:
73
+ n_action_steps += 1
74
+ return
75
+
76
+ n_action_steps += 1
77
+
78
+ if connected:
79
+ get_tree().set_pause(true)
80
+
81
+ if just_reset:
82
+ just_reset = false
83
+ var obs = _get_obs_from_agents()
84
+
85
+ var reply = {
86
+ "type": "reset",
87
+ "obs": obs
88
+ }
89
+ _send_dict_as_json_message(reply)
90
+ # this should go straight to getting the action and setting it checked the agent, no need to perform one phyics tick
91
+ get_tree().set_pause(false)
92
+ return
93
+
94
+ if need_to_send_obs:
95
+ need_to_send_obs = false
96
+ var reward = _get_reward_from_agents()
97
+ var done = _get_done_from_agents()
98
+ #_reset_agents_if_done() # this ensures the new observation is from the next env instance : NEEDS REFACTOR
99
+
100
+ var obs = _get_obs_from_agents()
101
+
102
+ var reply = {
103
+ "type": "step",
104
+ "obs": obs,
105
+ "reward": reward,
106
+ "done": done
107
+ }
108
+ _send_dict_as_json_message(reply)
109
+
110
+ var handled = handle_message()
111
+
112
+ elif onnx_model != null:
113
+ var obs : Array = _get_obs_from_agents()
114
+
115
+ var actions = []
116
+ for o in obs:
117
+ var action = onnx_model.run_inference(o["obs"], 1.0)
118
+ action["output"] = clamp_array(action["output"], -1.0, 1.0)
119
+ var action_dict = _extract_action_dict(action["output"])
120
+ actions.append(action_dict)
121
+
122
+ _set_agent_actions(actions)
123
+ need_to_send_obs = true
124
+ get_tree().set_pause(false)
125
+ _reset_agents_if_done()
126
+
127
+ else:
128
+ _reset_agents_if_done()
129
+
130
+ func _extract_action_dict(action_array: Array):
131
+ var index = 0
132
+ var result = {}
133
+ for key in _action_space.keys():
134
+ var size = _action_space[key]["size"]
135
+ if _action_space[key]["action_type"] == "discrete":
136
+ result[key] = round(action_array[index])
137
+ else:
138
+ result[key] = action_array.slice(index,index+size)
139
+ index += size
140
+
141
+ return result
142
+
143
+ func _get_agents():
144
+ agents = get_tree().get_nodes_in_group("AGENT")
145
+
146
+ func _set_heuristic(heuristic):
147
+ for agent in agents:
148
+ agent.set_heuristic(heuristic)
149
+
150
+ func _handshake():
151
+ print("performing handshake")
152
+
153
+ var json_dict = _get_dict_json_message()
154
+ assert(json_dict["type"] == "handshake")
155
+ var major_version = json_dict["major_version"]
156
+ var minor_version = json_dict["minor_version"]
157
+ if major_version != MAJOR_VERSION:
158
+ print("WARNING: major verison mismatch ", major_version, " ", MAJOR_VERSION)
159
+ if minor_version != MINOR_VERSION:
160
+ print("WARNING: minor verison mismatch ", minor_version, " ", MINOR_VERSION)
161
+
162
+ print("handshake complete")
163
+
164
+ func _get_dict_json_message():
165
+ # returns a dictionary from of the most recent message
166
+ # this is not waiting
167
+ while stream.get_available_bytes() == 0:
168
+ stream.poll()
169
+ if stream.get_status() != 2:
170
+ print("server disconnected status, closing")
171
+ get_tree().quit()
172
+ return null
173
+
174
+ OS.delay_usec(10)
175
+
176
+ var message = stream.get_string()
177
+ var json_data = JSON.parse_string(message)
178
+
179
+ return json_data
180
+
181
+ func _send_dict_as_json_message(dict):
182
+ stream.put_string(JSON.stringify(dict))
183
+
184
+ func _send_env_info():
185
+ var json_dict = _get_dict_json_message()
186
+ assert(json_dict["type"] == "env_info")
187
+
188
+
189
+ var message = {
190
+ "type" : "env_info",
191
+ "observation_space": _obs_space,
192
+ "action_space":_action_space,
193
+ "n_agents": len(agents)
194
+ }
195
+ _send_dict_as_json_message(message)
196
+
197
+ func connect_to_server():
198
+ print("Waiting for one second to allow server to start")
199
+ OS.delay_msec(1000)
200
+ print("trying to connect to server")
201
+ stream = StreamPeerTCP.new()
202
+
203
+ # "localhost" was not working on windows VM, had to use the IP
204
+ var ip = "127.0.0.1"
205
+ var port = _get_port()
206
+ var connect = stream.connect_to_host(ip, port)
207
+ stream.set_no_delay(true) # TODO check if this improves performance or not
208
+ stream.poll()
209
+ # Fetch the status until it is either connected (2) or failed to connect (3)
210
+ while stream.get_status() < 2:
211
+ stream.poll()
212
+ return stream.get_status() == 2
213
+
214
+ func _get_args():
215
+ print("getting command line arguments")
216
+ var arguments = {}
217
+ for argument in OS.get_cmdline_args():
218
+ print(argument)
219
+ if argument.find("=") > -1:
220
+ var key_value = argument.split("=")
221
+ arguments[key_value[0].lstrip("--")] = key_value[1]
222
+ else:
223
+ # Options without an argument will be present in the dictionary,
224
+ # with the value set to an empty string.
225
+ arguments[argument.lstrip("--")] = ""
226
+
227
+ return arguments
228
+
229
+ func _get_speedup():
230
+ print(args)
231
+ return args.get("speedup", str(speed_up)).to_int()
232
+
233
+ func _get_port():
234
+ return args.get("port", DEFAULT_PORT).to_int()
235
+
236
+ func _set_seed():
237
+ var _seed = args.get("env_seed", DEFAULT_SEED).to_int()
238
+ seed(_seed)
239
+
240
+ func _set_action_repeat():
241
+ action_repeat = args.get("action_repeat", str(action_repeat)).to_int()
242
+
243
+ func disconnect_from_server():
244
+ stream.disconnect_from_host()
245
+
246
+
247
+
248
+ func handle_message() -> bool:
249
+ # get json message: reset, step, close
250
+ var message = _get_dict_json_message()
251
+ if message["type"] == "close":
252
+ print("received close message, closing game")
253
+ get_tree().quit()
254
+ get_tree().set_pause(false)
255
+ return true
256
+
257
+ if message["type"] == "reset":
258
+ print("resetting all agents")
259
+ _reset_all_agents()
260
+ just_reset = true
261
+ get_tree().set_pause(false)
262
+ #print("resetting forcing draw")
263
+ # RenderingServer.force_draw()
264
+ # var obs = _get_obs_from_agents()
265
+ # print("obs ", obs)
266
+ # var reply = {
267
+ # "type": "reset",
268
+ # "obs": obs
269
+ # }
270
+ # _send_dict_as_json_message(reply)
271
+ return true
272
+
273
+ if message["type"] == "call":
274
+ var method = message["method"]
275
+ var returns = _call_method_on_agents(method)
276
+ var reply = {
277
+ "type": "call",
278
+ "returns": returns
279
+ }
280
+ print("calling method from Python")
281
+ _send_dict_as_json_message(reply)
282
+ return handle_message()
283
+
284
+ if message["type"] == "action":
285
+ var action = message["action"]
286
+ _set_agent_actions(action)
287
+ need_to_send_obs = true
288
+ get_tree().set_pause(false)
289
+ return true
290
+
291
+ print("message was not handled")
292
+ return false
293
+
294
+ func _call_method_on_agents(method):
295
+ var returns = []
296
+ for agent in agents:
297
+ returns.append(agent.call(method))
298
+
299
+ return returns
300
+
301
+
302
+ func _reset_agents_if_done():
303
+ for agent in agents:
304
+ if agent.get_done():
305
+ agent.set_done_false()
306
+
307
+ func _reset_all_agents():
308
+ for agent in agents:
309
+ agent.needs_reset = true
310
+ #agent.reset()
311
+
312
+ func _get_obs_from_agents():
313
+ var obs = []
314
+ for agent in agents:
315
+ obs.append(agent.get_obs())
316
+
317
+ return obs
318
+
319
+ func _get_reward_from_agents():
320
+ var rewards = []
321
+ for agent in agents:
322
+ rewards.append(agent.get_reward())
323
+ agent.zero_reward()
324
+ return rewards
325
+
326
+ func _get_done_from_agents():
327
+ var dones = []
328
+ for agent in agents:
329
+ var done = agent.get_done()
330
+ if done: agent.set_done_false()
331
+ dones.append(done)
332
+ return dones
333
+
334
+ func _set_agent_actions(actions):
335
+ for i in range(len(actions)):
336
+ agents[i].set_action(actions[i])
337
+
338
+ func clamp_array(arr : Array, min:float, max:float):
339
+ var output : Array = []
340
+ for a in arr:
341
+ output.append(clamp(a, min, max))
342
+ return output
bin/ItemSortingCart.console.exe ADDED
Binary file (186 kB). View file
 
bin/ItemSortingCart.exe ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2de407f42a3db0dece9ff075b69219a30493b90c67f0a14bc450b414fba39125
3
+ size 71425536
bin/ItemSortingCart.pck ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6610d6aa2628fab9fc77ba108da56787ef71ea731be5f07dab713051b02fdf29
3
+ size 1267120
bin/ItemSortingCart.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ #!/bin/sh
2
+ echo -ne '\033c\033]0;ItemSortingCartExample\a'
3
+ base_path="$(dirname "$(realpath "$0")")"
4
+ "$base_path/ItemSortingCart.x86_64" "$@"
bin/ItemSortingCart.x86_64 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:843a1e5f8df1e6b2fe57ff86ca637436c7e1216f8409f2b079090c373548e86f
3
+ size 72784744
bin/data_CartExamples_x86_64/CartExamples.deps.json ADDED
@@ -0,0 +1,1074 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "runtimeTarget": {
3
+ "name": ".NETCoreApp,Version=v6.0/win-x64",
4
+ "signature": ""
5
+ },
6
+ "compilationOptions": {},
7
+ "targets": {
8
+ ".NETCoreApp,Version=v6.0": {},
9
+ ".NETCoreApp,Version=v6.0/win-x64": {
10
+ "CartExamples/1.0.0": {
11
+ "dependencies": {
12
+ "Godot.SourceGenerators": "4.1.1",
13
+ "GodotSharp": "4.1.1",
14
+ "Microsoft.ML.OnnxRuntime": "1.15.1",
15
+ "runtimepack.Microsoft.NETCore.App.Runtime.win-x64": "6.0.25"
16
+ },
17
+ "runtime": {
18
+ "CartExamples.dll": {}
19
+ }
20
+ },
21
+ "runtimepack.Microsoft.NETCore.App.Runtime.win-x64/6.0.25": {
22
+ "runtime": {
23
+ "Microsoft.CSharp.dll": {
24
+ "assemblyVersion": "6.0.0.0",
25
+ "fileVersion": "6.0.2523.51912"
26
+ },
27
+ "Microsoft.VisualBasic.Core.dll": {
28
+ "assemblyVersion": "11.0.0.0",
29
+ "fileVersion": "11.100.2523.51912"
30
+ },
31
+ "Microsoft.VisualBasic.dll": {
32
+ "assemblyVersion": "10.0.0.0",
33
+ "fileVersion": "6.0.2523.51912"
34
+ },
35
+ "Microsoft.Win32.Primitives.dll": {
36
+ "assemblyVersion": "6.0.0.0",
37
+ "fileVersion": "6.0.2523.51912"
38
+ },
39
+ "Microsoft.Win32.Registry.dll": {
40
+ "assemblyVersion": "6.0.0.0",
41
+ "fileVersion": "6.0.2523.51912"
42
+ },
43
+ "System.AppContext.dll": {
44
+ "assemblyVersion": "6.0.0.0",
45
+ "fileVersion": "6.0.2523.51912"
46
+ },
47
+ "System.Buffers.dll": {
48
+ "assemblyVersion": "6.0.0.0",
49
+ "fileVersion": "6.0.2523.51912"
50
+ },
51
+ "System.Collections.Concurrent.dll": {
52
+ "assemblyVersion": "6.0.0.0",
53
+ "fileVersion": "6.0.2523.51912"
54
+ },
55
+ "System.Collections.Immutable.dll": {
56
+ "assemblyVersion": "6.0.0.0",
57
+ "fileVersion": "6.0.2523.51912"
58
+ },
59
+ "System.Collections.NonGeneric.dll": {
60
+ "assemblyVersion": "6.0.0.0",
61
+ "fileVersion": "6.0.2523.51912"
62
+ },
63
+ "System.Collections.Specialized.dll": {
64
+ "assemblyVersion": "6.0.0.0",
65
+ "fileVersion": "6.0.2523.51912"
66
+ },
67
+ "System.Collections.dll": {
68
+ "assemblyVersion": "6.0.0.0",
69
+ "fileVersion": "6.0.2523.51912"
70
+ },
71
+ "System.ComponentModel.Annotations.dll": {
72
+ "assemblyVersion": "6.0.0.0",
73
+ "fileVersion": "6.0.2523.51912"
74
+ },
75
+ "System.ComponentModel.DataAnnotations.dll": {
76
+ "assemblyVersion": "4.0.0.0",
77
+ "fileVersion": "6.0.2523.51912"
78
+ },
79
+ "System.ComponentModel.EventBasedAsync.dll": {
80
+ "assemblyVersion": "6.0.0.0",
81
+ "fileVersion": "6.0.2523.51912"
82
+ },
83
+ "System.ComponentModel.Primitives.dll": {
84
+ "assemblyVersion": "6.0.0.0",
85
+ "fileVersion": "6.0.2523.51912"
86
+ },
87
+ "System.ComponentModel.TypeConverter.dll": {
88
+ "assemblyVersion": "6.0.0.0",
89
+ "fileVersion": "6.0.2523.51912"
90
+ },
91
+ "System.ComponentModel.dll": {
92
+ "assemblyVersion": "6.0.0.0",
93
+ "fileVersion": "6.0.2523.51912"
94
+ },
95
+ "System.Configuration.dll": {
96
+ "assemblyVersion": "4.0.0.0",
97
+ "fileVersion": "6.0.2523.51912"
98
+ },
99
+ "System.Console.dll": {
100
+ "assemblyVersion": "6.0.0.0",
101
+ "fileVersion": "6.0.2523.51912"
102
+ },
103
+ "System.Core.dll": {
104
+ "assemblyVersion": "4.0.0.0",
105
+ "fileVersion": "6.0.2523.51912"
106
+ },
107
+ "System.Data.Common.dll": {
108
+ "assemblyVersion": "6.0.0.0",
109
+ "fileVersion": "6.0.2523.51912"
110
+ },
111
+ "System.Data.DataSetExtensions.dll": {
112
+ "assemblyVersion": "4.0.0.0",
113
+ "fileVersion": "6.0.2523.51912"
114
+ },
115
+ "System.Data.dll": {
116
+ "assemblyVersion": "4.0.0.0",
117
+ "fileVersion": "6.0.2523.51912"
118
+ },
119
+ "System.Diagnostics.Contracts.dll": {
120
+ "assemblyVersion": "6.0.0.0",
121
+ "fileVersion": "6.0.2523.51912"
122
+ },
123
+ "System.Diagnostics.Debug.dll": {
124
+ "assemblyVersion": "6.0.0.0",
125
+ "fileVersion": "6.0.2523.51912"
126
+ },
127
+ "System.Diagnostics.DiagnosticSource.dll": {
128
+ "assemblyVersion": "6.0.0.0",
129
+ "fileVersion": "6.0.2523.51912"
130
+ },
131
+ "System.Diagnostics.FileVersionInfo.dll": {
132
+ "assemblyVersion": "6.0.0.0",
133
+ "fileVersion": "6.0.2523.51912"
134
+ },
135
+ "System.Diagnostics.Process.dll": {
136
+ "assemblyVersion": "6.0.0.0",
137
+ "fileVersion": "6.0.2523.51912"
138
+ },
139
+ "System.Diagnostics.StackTrace.dll": {
140
+ "assemblyVersion": "6.0.0.0",
141
+ "fileVersion": "6.0.2523.51912"
142
+ },
143
+ "System.Diagnostics.TextWriterTraceListener.dll": {
144
+ "assemblyVersion": "6.0.0.0",
145
+ "fileVersion": "6.0.2523.51912"
146
+ },
147
+ "System.Diagnostics.Tools.dll": {
148
+ "assemblyVersion": "6.0.0.0",
149
+ "fileVersion": "6.0.2523.51912"
150
+ },
151
+ "System.Diagnostics.TraceSource.dll": {
152
+ "assemblyVersion": "6.0.0.0",
153
+ "fileVersion": "6.0.2523.51912"
154
+ },
155
+ "System.Diagnostics.Tracing.dll": {
156
+ "assemblyVersion": "6.0.0.0",
157
+ "fileVersion": "6.0.2523.51912"
158
+ },
159
+ "System.Drawing.Primitives.dll": {
160
+ "assemblyVersion": "6.0.0.0",
161
+ "fileVersion": "6.0.2523.51912"
162
+ },
163
+ "System.Drawing.dll": {
164
+ "assemblyVersion": "4.0.0.0",
165
+ "fileVersion": "6.0.2523.51912"
166
+ },
167
+ "System.Dynamic.Runtime.dll": {
168
+ "assemblyVersion": "6.0.0.0",
169
+ "fileVersion": "6.0.2523.51912"
170
+ },
171
+ "System.Formats.Asn1.dll": {
172
+ "assemblyVersion": "6.0.0.0",
173
+ "fileVersion": "6.0.2523.51912"
174
+ },
175
+ "System.Globalization.Calendars.dll": {
176
+ "assemblyVersion": "6.0.0.0",
177
+ "fileVersion": "6.0.2523.51912"
178
+ },
179
+ "System.Globalization.Extensions.dll": {
180
+ "assemblyVersion": "6.0.0.0",
181
+ "fileVersion": "6.0.2523.51912"
182
+ },
183
+ "System.Globalization.dll": {
184
+ "assemblyVersion": "6.0.0.0",
185
+ "fileVersion": "6.0.2523.51912"
186
+ },
187
+ "System.IO.Compression.Brotli.dll": {
188
+ "assemblyVersion": "6.0.0.0",
189
+ "fileVersion": "6.0.2523.51912"
190
+ },
191
+ "System.IO.Compression.FileSystem.dll": {
192
+ "assemblyVersion": "4.0.0.0",
193
+ "fileVersion": "6.0.2523.51912"
194
+ },
195
+ "System.IO.Compression.ZipFile.dll": {
196
+ "assemblyVersion": "6.0.0.0",
197
+ "fileVersion": "6.0.2523.51912"
198
+ },
199
+ "System.IO.Compression.dll": {
200
+ "assemblyVersion": "6.0.0.0",
201
+ "fileVersion": "6.0.2523.51912"
202
+ },
203
+ "System.IO.FileSystem.AccessControl.dll": {
204
+ "assemblyVersion": "6.0.0.0",
205
+ "fileVersion": "6.0.2523.51912"
206
+ },
207
+ "System.IO.FileSystem.DriveInfo.dll": {
208
+ "assemblyVersion": "6.0.0.0",
209
+ "fileVersion": "6.0.2523.51912"
210
+ },
211
+ "System.IO.FileSystem.Primitives.dll": {
212
+ "assemblyVersion": "6.0.0.0",
213
+ "fileVersion": "6.0.2523.51912"
214
+ },
215
+ "System.IO.FileSystem.Watcher.dll": {
216
+ "assemblyVersion": "6.0.0.0",
217
+ "fileVersion": "6.0.2523.51912"
218
+ },
219
+ "System.IO.FileSystem.dll": {
220
+ "assemblyVersion": "6.0.0.0",
221
+ "fileVersion": "6.0.2523.51912"
222
+ },
223
+ "System.IO.IsolatedStorage.dll": {
224
+ "assemblyVersion": "6.0.0.0",
225
+ "fileVersion": "6.0.2523.51912"
226
+ },
227
+ "System.IO.MemoryMappedFiles.dll": {
228
+ "assemblyVersion": "6.0.0.0",
229
+ "fileVersion": "6.0.2523.51912"
230
+ },
231
+ "System.IO.Pipes.AccessControl.dll": {
232
+ "assemblyVersion": "6.0.0.0",
233
+ "fileVersion": "6.0.2523.51912"
234
+ },
235
+ "System.IO.Pipes.dll": {
236
+ "assemblyVersion": "6.0.0.0",
237
+ "fileVersion": "6.0.2523.51912"
238
+ },
239
+ "System.IO.UnmanagedMemoryStream.dll": {
240
+ "assemblyVersion": "6.0.0.0",
241
+ "fileVersion": "6.0.2523.51912"
242
+ },
243
+ "System.IO.dll": {
244
+ "assemblyVersion": "6.0.0.0",
245
+ "fileVersion": "6.0.2523.51912"
246
+ },
247
+ "System.Linq.Expressions.dll": {
248
+ "assemblyVersion": "6.0.0.0",
249
+ "fileVersion": "6.0.2523.51912"
250
+ },
251
+ "System.Linq.Parallel.dll": {
252
+ "assemblyVersion": "6.0.0.0",
253
+ "fileVersion": "6.0.2523.51912"
254
+ },
255
+ "System.Linq.Queryable.dll": {
256
+ "assemblyVersion": "6.0.0.0",
257
+ "fileVersion": "6.0.2523.51912"
258
+ },
259
+ "System.Linq.dll": {
260
+ "assemblyVersion": "6.0.0.0",
261
+ "fileVersion": "6.0.2523.51912"
262
+ },
263
+ "System.Memory.dll": {
264
+ "assemblyVersion": "6.0.0.0",
265
+ "fileVersion": "6.0.2523.51912"
266
+ },
267
+ "System.Net.Http.Json.dll": {
268
+ "assemblyVersion": "6.0.0.0",
269
+ "fileVersion": "6.0.2523.51912"
270
+ },
271
+ "System.Net.Http.dll": {
272
+ "assemblyVersion": "6.0.0.0",
273
+ "fileVersion": "6.0.2523.51912"
274
+ },
275
+ "System.Net.HttpListener.dll": {
276
+ "assemblyVersion": "6.0.0.0",
277
+ "fileVersion": "6.0.2523.51912"
278
+ },
279
+ "System.Net.Mail.dll": {
280
+ "assemblyVersion": "6.0.0.0",
281
+ "fileVersion": "6.0.2523.51912"
282
+ },
283
+ "System.Net.NameResolution.dll": {
284
+ "assemblyVersion": "6.0.0.0",
285
+ "fileVersion": "6.0.2523.51912"
286
+ },
287
+ "System.Net.NetworkInformation.dll": {
288
+ "assemblyVersion": "6.0.0.0",
289
+ "fileVersion": "6.0.2523.51912"
290
+ },
291
+ "System.Net.Ping.dll": {
292
+ "assemblyVersion": "6.0.0.0",
293
+ "fileVersion": "6.0.2523.51912"
294
+ },
295
+ "System.Net.Primitives.dll": {
296
+ "assemblyVersion": "6.0.0.0",
297
+ "fileVersion": "6.0.2523.51912"
298
+ },
299
+ "System.Net.Quic.dll": {
300
+ "assemblyVersion": "6.0.0.0",
301
+ "fileVersion": "6.0.2523.51912"
302
+ },
303
+ "System.Net.Requests.dll": {
304
+ "assemblyVersion": "6.0.0.0",
305
+ "fileVersion": "6.0.2523.51912"
306
+ },
307
+ "System.Net.Security.dll": {
308
+ "assemblyVersion": "6.0.0.0",
309
+ "fileVersion": "6.0.2523.51912"
310
+ },
311
+ "System.Net.ServicePoint.dll": {
312
+ "assemblyVersion": "6.0.0.0",
313
+ "fileVersion": "6.0.2523.51912"
314
+ },
315
+ "System.Net.Sockets.dll": {
316
+ "assemblyVersion": "6.0.0.0",
317
+ "fileVersion": "6.0.2523.51912"
318
+ },
319
+ "System.Net.WebClient.dll": {
320
+ "assemblyVersion": "6.0.0.0",
321
+ "fileVersion": "6.0.2523.51912"
322
+ },
323
+ "System.Net.WebHeaderCollection.dll": {
324
+ "assemblyVersion": "6.0.0.0",
325
+ "fileVersion": "6.0.2523.51912"
326
+ },
327
+ "System.Net.WebProxy.dll": {
328
+ "assemblyVersion": "6.0.0.0",
329
+ "fileVersion": "6.0.2523.51912"
330
+ },
331
+ "System.Net.WebSockets.Client.dll": {
332
+ "assemblyVersion": "6.0.0.0",
333
+ "fileVersion": "6.0.2523.51912"
334
+ },
335
+ "System.Net.WebSockets.dll": {
336
+ "assemblyVersion": "6.0.0.0",
337
+ "fileVersion": "6.0.2523.51912"
338
+ },
339
+ "System.Net.dll": {
340
+ "assemblyVersion": "4.0.0.0",
341
+ "fileVersion": "6.0.2523.51912"
342
+ },
343
+ "System.Numerics.Vectors.dll": {
344
+ "assemblyVersion": "6.0.0.0",
345
+ "fileVersion": "6.0.2523.51912"
346
+ },
347
+ "System.Numerics.dll": {
348
+ "assemblyVersion": "4.0.0.0",
349
+ "fileVersion": "6.0.2523.51912"
350
+ },
351
+ "System.ObjectModel.dll": {
352
+ "assemblyVersion": "6.0.0.0",
353
+ "fileVersion": "6.0.2523.51912"
354
+ },
355
+ "System.Private.CoreLib.dll": {
356
+ "assemblyVersion": "6.0.0.0",
357
+ "fileVersion": "6.0.2523.51912"
358
+ },
359
+ "System.Private.DataContractSerialization.dll": {
360
+ "assemblyVersion": "6.0.0.0",
361
+ "fileVersion": "6.0.2523.51912"
362
+ },
363
+ "System.Private.Uri.dll": {
364
+ "assemblyVersion": "6.0.0.0",
365
+ "fileVersion": "6.0.2523.51912"
366
+ },
367
+ "System.Private.Xml.Linq.dll": {
368
+ "assemblyVersion": "6.0.0.0",
369
+ "fileVersion": "6.0.2523.51912"
370
+ },
371
+ "System.Private.Xml.dll": {
372
+ "assemblyVersion": "6.0.0.0",
373
+ "fileVersion": "6.0.2523.51912"
374
+ },
375
+ "System.Reflection.DispatchProxy.dll": {
376
+ "assemblyVersion": "6.0.0.0",
377
+ "fileVersion": "6.0.2523.51912"
378
+ },
379
+ "System.Reflection.Emit.ILGeneration.dll": {
380
+ "assemblyVersion": "6.0.0.0",
381
+ "fileVersion": "6.0.2523.51912"
382
+ },
383
+ "System.Reflection.Emit.Lightweight.dll": {
384
+ "assemblyVersion": "6.0.0.0",
385
+ "fileVersion": "6.0.2523.51912"
386
+ },
387
+ "System.Reflection.Emit.dll": {
388
+ "assemblyVersion": "6.0.0.0",
389
+ "fileVersion": "6.0.2523.51912"
390
+ },
391
+ "System.Reflection.Extensions.dll": {
392
+ "assemblyVersion": "6.0.0.0",
393
+ "fileVersion": "6.0.2523.51912"
394
+ },
395
+ "System.Reflection.Metadata.dll": {
396
+ "assemblyVersion": "6.0.0.0",
397
+ "fileVersion": "6.0.2523.51912"
398
+ },
399
+ "System.Reflection.Primitives.dll": {
400
+ "assemblyVersion": "6.0.0.0",
401
+ "fileVersion": "6.0.2523.51912"
402
+ },
403
+ "System.Reflection.TypeExtensions.dll": {
404
+ "assemblyVersion": "6.0.0.0",
405
+ "fileVersion": "6.0.2523.51912"
406
+ },
407
+ "System.Reflection.dll": {
408
+ "assemblyVersion": "6.0.0.0",
409
+ "fileVersion": "6.0.2523.51912"
410
+ },
411
+ "System.Resources.Reader.dll": {
412
+ "assemblyVersion": "6.0.0.0",
413
+ "fileVersion": "6.0.2523.51912"
414
+ },
415
+ "System.Resources.ResourceManager.dll": {
416
+ "assemblyVersion": "6.0.0.0",
417
+ "fileVersion": "6.0.2523.51912"
418
+ },
419
+ "System.Resources.Writer.dll": {
420
+ "assemblyVersion": "6.0.0.0",
421
+ "fileVersion": "6.0.2523.51912"
422
+ },
423
+ "System.Runtime.CompilerServices.Unsafe.dll": {
424
+ "assemblyVersion": "6.0.0.0",
425
+ "fileVersion": "6.0.2523.51912"
426
+ },
427
+ "System.Runtime.CompilerServices.VisualC.dll": {
428
+ "assemblyVersion": "6.0.0.0",
429
+ "fileVersion": "6.0.2523.51912"
430
+ },
431
+ "System.Runtime.Extensions.dll": {
432
+ "assemblyVersion": "6.0.0.0",
433
+ "fileVersion": "6.0.2523.51912"
434
+ },
435
+ "System.Runtime.Handles.dll": {
436
+ "assemblyVersion": "6.0.0.0",
437
+ "fileVersion": "6.0.2523.51912"
438
+ },
439
+ "System.Runtime.InteropServices.RuntimeInformation.dll": {
440
+ "assemblyVersion": "6.0.0.0",
441
+ "fileVersion": "6.0.2523.51912"
442
+ },
443
+ "System.Runtime.InteropServices.dll": {
444
+ "assemblyVersion": "6.0.0.0",
445
+ "fileVersion": "6.0.2523.51912"
446
+ },
447
+ "System.Runtime.Intrinsics.dll": {
448
+ "assemblyVersion": "6.0.0.0",
449
+ "fileVersion": "6.0.2523.51912"
450
+ },
451
+ "System.Runtime.Loader.dll": {
452
+ "assemblyVersion": "6.0.0.0",
453
+ "fileVersion": "6.0.2523.51912"
454
+ },
455
+ "System.Runtime.Numerics.dll": {
456
+ "assemblyVersion": "6.0.0.0",
457
+ "fileVersion": "6.0.2523.51912"
458
+ },
459
+ "System.Runtime.Serialization.Formatters.dll": {
460
+ "assemblyVersion": "6.0.0.0",
461
+ "fileVersion": "6.0.2523.51912"
462
+ },
463
+ "System.Runtime.Serialization.Json.dll": {
464
+ "assemblyVersion": "6.0.0.0",
465
+ "fileVersion": "6.0.2523.51912"
466
+ },
467
+ "System.Runtime.Serialization.Primitives.dll": {
468
+ "assemblyVersion": "6.0.0.0",
469
+ "fileVersion": "6.0.2523.51912"
470
+ },
471
+ "System.Runtime.Serialization.Xml.dll": {
472
+ "assemblyVersion": "6.0.0.0",
473
+ "fileVersion": "6.0.2523.51912"
474
+ },
475
+ "System.Runtime.Serialization.dll": {
476
+ "assemblyVersion": "4.0.0.0",
477
+ "fileVersion": "6.0.2523.51912"
478
+ },
479
+ "System.Runtime.dll": {
480
+ "assemblyVersion": "6.0.0.0",
481
+ "fileVersion": "6.0.2523.51912"
482
+ },
483
+ "System.Security.AccessControl.dll": {
484
+ "assemblyVersion": "6.0.0.0",
485
+ "fileVersion": "6.0.2523.51912"
486
+ },
487
+ "System.Security.Claims.dll": {
488
+ "assemblyVersion": "6.0.0.0",
489
+ "fileVersion": "6.0.2523.51912"
490
+ },
491
+ "System.Security.Cryptography.Algorithms.dll": {
492
+ "assemblyVersion": "6.0.0.0",
493
+ "fileVersion": "6.0.2523.51912"
494
+ },
495
+ "System.Security.Cryptography.Cng.dll": {
496
+ "assemblyVersion": "6.0.0.0",
497
+ "fileVersion": "6.0.2523.51912"
498
+ },
499
+ "System.Security.Cryptography.Csp.dll": {
500
+ "assemblyVersion": "6.0.0.0",
501
+ "fileVersion": "6.0.2523.51912"
502
+ },
503
+ "System.Security.Cryptography.Encoding.dll": {
504
+ "assemblyVersion": "6.0.0.0",
505
+ "fileVersion": "6.0.2523.51912"
506
+ },
507
+ "System.Security.Cryptography.OpenSsl.dll": {
508
+ "assemblyVersion": "6.0.0.0",
509
+ "fileVersion": "6.0.2523.51912"
510
+ },
511
+ "System.Security.Cryptography.Primitives.dll": {
512
+ "assemblyVersion": "6.0.0.0",
513
+ "fileVersion": "6.0.2523.51912"
514
+ },
515
+ "System.Security.Cryptography.X509Certificates.dll": {
516
+ "assemblyVersion": "6.0.0.0",
517
+ "fileVersion": "6.0.2523.51912"
518
+ },
519
+ "System.Security.Principal.Windows.dll": {
520
+ "assemblyVersion": "6.0.0.0",
521
+ "fileVersion": "6.0.2523.51912"
522
+ },
523
+ "System.Security.Principal.dll": {
524
+ "assemblyVersion": "6.0.0.0",
525
+ "fileVersion": "6.0.2523.51912"
526
+ },
527
+ "System.Security.SecureString.dll": {
528
+ "assemblyVersion": "6.0.0.0",
529
+ "fileVersion": "6.0.2523.51912"
530
+ },
531
+ "System.Security.dll": {
532
+ "assemblyVersion": "4.0.0.0",
533
+ "fileVersion": "6.0.2523.51912"
534
+ },
535
+ "System.ServiceModel.Web.dll": {
536
+ "assemblyVersion": "4.0.0.0",
537
+ "fileVersion": "6.0.2523.51912"
538
+ },
539
+ "System.ServiceProcess.dll": {
540
+ "assemblyVersion": "4.0.0.0",
541
+ "fileVersion": "6.0.2523.51912"
542
+ },
543
+ "System.Text.Encoding.CodePages.dll": {
544
+ "assemblyVersion": "6.0.0.0",
545
+ "fileVersion": "6.0.2523.51912"
546
+ },
547
+ "System.Text.Encoding.Extensions.dll": {
548
+ "assemblyVersion": "6.0.0.0",
549
+ "fileVersion": "6.0.2523.51912"
550
+ },
551
+ "System.Text.Encoding.dll": {
552
+ "assemblyVersion": "6.0.0.0",
553
+ "fileVersion": "6.0.2523.51912"
554
+ },
555
+ "System.Text.Encodings.Web.dll": {
556
+ "assemblyVersion": "6.0.0.0",
557
+ "fileVersion": "6.0.2523.51912"
558
+ },
559
+ "System.Text.Json.dll": {
560
+ "assemblyVersion": "6.0.0.0",
561
+ "fileVersion": "6.0.2523.51912"
562
+ },
563
+ "System.Text.RegularExpressions.dll": {
564
+ "assemblyVersion": "6.0.0.0",
565
+ "fileVersion": "6.0.2523.51912"
566
+ },
567
+ "System.Threading.Channels.dll": {
568
+ "assemblyVersion": "6.0.0.0",
569
+ "fileVersion": "6.0.2523.51912"
570
+ },
571
+ "System.Threading.Overlapped.dll": {
572
+ "assemblyVersion": "6.0.0.0",
573
+ "fileVersion": "6.0.2523.51912"
574
+ },
575
+ "System.Threading.Tasks.Dataflow.dll": {
576
+ "assemblyVersion": "6.0.0.0",
577
+ "fileVersion": "6.0.2523.51912"
578
+ },
579
+ "System.Threading.Tasks.Extensions.dll": {
580
+ "assemblyVersion": "6.0.0.0",
581
+ "fileVersion": "6.0.2523.51912"
582
+ },
583
+ "System.Threading.Tasks.Parallel.dll": {
584
+ "assemblyVersion": "6.0.0.0",
585
+ "fileVersion": "6.0.2523.51912"
586
+ },
587
+ "System.Threading.Tasks.dll": {
588
+ "assemblyVersion": "6.0.0.0",
589
+ "fileVersion": "6.0.2523.51912"
590
+ },
591
+ "System.Threading.Thread.dll": {
592
+ "assemblyVersion": "6.0.0.0",
593
+ "fileVersion": "6.0.2523.51912"
594
+ },
595
+ "System.Threading.ThreadPool.dll": {
596
+ "assemblyVersion": "6.0.0.0",
597
+ "fileVersion": "6.0.2523.51912"
598
+ },
599
+ "System.Threading.Timer.dll": {
600
+ "assemblyVersion": "6.0.0.0",
601
+ "fileVersion": "6.0.2523.51912"
602
+ },
603
+ "System.Threading.dll": {
604
+ "assemblyVersion": "6.0.0.0",
605
+ "fileVersion": "6.0.2523.51912"
606
+ },
607
+ "System.Transactions.Local.dll": {
608
+ "assemblyVersion": "6.0.0.0",
609
+ "fileVersion": "6.0.2523.51912"
610
+ },
611
+ "System.Transactions.dll": {
612
+ "assemblyVersion": "4.0.0.0",
613
+ "fileVersion": "6.0.2523.51912"
614
+ },
615
+ "System.ValueTuple.dll": {
616
+ "assemblyVersion": "6.0.0.0",
617
+ "fileVersion": "6.0.2523.51912"
618
+ },
619
+ "System.Web.HttpUtility.dll": {
620
+ "assemblyVersion": "6.0.0.0",
621
+ "fileVersion": "6.0.2523.51912"
622
+ },
623
+ "System.Web.dll": {
624
+ "assemblyVersion": "4.0.0.0",
625
+ "fileVersion": "6.0.2523.51912"
626
+ },
627
+ "System.Windows.dll": {
628
+ "assemblyVersion": "4.0.0.0",
629
+ "fileVersion": "6.0.2523.51912"
630
+ },
631
+ "System.Xml.Linq.dll": {
632
+ "assemblyVersion": "4.0.0.0",
633
+ "fileVersion": "6.0.2523.51912"
634
+ },
635
+ "System.Xml.ReaderWriter.dll": {
636
+ "assemblyVersion": "6.0.0.0",
637
+ "fileVersion": "6.0.2523.51912"
638
+ },
639
+ "System.Xml.Serialization.dll": {
640
+ "assemblyVersion": "4.0.0.0",
641
+ "fileVersion": "6.0.2523.51912"
642
+ },
643
+ "System.Xml.XDocument.dll": {
644
+ "assemblyVersion": "6.0.0.0",
645
+ "fileVersion": "6.0.2523.51912"
646
+ },
647
+ "System.Xml.XPath.XDocument.dll": {
648
+ "assemblyVersion": "6.0.0.0",
649
+ "fileVersion": "6.0.2523.51912"
650
+ },
651
+ "System.Xml.XPath.dll": {
652
+ "assemblyVersion": "6.0.0.0",
653
+ "fileVersion": "6.0.2523.51912"
654
+ },
655
+ "System.Xml.XmlDocument.dll": {
656
+ "assemblyVersion": "6.0.0.0",
657
+ "fileVersion": "6.0.2523.51912"
658
+ },
659
+ "System.Xml.XmlSerializer.dll": {
660
+ "assemblyVersion": "6.0.0.0",
661
+ "fileVersion": "6.0.2523.51912"
662
+ },
663
+ "System.Xml.dll": {
664
+ "assemblyVersion": "4.0.0.0",
665
+ "fileVersion": "6.0.2523.51912"
666
+ },
667
+ "System.dll": {
668
+ "assemblyVersion": "4.0.0.0",
669
+ "fileVersion": "6.0.2523.51912"
670
+ },
671
+ "WindowsBase.dll": {
672
+ "assemblyVersion": "4.0.0.0",
673
+ "fileVersion": "6.0.2523.51912"
674
+ },
675
+ "mscorlib.dll": {
676
+ "assemblyVersion": "4.0.0.0",
677
+ "fileVersion": "6.0.2523.51912"
678
+ },
679
+ "netstandard.dll": {
680
+ "assemblyVersion": "2.1.0.0",
681
+ "fileVersion": "6.0.2523.51912"
682
+ }
683
+ },
684
+ "native": {
685
+ "Microsoft.DiaSymReader.Native.amd64.dll": {
686
+ "fileVersion": "0.0.0.0"
687
+ },
688
+ "System.IO.Compression.Native.dll": {
689
+ "fileVersion": "0.0.0.0"
690
+ },
691
+ "api-ms-win-core-console-l1-1-0.dll": {
692
+ "fileVersion": "0.0.0.0"
693
+ },
694
+ "api-ms-win-core-console-l1-2-0.dll": {
695
+ "fileVersion": "0.0.0.0"
696
+ },
697
+ "api-ms-win-core-datetime-l1-1-0.dll": {
698
+ "fileVersion": "0.0.0.0"
699
+ },
700
+ "api-ms-win-core-debug-l1-1-0.dll": {
701
+ "fileVersion": "0.0.0.0"
702
+ },
703
+ "api-ms-win-core-errorhandling-l1-1-0.dll": {
704
+ "fileVersion": "0.0.0.0"
705
+ },
706
+ "api-ms-win-core-fibers-l1-1-0.dll": {
707
+ "fileVersion": "0.0.0.0"
708
+ },
709
+ "api-ms-win-core-file-l1-1-0.dll": {
710
+ "fileVersion": "0.0.0.0"
711
+ },
712
+ "api-ms-win-core-file-l1-2-0.dll": {
713
+ "fileVersion": "0.0.0.0"
714
+ },
715
+ "api-ms-win-core-file-l2-1-0.dll": {
716
+ "fileVersion": "0.0.0.0"
717
+ },
718
+ "api-ms-win-core-handle-l1-1-0.dll": {
719
+ "fileVersion": "0.0.0.0"
720
+ },
721
+ "api-ms-win-core-heap-l1-1-0.dll": {
722
+ "fileVersion": "0.0.0.0"
723
+ },
724
+ "api-ms-win-core-interlocked-l1-1-0.dll": {
725
+ "fileVersion": "0.0.0.0"
726
+ },
727
+ "api-ms-win-core-libraryloader-l1-1-0.dll": {
728
+ "fileVersion": "0.0.0.0"
729
+ },
730
+ "api-ms-win-core-localization-l1-2-0.dll": {
731
+ "fileVersion": "0.0.0.0"
732
+ },
733
+ "api-ms-win-core-memory-l1-1-0.dll": {
734
+ "fileVersion": "0.0.0.0"
735
+ },
736
+ "api-ms-win-core-namedpipe-l1-1-0.dll": {
737
+ "fileVersion": "0.0.0.0"
738
+ },
739
+ "api-ms-win-core-processenvironment-l1-1-0.dll": {
740
+ "fileVersion": "0.0.0.0"
741
+ },
742
+ "api-ms-win-core-processthreads-l1-1-0.dll": {
743
+ "fileVersion": "0.0.0.0"
744
+ },
745
+ "api-ms-win-core-processthreads-l1-1-1.dll": {
746
+ "fileVersion": "0.0.0.0"
747
+ },
748
+ "api-ms-win-core-profile-l1-1-0.dll": {
749
+ "fileVersion": "0.0.0.0"
750
+ },
751
+ "api-ms-win-core-rtlsupport-l1-1-0.dll": {
752
+ "fileVersion": "0.0.0.0"
753
+ },
754
+ "api-ms-win-core-string-l1-1-0.dll": {
755
+ "fileVersion": "0.0.0.0"
756
+ },
757
+ "api-ms-win-core-synch-l1-1-0.dll": {
758
+ "fileVersion": "0.0.0.0"
759
+ },
760
+ "api-ms-win-core-synch-l1-2-0.dll": {
761
+ "fileVersion": "0.0.0.0"
762
+ },
763
+ "api-ms-win-core-sysinfo-l1-1-0.dll": {
764
+ "fileVersion": "0.0.0.0"
765
+ },
766
+ "api-ms-win-core-timezone-l1-1-0.dll": {
767
+ "fileVersion": "0.0.0.0"
768
+ },
769
+ "api-ms-win-core-util-l1-1-0.dll": {
770
+ "fileVersion": "0.0.0.0"
771
+ },
772
+ "api-ms-win-crt-conio-l1-1-0.dll": {
773
+ "fileVersion": "0.0.0.0"
774
+ },
775
+ "api-ms-win-crt-convert-l1-1-0.dll": {
776
+ "fileVersion": "0.0.0.0"
777
+ },
778
+ "api-ms-win-crt-environment-l1-1-0.dll": {
779
+ "fileVersion": "0.0.0.0"
780
+ },
781
+ "api-ms-win-crt-filesystem-l1-1-0.dll": {
782
+ "fileVersion": "0.0.0.0"
783
+ },
784
+ "api-ms-win-crt-heap-l1-1-0.dll": {
785
+ "fileVersion": "0.0.0.0"
786
+ },
787
+ "api-ms-win-crt-locale-l1-1-0.dll": {
788
+ "fileVersion": "0.0.0.0"
789
+ },
790
+ "api-ms-win-crt-math-l1-1-0.dll": {
791
+ "fileVersion": "0.0.0.0"
792
+ },
793
+ "api-ms-win-crt-multibyte-l1-1-0.dll": {
794
+ "fileVersion": "0.0.0.0"
795
+ },
796
+ "api-ms-win-crt-private-l1-1-0.dll": {
797
+ "fileVersion": "0.0.0.0"
798
+ },
799
+ "api-ms-win-crt-process-l1-1-0.dll": {
800
+ "fileVersion": "0.0.0.0"
801
+ },
802
+ "api-ms-win-crt-runtime-l1-1-0.dll": {
803
+ "fileVersion": "0.0.0.0"
804
+ },
805
+ "api-ms-win-crt-stdio-l1-1-0.dll": {
806
+ "fileVersion": "0.0.0.0"
807
+ },
808
+ "api-ms-win-crt-string-l1-1-0.dll": {
809
+ "fileVersion": "0.0.0.0"
810
+ },
811
+ "api-ms-win-crt-time-l1-1-0.dll": {
812
+ "fileVersion": "0.0.0.0"
813
+ },
814
+ "api-ms-win-crt-utility-l1-1-0.dll": {
815
+ "fileVersion": "0.0.0.0"
816
+ },
817
+ "clretwrc.dll": {
818
+ "fileVersion": "0.0.0.0"
819
+ },
820
+ "clrjit.dll": {
821
+ "fileVersion": "0.0.0.0"
822
+ },
823
+ "coreclr.dll": {
824
+ "fileVersion": "0.0.0.0"
825
+ },
826
+ "createdump.exe": {
827
+ "fileVersion": "0.0.0.0"
828
+ },
829
+ "dbgshim.dll": {
830
+ "fileVersion": "0.0.0.0"
831
+ },
832
+ "hostfxr.dll": {
833
+ "fileVersion": "0.0.0.0"
834
+ },
835
+ "hostpolicy.dll": {
836
+ "fileVersion": "0.0.0.0"
837
+ },
838
+ "mscordaccore.dll": {
839
+ "fileVersion": "0.0.0.0"
840
+ },
841
+ "mscordaccore_amd64_amd64_6.0.2523.51912.dll": {
842
+ "fileVersion": "0.0.0.0"
843
+ },
844
+ "mscordbi.dll": {
845
+ "fileVersion": "0.0.0.0"
846
+ },
847
+ "mscorrc.dll": {
848
+ "fileVersion": "0.0.0.0"
849
+ },
850
+ "msquic.dll": {
851
+ "fileVersion": "0.0.0.0"
852
+ },
853
+ "ucrtbase.dll": {
854
+ "fileVersion": "0.0.0.0"
855
+ }
856
+ }
857
+ },
858
+ "Godot.SourceGenerators/4.1.1": {},
859
+ "GodotSharp/4.1.1": {
860
+ "runtime": {
861
+ "lib/net6.0/GodotSharp.dll": {
862
+ "assemblyVersion": "4.1.1.0",
863
+ "fileVersion": "4.1.1.0"
864
+ }
865
+ }
866
+ },
867
+ "Microsoft.ML.OnnxRuntime/1.15.1": {
868
+ "dependencies": {
869
+ "Microsoft.ML.OnnxRuntime.Managed": "1.15.1"
870
+ },
871
+ "native": {
872
+ "runtimes/win-x64/native/onnxruntime.dll": {
873
+ "fileVersion": "0.0.0.0"
874
+ },
875
+ "runtimes/win-x64/native/onnxruntime.lib": {
876
+ "fileVersion": "0.0.0.0"
877
+ },
878
+ "runtimes/win-x64/native/onnxruntime_providers_shared.dll": {
879
+ "fileVersion": "0.0.0.0"
880
+ },
881
+ "runtimes/win-x64/native/onnxruntime_providers_shared.lib": {
882
+ "fileVersion": "0.0.0.0"
883
+ }
884
+ }
885
+ },
886
+ "Microsoft.ML.OnnxRuntime.Managed/1.15.1": {
887
+ "dependencies": {
888
+ "System.Memory": "4.5.3"
889
+ },
890
+ "runtime": {
891
+ "lib/net6.0/Microsoft.ML.OnnxRuntime.dll": {
892
+ "assemblyVersion": "0.0.0.0",
893
+ "fileVersion": "0.0.0.0"
894
+ }
895
+ }
896
+ },
897
+ "System.Memory/4.5.3": {}
898
+ }
899
+ },
900
+ "libraries": {
901
+ "CartExamples/1.0.0": {
902
+ "type": "project",
903
+ "serviceable": false,
904
+ "sha512": ""
905
+ },
906
+ "runtimepack.Microsoft.NETCore.App.Runtime.win-x64/6.0.25": {
907
+ "type": "runtimepack",
908
+ "serviceable": false,
909
+ "sha512": ""
910
+ },
911
+ "Godot.SourceGenerators/4.1.1": {
912
+ "type": "package",
913
+ "serviceable": true,
914
+ "sha512": "sha512-Kti3AjqGFT/myqAg87ykwoGAMrSUZkQaLdpZRWqvO0w2VhDtwUgEEKZk5HK94GzlWHOHZx2UW2fO88G7h56VgA==",
915
+ "path": "godot.sourcegenerators/4.1.1",
916
+ "hashPath": "godot.sourcegenerators.4.1.1.nupkg.sha512"
917
+ },
918
+ "GodotSharp/4.1.1": {
919
+ "type": "package",
920
+ "serviceable": true,
921
+ "sha512": "sha512-r07Z+O82m5dAqeJMYHDJCGdD0p1gb8vNVi+kIFYGjDNk39Ys3fgsm+x7ZpHEfNSW2oHTn62SCuCE38UAVy17MA==",
922
+ "path": "godotsharp/4.1.1",
923
+ "hashPath": "godotsharp.4.1.1.nupkg.sha512"
924
+ },
925
+ "Microsoft.ML.OnnxRuntime/1.15.1": {
926
+ "type": "package",
927
+ "serviceable": true,
928
+ "sha512": "sha512-kqZ1pL08yus4rVi5gkqaVRzu2Dgu0fC05f1EdV/Th51DIromCh8ZiWrjX7xaED1jqLpa7gMQpa1XEiSgtaZo7Q==",
929
+ "path": "microsoft.ml.onnxruntime/1.15.1",
930
+ "hashPath": "microsoft.ml.onnxruntime.1.15.1.nupkg.sha512"
931
+ },
932
+ "Microsoft.ML.OnnxRuntime.Managed/1.15.1": {
933
+ "type": "package",
934
+ "serviceable": true,
935
+ "sha512": "sha512-sWsqzgVoPPfdj3/S/8+Rr9xEdS4LYH5nV7Na+K+jOnzdWjR71IFZUbpR8bbtAwT/qPmazgNgoc+tMmey4NrVmw==",
936
+ "path": "microsoft.ml.onnxruntime.managed/1.15.1",
937
+ "hashPath": "microsoft.ml.onnxruntime.managed.1.15.1.nupkg.sha512"
938
+ },
939
+ "System.Memory/4.5.3": {
940
+ "type": "package",
941
+ "serviceable": true,
942
+ "sha512": "sha512-3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
943
+ "path": "system.memory/4.5.3",
944
+ "hashPath": "system.memory.4.5.3.nupkg.sha512"
945
+ }
946
+ },
947
+ "runtimes": {
948
+ "win-x64": [
949
+ "win",
950
+ "any",
951
+ "base"
952
+ ],
953
+ "win-x64-aot": [
954
+ "win-aot",
955
+ "win-x64",
956
+ "win",
957
+ "aot",
958
+ "any",
959
+ "base"
960
+ ],
961
+ "win10-x64": [
962
+ "win10",
963
+ "win81-x64",
964
+ "win81",
965
+ "win8-x64",
966
+ "win8",
967
+ "win7-x64",
968
+ "win7",
969
+ "win-x64",
970
+ "win",
971
+ "any",
972
+ "base"
973
+ ],
974
+ "win10-x64-aot": [
975
+ "win10-aot",
976
+ "win10-x64",
977
+ "win10",
978
+ "win81-x64-aot",
979
+ "win81-aot",
980
+ "win81-x64",
981
+ "win81",
982
+ "win8-x64-aot",
983
+ "win8-aot",
984
+ "win8-x64",
985
+ "win8",
986
+ "win7-x64-aot",
987
+ "win7-aot",
988
+ "win7-x64",
989
+ "win7",
990
+ "win-x64-aot",
991
+ "win-aot",
992
+ "win-x64",
993
+ "win",
994
+ "aot",
995
+ "any",
996
+ "base"
997
+ ],
998
+ "win7-x64": [
999
+ "win7",
1000
+ "win-x64",
1001
+ "win",
1002
+ "any",
1003
+ "base"
1004
+ ],
1005
+ "win7-x64-aot": [
1006
+ "win7-aot",
1007
+ "win7-x64",
1008
+ "win7",
1009
+ "win-x64-aot",
1010
+ "win-aot",
1011
+ "win-x64",
1012
+ "win",
1013
+ "aot",
1014
+ "any",
1015
+ "base"
1016
+ ],
1017
+ "win8-x64": [
1018
+ "win8",
1019
+ "win7-x64",
1020
+ "win7",
1021
+ "win-x64",
1022
+ "win",
1023
+ "any",
1024
+ "base"
1025
+ ],
1026
+ "win8-x64-aot": [
1027
+ "win8-aot",
1028
+ "win8-x64",
1029
+ "win8",
1030
+ "win7-x64-aot",
1031
+ "win7-aot",
1032
+ "win7-x64",
1033
+ "win7",
1034
+ "win-x64-aot",
1035
+ "win-aot",
1036
+ "win-x64",
1037
+ "win",
1038
+ "aot",
1039
+ "any",
1040
+ "base"
1041
+ ],
1042
+ "win81-x64": [
1043
+ "win81",
1044
+ "win8-x64",
1045
+ "win8",
1046
+ "win7-x64",
1047
+ "win7",
1048
+ "win-x64",
1049
+ "win",
1050
+ "any",
1051
+ "base"
1052
+ ],
1053
+ "win81-x64-aot": [
1054
+ "win81-aot",
1055
+ "win81-x64",
1056
+ "win81",
1057
+ "win8-x64-aot",
1058
+ "win8-aot",
1059
+ "win8-x64",
1060
+ "win8",
1061
+ "win7-x64-aot",
1062
+ "win7-aot",
1063
+ "win7-x64",
1064
+ "win7",
1065
+ "win-x64-aot",
1066
+ "win-aot",
1067
+ "win-x64",
1068
+ "win",
1069
+ "aot",
1070
+ "any",
1071
+ "base"
1072
+ ]
1073
+ }
1074
+ }
bin/data_CartExamples_x86_64/CartExamples.dll ADDED
Binary file (11.3 kB). View file
 
bin/data_CartExamples_x86_64/CartExamples.pdb ADDED
Binary file (17.1 kB). View file
 
bin/data_CartExamples_x86_64/CartExamples.runtimeconfig.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "runtimeOptions": {
3
+ "tfm": "net6.0",
4
+ "includedFrameworks": [
5
+ {
6
+ "name": "Microsoft.NETCore.App",
7
+ "version": "6.0.25"
8
+ }
9
+ ],
10
+ "configProperties": {
11
+ "System.Reflection.Metadata.MetadataUpdater.IsSupported": false
12
+ }
13
+ }
14
+ }
bin/data_CartExamples_x86_64/GodotSharp.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6d051fb9abbdacd00728731d45e169f5148e26fb9005a44a99ff2cd868641cf7
3
+ size 4001280
bin/data_CartExamples_x86_64/Microsoft.CSharp.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7677f382cdb0bdb36093d5a2770322527fb811545448a2612d6f6be98e89c0ca
3
+ size 1042592
bin/data_CartExamples_x86_64/Microsoft.DiaSymReader.Native.amd64.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76d0da51c2ed6ce4de34f0f703af564cbefd54766572a36b5a45494a88479e0b
3
+ size 1841048
bin/data_CartExamples_x86_64/Microsoft.ML.OnnxRuntime.dll ADDED
Binary file (172 kB). View file
 
bin/data_CartExamples_x86_64/Microsoft.VisualBasic.Core.dll ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6d2ee5345d6ba811e6ab5d5c14f29566018976232e6c0328ff72f13a12afe17
3
+ size 1245360
bin/data_CartExamples_x86_64/Microsoft.VisualBasic.dll ADDED
Binary file (18.2 kB). View file
 
bin/data_CartExamples_x86_64/Microsoft.Win32.Primitives.dll ADDED
Binary file (26.4 kB). View file
 
bin/data_CartExamples_x86_64/Microsoft.Win32.Registry.dll ADDED
Binary file (87.7 kB). View file
 
bin/data_CartExamples_x86_64/System.AppContext.dll ADDED
Binary file (15.5 kB). View file
 
bin/data_CartExamples_x86_64/System.Buffers.dll ADDED
Binary file (15.6 kB). View file
 
bin/data_CartExamples_x86_64/System.Collections.Concurrent.dll ADDED
Binary file (247 kB). View file
 
bin/data_CartExamples_x86_64/System.Collections.Immutable.dll ADDED
Binary file (666 kB). View file