From be69727d09ff9e4ae33aa163ee6794ad7ad40702 Mon Sep 17 00:00:00 2001 From: Dawid Moszynski Date: Thu, 25 Jul 2024 12:25:09 +0200 Subject: [PATCH 1/2] fix(NPCVehicleCognitionStep): add isCloseEachOther check --- .../Steps/NPCVehicleCognitionStep.cs | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Assets/AWSIM/Scripts/RandomTraffic/NPCVehicle/Steps/NPCVehicleCognitionStep.cs b/Assets/AWSIM/Scripts/RandomTraffic/NPCVehicle/Steps/NPCVehicleCognitionStep.cs index f1b4d043d..e344efdda 100644 --- a/Assets/AWSIM/Scripts/RandomTraffic/NPCVehicle/Steps/NPCVehicleCognitionStep.cs +++ b/Assets/AWSIM/Scripts/RandomTraffic/NPCVehicle/Steps/NPCVehicleCognitionStep.cs @@ -4,6 +4,7 @@ using Unity.Jobs; using UnityEngine; using UnityEngine.Profiling; +using GeometryUtility = AWSIM.Lanelet.GeometryUtility; namespace AWSIM.TrafficSimulation { @@ -281,6 +282,8 @@ private struct RightOfWayCheckJob public static float maximumOverrunStopPointForLaneRules = 1f; public static float differenceOrientationDegreesImplyingPerpendicularRoad = 35f; + + public static float minimumDistanceBetweenNPCs = 70f; // In public Transform EGOTransform; @@ -402,6 +405,11 @@ public void Execute() } } + static private bool isCloseEachOther(NPCVehicleInternalState refState, NPCVehicleInternalState otherState) + { + return GeometryUtility.Distance2D(refState.Vehicle.transform.position, otherState.Vehicle.transform.position) < minimumDistanceBetweenNPCs; + } + static private bool isYieldingDueToRules(NPCVehicleInternalState refState) { return refState.YieldPhase == NPCVehicleYieldPhase.LEFT_HAND_RULE_ENTERING_INTERSECTION || @@ -479,6 +487,9 @@ static private bool isLeftHandRuleEnteringIntersection(NPCVehicleInternalState r { foreach (var otherState in states) { + if (!isCloseEachOther(refState, otherState)) + continue; + if (!shouldBeConsideredForYielding(refState, otherState)) continue; @@ -505,6 +516,9 @@ static private bool isLeftHandRuleOnIntersection(NPCVehicleInternalState refStat { foreach (var otherState in states) { + if (!isCloseEachOther(refState, otherState)) + continue; + if (!shouldBeConsideredForYielding(refState, otherState)) continue; @@ -539,6 +553,9 @@ static private bool isIntersectionBusy(NPCVehicleInternalState refState, IReadOn { foreach (var otherState in states) { + if (!isCloseEachOther(refState, otherState)) + continue; + if (!shouldBeConsideredForYielding(refState, otherState)) continue; @@ -572,6 +589,9 @@ static private bool isSomeVehicleForcingPriority(NPCVehicleInternalState refStat { foreach (var otherState in states) { + if (!isCloseEachOther(refState, otherState)) + continue; + if (!shouldBeConsideredForYielding(refState, otherState)) continue; @@ -630,6 +650,9 @@ static bool IsLaneDominatedByAny(TrafficLane lane, IReadOnlyList Date: Tue, 20 Aug 2024 17:38:08 +0900 Subject: [PATCH 2/2] update docs libssl version --- docs/DeveloperGuide/TroubleShooting/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/DeveloperGuide/TroubleShooting/index.md b/docs/DeveloperGuide/TroubleShooting/index.md index 85dd710dc..d78b1edaf 100644 --- a/docs/DeveloperGuide/TroubleShooting/index.md +++ b/docs/DeveloperGuide/TroubleShooting/index.md @@ -14,6 +14,6 @@ This document describes the most common errors encountered when working with AWS |Error when starting AWSIM binary. `segmentation fault (core dumped)`| - Check if yourNvidia drivers or Vulkan API are installed correctly
- When building binary please pay attantion whether the `Graphic Jobs` option in `Player Settings` is disabled. It should be disabled since it may produce segmentation fault errors. Please check [forum](https://forum.unity.com/threads/segmentation-fault-core-dumped-in-standalone-app-but-not-in-editor.1226610/) for more details. | |Initial pose does not match automatically. |Set initial pose manually.
![](Image_Initial_0.png)
![](Image_Initial_1.png)| |Unity crashes and check the log for the cause of the error.|**Editor log file location**
Windows :
`C:\Users\username\AppData\Local\Unity\Editor\Editor.log`
Linux :
`~/.config/unity3d/.Editor.log`

**Player log file location**
Windows : `C:\Users\username\AppData\LocalLow\CompanyName\ProductName\output_log.txt`
Linux :
`~/.config/unity3d/CompanyName/ProductName/Player.log`

See also : [Unity Documentation - Log Files](https://docs.unity3d.com/2021.1/Documentation/Manual/LogFiles.html)| -|Safe mode dialog appears when starting UnityEditor.

or

error : `No usable version of libssl was found`|1. download libssl
`$ wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.11_amd64.deb`

2. install
`sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.11_amd64.deb`| +|Safe mode dialog appears when starting UnityEditor.

or

error : `No usable version of libssl was found`|1. download libssl
`$ wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb`

2. install
`sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb`| |(Windows) Unity Editor's error:`Plugins: Failed to load 'Assets/RGLUnityPlugin/Plugins/Windows/x86_64/RobotecGPULidar.dll' because one or more of its dependencies could not be loaded.`|Install [Microsoft Visual C++ Redistributable packages for Visual Studio 2015, 2017, 2019, and 2022](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2015-2017-2019-and-2022) (X64 Architecture)| |(Windows) Built-binary or Unity Editor freeze when simulation started|Update/Install latest NIC(NetworkInterfaceCard) drivers for your PC.
Especially, if you can find latest drivers provided by chip vendors for the interfaces (not by Microsoft), we recommend vendors' drivers.|