Rework of SimulationConfig to load JSON from StreamingAssets\Configs
parent
0c72da4bb7
commit
dca1d97430
|
@ -1,8 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f95ae714d3d58b64aaea2fb7b009af9f
|
||||
NativeFormatImporter:
|
||||
guid: df58f75918cee2c48bb2986daa4c7f8d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,98 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package SimulationConfigProto;
|
||||
|
||||
message ProtobufConfig {
|
||||
double step_time = 1;
|
||||
repeated MissileConfigProto missile_configs = 2;
|
||||
repeated TargetConfigProto target_configs = 3;
|
||||
}
|
||||
|
||||
enum MissileTypeProto {
|
||||
HYDRA_70 = 0;
|
||||
MICROMISSILE = 1;
|
||||
}
|
||||
|
||||
enum TargetTypeProto {
|
||||
DRONE = 0;
|
||||
MISSILE = 1;
|
||||
}
|
||||
|
||||
enum ConfigColorProto {
|
||||
BLUE = 0;
|
||||
GREEN = 1;
|
||||
RED = 2;
|
||||
}
|
||||
|
||||
enum LineStyleProto {
|
||||
DOTTED = 0;
|
||||
SOLID = 1;
|
||||
}
|
||||
|
||||
enum MarkerProto {
|
||||
TRIANGLE_UP = 0;
|
||||
TRIANGLE_DOWN = 1;
|
||||
SQUARE = 2;
|
||||
}
|
||||
|
||||
enum SensorTypeProto {
|
||||
IDEAL = 0;
|
||||
}
|
||||
|
||||
message Vector3Proto {
|
||||
double x = 1;
|
||||
double y = 2;
|
||||
double z = 3;
|
||||
}
|
||||
|
||||
message InitialStateProto {
|
||||
Vector3Proto position = 1;
|
||||
Vector3Proto velocity = 2;
|
||||
}
|
||||
|
||||
message LaunchConfigProto {
|
||||
double launch_time = 1;
|
||||
}
|
||||
|
||||
message SensorConfigProto {
|
||||
SensorTypeProto type = 1;
|
||||
double frequency = 2;
|
||||
}
|
||||
|
||||
message DynamicConfigProto {
|
||||
LaunchConfigProto launch_config = 1;
|
||||
SensorConfigProto sensor_config = 2;
|
||||
}
|
||||
|
||||
message PlottingConfigProto {
|
||||
ConfigColorProto color = 1;
|
||||
LineStyleProto linestyle = 2;
|
||||
MarkerProto marker = 3;
|
||||
}
|
||||
|
||||
message SubmunitionAgentConfigProto {
|
||||
MissileTypeProto missile_type = 1;
|
||||
InitialStateProto initial_state = 2;
|
||||
DynamicConfigProto dynamic_config = 3;
|
||||
PlottingConfigProto plotting_config = 4;
|
||||
}
|
||||
|
||||
message SubmunitionsConfigProto {
|
||||
int32 num_submunitions = 1;
|
||||
LaunchConfigProto launch_config = 2;
|
||||
SubmunitionAgentConfigProto agent_config = 3;
|
||||
}
|
||||
|
||||
message MissileConfigProto {
|
||||
MissileTypeProto missile_type = 1;
|
||||
InitialStateProto initial_state = 2;
|
||||
DynamicConfigProto dynamic_config = 3;
|
||||
PlottingConfigProto plotting_config = 4;
|
||||
SubmunitionsConfigProto submunitions_config = 5;
|
||||
}
|
||||
|
||||
message TargetConfigProto {
|
||||
TargetTypeProto target_type = 1;
|
||||
InitialStateProto initial_state = 2;
|
||||
PlottingConfigProto plotting_config = 3;
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6d7c61b7d025c9b49b3410fd1195a525
|
||||
NativeFormatImporter:
|
||||
guid: a739996d4385c0f408a96e21ca42a239
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -2626,6 +2626,37 @@ MeshRenderer:
|
|||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!1 &1960520300
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1960520301}
|
||||
m_Layer: 0
|
||||
m_Name: GameObject
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1960520301
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1960520300}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 1715.5709, y: 1660.0452, z: 811.7122}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2052906803
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2705,3 +2736,4 @@ SceneRoots:
|
|||
- {fileID: 1255004942}
|
||||
- {fileID: 564968303}
|
||||
- {fileID: 1457077473}
|
||||
- {fileID: 1960520301}
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
using System.IO;
|
||||
using UnityEngine;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
public static class ConfigLoader {
|
||||
public static SimulationConfig LoadSimulationConfig(string configFileName) {
|
||||
string configFilePath = Path.Combine(Application.streamingAssetsPath, "Configs", configFileName);
|
||||
if (File.Exists(configFilePath)) {
|
||||
string json = File.ReadAllText(configFilePath);
|
||||
SimulationConfig config = JsonConvert.DeserializeObject<SimulationConfig>(json, new JsonSerializerSettings {
|
||||
Converters = { new Newtonsoft.Json.Converters.StringEnumConverter() }
|
||||
});
|
||||
return config;
|
||||
} else {
|
||||
Debug.LogError($"Configuration file not found at path: {configFilePath}");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static void PrintSimulationConfig(SimulationConfig config)
|
||||
{
|
||||
if (config == null)
|
||||
{
|
||||
Debug.Log("SimulationConfig is null");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log("SimulationConfig:");
|
||||
Debug.Log($"Time Scale: {config.timeScale}");
|
||||
|
||||
Debug.Log("Missile Swarm Configurations:");
|
||||
for (int i = 0; i < config.missile_swarm_configs.Count; i++)
|
||||
{
|
||||
PrintSwarmConfig(config.missile_swarm_configs[i], $"Missile Swarm {i + 1}");
|
||||
}
|
||||
|
||||
Debug.Log("Target Swarm Configurations:");
|
||||
for (int i = 0; i < config.target_swarm_configs.Count; i++)
|
||||
{
|
||||
PrintSwarmConfig(config.target_swarm_configs[i], $"Target Swarm {i + 1}");
|
||||
}
|
||||
}
|
||||
|
||||
private static void PrintSwarmConfig(SwarmConfig swarmConfig, string swarmName)
|
||||
{
|
||||
Debug.Log($"{swarmName}:");
|
||||
Debug.Log($" Number of Agents: {swarmConfig.num_agents}");
|
||||
PrintAgentConfig(swarmConfig.agent_config);
|
||||
}
|
||||
|
||||
private static void PrintAgentConfig(AgentConfig agentConfig)
|
||||
{
|
||||
Debug.Log(" Agent Configuration:");
|
||||
Debug.Log($" Missile Type: {agentConfig.missile_type}");
|
||||
Debug.Log($" Target Type: {agentConfig.target_type}");
|
||||
PrintInitialState(agentConfig.initial_state);
|
||||
PrintStandardDeviation(agentConfig.standard_deviation);
|
||||
PrintDynamicConfig(agentConfig.dynamic_config);
|
||||
PrintPlottingConfig(agentConfig.plotting_config);
|
||||
PrintSubmunitionsConfig(agentConfig.submunitions_config);
|
||||
}
|
||||
|
||||
private static void PrintInitialState(InitialState initialState)
|
||||
{
|
||||
Debug.Log(" Initial State:");
|
||||
Debug.Log($" Position: {initialState.position}");
|
||||
Debug.Log($" Rotation: {initialState.rotation}");
|
||||
Debug.Log($" Velocity: {initialState.velocity}");
|
||||
}
|
||||
|
||||
private static void PrintStandardDeviation(StandardDeviation standardDeviation)
|
||||
{
|
||||
Debug.Log(" Standard Deviation:");
|
||||
Debug.Log($" Position: {standardDeviation.position}");
|
||||
Debug.Log($" Velocity: {standardDeviation.velocity}");
|
||||
}
|
||||
|
||||
private static void PrintDynamicConfig(DynamicConfig dynamicConfig)
|
||||
{
|
||||
Debug.Log(" Dynamic Configuration:");
|
||||
Debug.Log($" Launch Time: {dynamicConfig.launch_config.launch_time}");
|
||||
Debug.Log($" Sensor Type: {dynamicConfig.sensor_config.type}");
|
||||
Debug.Log($" Sensor Frequency: {dynamicConfig.sensor_config.frequency}");
|
||||
}
|
||||
|
||||
private static void PrintPlottingConfig(PlottingConfig plottingConfig)
|
||||
{
|
||||
Debug.Log(" Plotting Configuration:");
|
||||
Debug.Log($" Color: {plottingConfig.color}");
|
||||
Debug.Log($" Line Style: {plottingConfig.linestyle}");
|
||||
Debug.Log($" Marker: {plottingConfig.marker}");
|
||||
}
|
||||
|
||||
private static void PrintSubmunitionsConfig(SubmunitionsConfig submunitionsConfig)
|
||||
{
|
||||
if (submunitionsConfig == null)
|
||||
{
|
||||
Debug.Log(" Submunitions Configuration: None");
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log(" Submunitions Configuration:");
|
||||
Debug.Log($" Number of Submunitions: {submunitionsConfig.num_submunitions}");
|
||||
Debug.Log($" Launch Time: {submunitionsConfig.launch_config.launch_time}");
|
||||
PrintSubmunitionAgentConfig(submunitionsConfig.agent_config);
|
||||
}
|
||||
|
||||
private static void PrintSubmunitionAgentConfig(SubmunitionAgentConfig agentConfig)
|
||||
{
|
||||
Debug.Log(" Submunition Agent Configuration:");
|
||||
Debug.Log($" Missile Type: {agentConfig.missile_type}");
|
||||
PrintInitialState(agentConfig.initial_state);
|
||||
PrintStandardDeviation(agentConfig.standard_deviation);
|
||||
PrintDynamicConfig(agentConfig.dynamic_config);
|
||||
PrintPlottingConfig(agentConfig.plotting_config);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: da3b9eead33b94a4f8df7a4af7a79d49
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,9 +1,12 @@
|
|||
using System.Collections;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
[CreateAssetMenu(fileName = "SimulationConfig", menuName = "Simulation/Config", order = 1)]
|
||||
public class SimulationConfig : ScriptableObject {
|
||||
|
||||
[Serializable]
|
||||
public class SimulationConfig {
|
||||
[Header("Simulation Settings")]
|
||||
public float timeScale = 0.05f;
|
||||
|
||||
|
@ -14,19 +17,19 @@ public class SimulationConfig : ScriptableObject {
|
|||
public List<SwarmConfig> target_swarm_configs = new List<SwarmConfig>();
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class DynamicConfig {
|
||||
public LaunchConfig launch_config;
|
||||
public SensorConfig sensor_config;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class SwarmConfig {
|
||||
public int num_agents;
|
||||
public AgentConfig agent_config;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class AgentConfig {
|
||||
public MissileType missile_type;
|
||||
public TargetType target_type;
|
||||
|
@ -43,7 +46,6 @@ public class AgentConfig {
|
|||
standard_deviation = submunitionConfig.standard_deviation,
|
||||
dynamic_config = submunitionConfig.dynamic_config,
|
||||
plotting_config = submunitionConfig.plotting_config,
|
||||
|
||||
// Set other fields as needed, using default values if not present in SubmunitionAgentConfig
|
||||
target_type = TargetType.DRONE, // Or another default value
|
||||
submunitions_config = null // Or a default value if needed
|
||||
|
@ -51,39 +53,39 @@ public class AgentConfig {
|
|||
}
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class InitialState {
|
||||
public Vector3 position;
|
||||
public Vector3 rotation;
|
||||
public Vector3 velocity;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class StandardDeviation {
|
||||
public Vector3 position;
|
||||
public Vector3 velocity;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class LaunchConfig {
|
||||
public float launch_time;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class PlottingConfig {
|
||||
public Color color;
|
||||
public ConfigColor color;
|
||||
public LineStyle linestyle;
|
||||
public Marker marker;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class SubmunitionsConfig {
|
||||
public int num_submunitions;
|
||||
public LaunchConfig launch_config;
|
||||
public SubmunitionAgentConfig agent_config;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class SubmunitionAgentConfig {
|
||||
public MissileType missile_type;
|
||||
public InitialState initial_state;
|
||||
|
@ -92,13 +94,13 @@ public class SubmunitionAgentConfig {
|
|||
public PlottingConfig plotting_config;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class SensorConfig {
|
||||
public SensorType type;
|
||||
public float frequency;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
[Serializable]
|
||||
public class TargetConfig {
|
||||
public TargetType target_type;
|
||||
public InitialState initial_state;
|
||||
|
@ -106,14 +108,16 @@ public class TargetConfig {
|
|||
public string prefabName;
|
||||
}
|
||||
|
||||
// Enums
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum MissileType { HYDRA_70, MICROMISSILE }
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum TargetType { DRONE, MISSILE }
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum ConfigColor { BLUE, GREEN, RED }
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum LineStyle { DOTTED, SOLID }
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum Marker { TRIANGLE_UP, TRIANGLE_DOWN, SQUARE }
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum SensorType { IDEAL }
|
|
@ -61,6 +61,8 @@ public class SimManager : MonoBehaviour {
|
|||
} else {
|
||||
Destroy(gameObject);
|
||||
}
|
||||
simulationConfig = ConfigLoader.LoadSimulationConfig("seven_missiles_seven_drone_targets.json");
|
||||
Debug.Log(simulationConfig);
|
||||
}
|
||||
|
||||
void Start() {
|
||||
|
|
|
@ -1,193 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 79f1fe138866d6a40b209a4edcf2ee06, type: 3}
|
||||
m_Name: SimulationConfigHydra70
|
||||
m_EditorClassIdentifier:
|
||||
timeScale: 1
|
||||
missile_swarm_configs:
|
||||
- num_agents: 10
|
||||
agent_config:
|
||||
missile_type: 0
|
||||
target_type: 0
|
||||
initial_state:
|
||||
position: {x: 0, y: 20, z: 0}
|
||||
rotation: {x: -45, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 10, z: 10}
|
||||
standard_deviation:
|
||||
position: {x: 10, y: 0, z: 10}
|
||||
velocity: {x: 5, y: 0, z: 1}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 100
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
submunitions_config:
|
||||
num_submunitions: 7
|
||||
launch_config:
|
||||
launch_time: 4
|
||||
agent_config:
|
||||
missile_type: 1
|
||||
initial_state:
|
||||
position: {x: -171.3253, y: 683.85236, z: 846.74677}
|
||||
rotation: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: -45.325005, y: 110.16025, z: 216.10002}
|
||||
standard_deviation:
|
||||
position: {x: 5, y: 5, z: 5}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 100
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
- num_agents: 10
|
||||
agent_config:
|
||||
missile_type: 0
|
||||
target_type: 0
|
||||
initial_state:
|
||||
position: {x: 200, y: 20, z: 0}
|
||||
rotation: {x: -60, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 10, z: 12}
|
||||
standard_deviation:
|
||||
position: {x: 10, y: 0, z: 10}
|
||||
velocity: {x: 5, y: 0, z: 1}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 10
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 100
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
submunitions_config:
|
||||
num_submunitions: 7
|
||||
launch_config:
|
||||
launch_time: 12
|
||||
agent_config:
|
||||
missile_type: 1
|
||||
initial_state:
|
||||
position: {x: -3.2042065, y: 781.2401, z: 1043.2384}
|
||||
rotation: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: -72.93396, y: 249.48598, z: 385.07947}
|
||||
standard_deviation:
|
||||
position: {x: 5, y: 5, z: 5}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 100
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
- num_agents: 10
|
||||
agent_config:
|
||||
missile_type: 0
|
||||
target_type: 0
|
||||
initial_state:
|
||||
position: {x: -100, y: 20, z: 0}
|
||||
rotation: {x: -45, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 10, z: 10}
|
||||
standard_deviation:
|
||||
position: {x: 10, y: 0, z: 10}
|
||||
velocity: {x: 5, y: 0, z: 3}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 20
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 100
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
submunitions_config:
|
||||
num_submunitions: 7
|
||||
launch_config:
|
||||
launch_time: 23
|
||||
agent_config:
|
||||
missile_type: 1
|
||||
initial_state:
|
||||
position: {x: -246.4463, y: 976.02924, z: 1081.1262}
|
||||
rotation: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: -31.540234, y: 178.44958, z: 249.32939}
|
||||
standard_deviation:
|
||||
position: {x: 5, y: 5, z: 5}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 100
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
target_swarm_configs:
|
||||
- num_agents: 200
|
||||
agent_config:
|
||||
missile_type: 0
|
||||
target_type: 0
|
||||
initial_state:
|
||||
position: {x: 0, y: 600, z: 6000}
|
||||
rotation: {x: 90, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: -50}
|
||||
standard_deviation:
|
||||
position: {x: 1000, y: 200, z: 100}
|
||||
velocity: {x: 0, y: 0, z: 25}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 0
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
submunitions_config:
|
||||
num_submunitions: 0
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
agent_config:
|
||||
missile_type: 0
|
||||
initial_state:
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
rotation: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
standard_deviation:
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 0
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
|
@ -1,109 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 79f1fe138866d6a40b209a4edcf2ee06, type: 3}
|
||||
m_Name: SimulationConfigMany
|
||||
m_EditorClassIdentifier:
|
||||
timeScale: 0.2
|
||||
missile_swarm_configs:
|
||||
- num_agents: 200
|
||||
agent_config:
|
||||
missile_type: 1
|
||||
target_type: 0
|
||||
initial_state:
|
||||
position: {x: 0, y: 10, z: 0}
|
||||
rotation: {x: -45, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: 10}
|
||||
standard_deviation:
|
||||
position: {x: 10, y: 10, z: 10}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 0
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
submunitions_config:
|
||||
num_submunitions: 0
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
agent_config:
|
||||
missile_type: 0
|
||||
initial_state:
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
rotation: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
standard_deviation:
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 0
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
prefabName:
|
||||
prefabName: Micromissile
|
||||
target_swarm_configs:
|
||||
- num_agents: 200
|
||||
agent_config:
|
||||
missile_type: 0
|
||||
target_type: 0
|
||||
initial_state:
|
||||
position: {x: 0, y: 400, z: 3000}
|
||||
rotation: {x: 90, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: -150}
|
||||
standard_deviation:
|
||||
position: {x: 500, y: 200, z: 100}
|
||||
velocity: {x: 0, y: 0, z: 50}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 0
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
submunitions_config:
|
||||
num_submunitions: 0
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
agent_config:
|
||||
missile_type: 0
|
||||
initial_state:
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
rotation: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
standard_deviation:
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 0
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
prefabName:
|
||||
prefabName: DroneTarget
|
|
@ -1,105 +0,0 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 79f1fe138866d6a40b209a4edcf2ee06, type: 3}
|
||||
m_Name: SimulationConfigSimple
|
||||
m_EditorClassIdentifier:
|
||||
timeScale: 1
|
||||
missile_swarm_configs:
|
||||
- num_agents: 1
|
||||
agent_config:
|
||||
missile_type: 0
|
||||
target_type: 0
|
||||
initial_state:
|
||||
position: {x: 0, y: 20, z: 0}
|
||||
rotation: {x: -45, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 10, z: 10}
|
||||
standard_deviation:
|
||||
position: {x: 10, y: 0, z: 10}
|
||||
velocity: {x: 5, y: 0, z: 1}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 100
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
submunitions_config:
|
||||
num_submunitions: 7
|
||||
launch_config:
|
||||
launch_time: 4
|
||||
agent_config:
|
||||
missile_type: 1
|
||||
initial_state:
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
rotation: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
standard_deviation:
|
||||
position: {x: 5, y: 5, z: 5}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 100
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
target_swarm_configs:
|
||||
- num_agents: 7
|
||||
agent_config:
|
||||
missile_type: 0
|
||||
target_type: 0
|
||||
initial_state:
|
||||
position: {x: 0, y: 600, z: 6000}
|
||||
rotation: {x: 90, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: -50}
|
||||
standard_deviation:
|
||||
position: {x: 1000, y: 200, z: 100}
|
||||
velocity: {x: 0, y: 0, z: 25}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 0
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
||||
submunitions_config:
|
||||
num_submunitions: 0
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
agent_config:
|
||||
missile_type: 0
|
||||
initial_state:
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
rotation: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
standard_deviation:
|
||||
position: {x: 0, y: 0, z: 0}
|
||||
velocity: {x: 0, y: 0, z: 0}
|
||||
dynamic_config:
|
||||
launch_config:
|
||||
launch_time: 0
|
||||
sensor_config:
|
||||
type: 0
|
||||
frequency: 0
|
||||
plotting_config:
|
||||
color: {r: 0, g: 0, b: 0, a: 0}
|
||||
linestyle: 0
|
||||
marker: 0
|
|
@ -1,8 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b7e9e8f13e8db0f47a33344c45790f20
|
||||
NativeFormatImporter:
|
||||
guid: 4357e847dbac6fc47886c005b4206b1f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 70b0ca10540c7004da69662c480a00cc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,99 @@
|
|||
{
|
||||
"timeScale": 1,
|
||||
"missile_swarm_configs": [
|
||||
{
|
||||
"num_agents": 1,
|
||||
"agent_config": {
|
||||
"missile_type": "HYDRA_70",
|
||||
"target_type": "DRONE",
|
||||
"initial_state": {
|
||||
"position": { "x": 0, "y": 20, "z": 0 },
|
||||
"rotation": { "x": -45, "y": 0, "z": 0 },
|
||||
"velocity": { "x": 0, "y": 10, "z": 10 }
|
||||
},
|
||||
"standard_deviation": {
|
||||
"position": { "x": 10, "y": 0, "z": 10 },
|
||||
"velocity": { "x": 5, "y": 0, "z": 1 }
|
||||
},
|
||||
"dynamic_config": {
|
||||
"launch_config": { "launch_time": 0 },
|
||||
"sensor_config": {
|
||||
"type": "IDEAL",
|
||||
"frequency": 100
|
||||
}
|
||||
},
|
||||
"submunitions_config": {
|
||||
"num_submunitions": 7,
|
||||
"launch_config": { "launch_time": 4 },
|
||||
"agent_config": {
|
||||
"missile_type": "MICROMISSILE",
|
||||
"initial_state": {
|
||||
"position": { "x": 0, "y": 0, "z": 0 },
|
||||
"rotation": { "x": 0, "y": 0, "z": 0 },
|
||||
"velocity": { "x": 0, "y": 0, "z": 0 }
|
||||
},
|
||||
"standard_deviation": {
|
||||
"position": { "x": 5, "y": 5, "z": 5 },
|
||||
"velocity": { "x": 0, "y": 0, "z": 0 }
|
||||
},
|
||||
"dynamic_config": {
|
||||
"launch_config": { "launch_time": 0 },
|
||||
"sensor_config": {
|
||||
"type": "IDEAL",
|
||||
"frequency": 100
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"target_swarm_configs": [
|
||||
{
|
||||
"num_agents": 7,
|
||||
"agent_config": {
|
||||
"missile_type": "HYDRA_70",
|
||||
"target_type": "DRONE",
|
||||
"initial_state": {
|
||||
"position": { "x": 0, "y": 600, "z": 6000 },
|
||||
"rotation": { "x": 90, "y": 0, "z": 0 },
|
||||
"velocity": { "x": 0, "y": 0, "z": -50 }
|
||||
},
|
||||
"standard_deviation": {
|
||||
"position": { "x": 1000, "y": 200, "z": 100 },
|
||||
"velocity": { "x": 0, "y": 0, "z": 25 }
|
||||
},
|
||||
"dynamic_config": {
|
||||
"launch_config": { "launch_time": 0 },
|
||||
"sensor_config": {
|
||||
"type": "IDEAL",
|
||||
"frequency": 0
|
||||
}
|
||||
},
|
||||
"submunitions_config": {
|
||||
"num_submunitions": 0,
|
||||
"launch_config": { "launch_time": 0 },
|
||||
"agent_config": {
|
||||
"missile_type": "HYDRA_70",
|
||||
"initial_state": {
|
||||
"position": { "x": 0, "y": 0, "z": 0 },
|
||||
"rotation": { "x": 0, "y": 0, "z": 0 },
|
||||
"velocity": { "x": 0, "y": 0, "z": 0 }
|
||||
},
|
||||
"standard_deviation": {
|
||||
"position": { "x": 0, "y": 0, "z": 0 },
|
||||
"velocity": { "x": 0, "y": 0, "z": 0 }
|
||||
},
|
||||
"dynamic_config": {
|
||||
"launch_config": { "launch_time": 0 },
|
||||
"sensor_config": {
|
||||
"type": "IDEAL",
|
||||
"frequency": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e0c9493619e84524083dc7a2928765c8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -3,6 +3,7 @@
|
|||
"com.unity.collab-proxy": "2.5.1",
|
||||
"com.unity.feature.development": "1.0.1",
|
||||
"com.unity.ide.cursor": "https://github.com/boxqkrtm/com.unity.ide.cursor.git",
|
||||
"com.unity.nuget.newtonsoft-json": "3.2.1",
|
||||
"com.unity.render-pipelines.universal": "14.0.11",
|
||||
"com.unity.textmeshpro": "3.0.6",
|
||||
"com.unity.timeline": "1.7.6",
|
||||
|
|
|
@ -86,6 +86,13 @@
|
|||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.nuget.newtonsoft-json": {
|
||||
"version": "3.2.1",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.performance.profile-analyzer": {
|
||||
"version": "1.2.2",
|
||||
"depth": 1,
|
||||
|
|
Loading…
Reference in New Issue