diff --git a/Assets/Scripts/Devices/Camera.cs b/Assets/Scripts/Devices/Camera.cs index 7729e79b..f21b402d 100644 --- a/Assets/Scripts/Devices/Camera.cs +++ b/Assets/Scripts/Devices/Camera.cs @@ -188,7 +188,6 @@ private IEnumerator CameraWorker() readback.WaitForCompletion(); - if (readback.hasError) { Debug.LogError("Failed to read GPU texture"); diff --git a/Assets/Scripts/ModelLoader.cs b/Assets/Scripts/ModelLoader.cs index 6ae97576..ce433349 100644 --- a/Assets/Scripts/ModelLoader.cs +++ b/Assets/Scripts/ModelLoader.cs @@ -30,8 +30,9 @@ public class ModelLoader : MonoBehaviour public string worldFileName; private string filesRootDirectory = string.Empty; - private List modelRootDirectories; - private List worldRootDirectories; + + public List modelRootDirectories; + public List worldRootDirectories; private GameObject modelsRoot = null; @@ -74,6 +75,8 @@ void Awake() filesRootDirectory = "/usr/share/gazebo-9/"; modelRootDirectories.Add("../sample-resources/models/"); worldRootDirectories.Add("../sample-resources/worlds/"); + // modelRootDirectories.Add("../../lgrs_resource/assets/models/"); + // worldRootDirectories.Add("../../lgrs_resource/worlds/"); #else var separator = new char[] {':'}; filesRootDirectory = Environment.GetEnvironmentVariable("CLOISIM_FILES_PATH"); diff --git a/Assets/Scripts/Tools/SDF/Geometry.cs b/Assets/Scripts/Tools/SDF/Geometry.cs index ad0da17a..4115bb2a 100644 --- a/Assets/Scripts/Tools/SDF/Geometry.cs +++ b/Assets/Scripts/Tools/SDF/Geometry.cs @@ -32,7 +32,6 @@ public Geometry(XmlNode _node) protected override void ParseElements() { - if (IsValidNode("box")) { Type = "box"; @@ -82,6 +81,7 @@ protected override void ParseElements() IsValidNode("polyline")) { Console.WriteLine("Currently not supported"); + empty = true; } else if (IsValidNode("empty")) { @@ -102,17 +102,29 @@ public ShapeType GetShape() public Type GetShapeType() { if (Type.Equals("box")) + { return typeof(Box); + } else if (Type.Equals("mesh")) + { return typeof(Mesh); + } else if (Type.Equals("sphere")) + { return typeof(Sphere); + } else if (Type.Equals("cylinder")) + { return typeof(Cylinder); + } else if (Type.Equals("plane")) + { return typeof(Plane); + } else + { return null; + } } } } \ No newline at end of file diff --git a/Assets/Scripts/Tools/SDFImporter/SDFImporter.Sensor.cs b/Assets/Scripts/Tools/SDFImporter/SDFImporter.Sensor.cs index 8c80852b..3f523771 100644 --- a/Assets/Scripts/Tools/SDFImporter/SDFImporter.Sensor.cs +++ b/Assets/Scripts/Tools/SDFImporter/SDFImporter.Sensor.cs @@ -21,7 +21,7 @@ protected override System.Object ImportSensor(in SDF.Sensor item, in System.Obje var sensorType = item.Type; - if (sensorType.Equals("ray") || sensorType.Equals("gpu_ray")) + if (sensorType.Equals("lidar") || sensorType.Equals("ray") || sensorType.Equals("gpu_ray")) { var ray = item.GetSensor() as SDF.Ray; sensor = SDFImplement.Sensor.AddLidar(ray, targetObject); @@ -56,7 +56,8 @@ protected override System.Object ImportSensor(in SDF.Sensor item, in System.Obje var gps = item.GetSensor() as SDF.GPS; sensor = SDFImplement.Sensor.AddGps(gps, targetObject); } - else if (sensorType.Equals("altimeter") || sensorType.Equals("contact") || + else if (sensorType.Equals("air_pressure") || + sensorType.Equals("altimeter") || sensorType.Equals("contact") || sensorType.Equals("force_torque") || sensorType.Equals("logical_camera") || sensorType.Equals("magnetometer") || sensorType.Equals("rfidtag") || diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 8ff13b39..7e40c104 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -121,7 +121,7 @@ PlayerSettings: 16:10: 1 16:9: 1 Others: 1 - bundleVersion: 1.4.0 + bundleVersion: 1.4.1 preloadedAssets: [] metroInputSource: 0 wsaTransparentSwapchain: 0