浏览代码

Update SimulationState.cs

/pyrception-integration
GitHub 3 年前
当前提交
a60cae6c
共有 1 个文件被更改,包括 0 次插入10 次删除
  1. 10
      com.unity.perception/Runtime/GroundTruth/SimulationState.cs

10
com.unity.perception/Runtime/GroundTruth/SimulationState.cs


Dictionary<SensorHandle, SensorData> m_Sensors = new Dictionary<SensorHandle, SensorData>();
HashSet<EgoHandle> m_Egos = new HashSet<EgoHandle>();
HashSet<Guid> m_Ids = new HashSet<Guid>();
Dictionary<string, object> m_Metadata = new Dictionary<string, object>();
Guid m_SequenceId = Guid.NewGuid();
// Always use the property SequenceTimeMs instead

m_Ids.Add(egoHandle.Id);
}
public void AddMetadata(string key, object value)
{
if (!m_Metadata.ContainsKey(key)) m_Metadata[key] = null;
m_Metadata[key] = value;
}
public bool IsEnabled(SensorHandle sensorHandle) => m_ActiveSensors.Contains(sensorHandle);
public void SetEnabled(SensorHandle sensorHandle, bool value)

Debug.LogError($"Simulation ended with pending metrics: {string.Join(", ", m_PendingMetrics.Select(c => $"id:{c.MetricId} step:{c.Step}"))}");
WriteReferences();
// TODO write metadata here
WriteMetadata();
Time.captureDeltaTime = 0;
IsRunning = false;

正在加载...
取消
保存