Commit f51efee4 authored by VAN TOLL Wouter's avatar VAN TOLL Wouter

TtcaDca: Removed if-statements that make the cost function non-smooth.

parent 26f071b2
SETLOCAL ENABLEDELAYEDEXPANSION
:: policies
FOR %%P IN (Dutra Karamouzas Moussaid ORCA PLEdestrians PowerLaw RVO SocialForces) DO (
:: scenarios
FOR %%S IN (Circle5 Circle10 Circle15 Circle25 Circle50 1to1-90Degrees 1to1-135Degrees 1to1-180Degrees 1to10-45Degrees 1to10-90Degrees 1to10-180Degrees 25to25-90Degrees 25to25-180Degrees) DO (
SET outputFolder=%cd%\output\%%S\%%P
SET scenarioFile=examples/%%S-%%P.xml
if not exist "!outputFolder!" mkdir "!outputFolder!"
"build/Release/UMANS_ConsoleApplication_Windows.exe" -i "!scenarioFile!" -o "!outputFolder!" -t 4
)
)
pause
v1.0.1
= Release notes
**Features:**
- The console application now measures and reports the running time.
**Bugfixes:**
- [#88] The console application now correctly uses the "number of threads" parameter.
- PowerLaw: Now ignoring collisions that are more than tau0 seconds away.
- WorldToric: Fixed a mix-up of x and y.
**Performance improvements:**
- PhantomAgent now caches values that were often re-computed.
- Faster construction of nearest-neighbor lists.
- More parallel-friendly use of pointers.
- Decreased the "range" (neighbor distance) from 100 to 5 meters in all example policies. This changes the output slightly, but it is crucial for efficiency.
- GoalReachingForce, RandomFunction: Decreased the default "range" to 0, as these functions do not use any neighbors.
**Other improvements:**
- Modernized CostFunctionFactory, using C++ templates instead of C macros.
\ No newline at end of file
:: Batch file for creating a stand-alone release of the UMANS binaries.
:: Created by Wouter van Toll on April 28, 2020.
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
set version=1.0.1
set RootFolder=C:\Users\wvantoll\Documents\Code
set UMANSFolder=%RootFolder%\UMANS
set UMANSBuildFolder=%UMANSFolder%\build\Release
set TargetFolder=%RootFolder%\UMANS-v%version%-win
set TargetFolderLicenses=%TargetFolder%\3rd-party-licenses
set TargetFolderBinaries=%TargetFolder%\bin
cd "%UMANSFolder%"
:: create main output folder
echo Creating target directory %TargetFolder%...
mkdir "%TargetFolder%"
:: copy readme files
echo Copying readme files...
for %%F in (AUTHORS.md README.md COPYING) do (
copy "%UMANSFolder%\%%F" "%TargetFolder%\%%F"
)
:: copy examples
echo Copying example files...
robocopy "%UMANSFolder%\examples" "%TargetFolder%\examples" /e /copyall /NFL /NDL /NJH /NJS /nc /ns /np
:: copy licenses
echo Copying license files...
mkdir "%TargetFolderLicenses%"
for %%F in (earcut nanoflann ORCA tinyxml) do (
copy "%UMANSFolder%\src\3rd-party\%%F\LICENSE-%%F" "%TargetFolderLicenses%\LICENSE-%%F"
)
:: do a full Windows deploy of the Qt GUI application
echo Deploying Qt application...
cd C:\Qt\5.12.0\msvc2017_64\bin
windeployqt "%UMANSBuildFolder%\UMANS-GUI.exe"
:: copy the bin folder
echo Copying binaries and Qt files...
mkdir "%TargetFolderBinaries%"
robocopy "%UMANSBuildFolder%" "%TargetFolderBinaries%" /e /copyall /xf *.lib *.exp /NFL /NDL /NJH /NJS /nc /ns /np
:: create a ZIP file
echo Creating zip file...
cd "%UMANSFolder%"
7z a "%TargetFolder%.zip" "%TargetFolder%" -mx9
pause
doxygen Doxyfile
\ No newline at end of file
......@@ -88,26 +88,31 @@ float TtcaDca::GetCost(const Vector2D& velocity, Agent* agent, const WorldBase *
const Vector2D& relVelocity = neighbor.GetVelocity() - velocity;
// Only see agents in front of the direction of motion
if (relPos.dot(velocity) < 0)
continue;
// --> disabled because it makes the cost function non-smooth
//if (relPos.dot(velocity) < 0)
// continue;
// there is adaptation only if relative velocity is not zero
if (relVelocity.sqrMagnitude() > eps)
{
// computing ttc and dca
const auto& ttca_dca = ComputeTimeAndDistanceToClosestApproach(
Position, velocity, Radius,
neighborPos, neighbor.GetVelocity(), neighbor.realAgent->getRadius());
// --> disabled because it makes the cost function non-smooth
//if (relVelocity.sqrMagnitude() <= eps)
// continue;
// computing ttc and dca
const auto& ttca_dca = ComputeTimeAndDistanceToClosestApproach(
Position, velocity, Radius,
neighborPos, neighbor.GetVelocity(), neighbor.realAgent->getRadius());
if (ttca_dca.first < 0) continue;
// ignore TTCAs in the past
// --> disabled because it makes the cost function non-smooth
//if (ttca_dca.first < 0)
// continue;
// computing the cost for this neighbor
float scale = 1 / relPos.sqrMagnitude(); //simulate num of pixels of an agent in screen
ObstacleCostScale += scale;
// computing the cost for this neighbor
float scale = 1 / relPos.sqrMagnitude(); //simulate num of pixels of an agent in screen
ObstacleCostScale += scale;
float cost = costForTtcaDca(ttca_dca.first, ttca_dca.second) * scale;
ObstacleCost += cost;
}
float cost = costForTtcaDca(ttca_dca.first, ttca_dca.second) * scale;
ObstacleCost += cost;
}
// TODO: check neighboring obstacles
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment