Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
UMANS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OCSR
UMANS
Commits
5cc9ddeb
Commit
5cc9ddeb
authored
Sep 17, 2020
by
VAN TOLL Wouter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ORCA::GetCost(): Removed unused code.
parent
faa35e00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
27 deletions
+0
-27
src/Engine/CostFunctions/ORCA.cpp
src/Engine/CostFunctions/ORCA.cpp
+0
-27
No files found.
src/Engine/CostFunctions/ORCA.cpp
View file @
5cc9ddeb
...
...
@@ -83,33 +83,6 @@ float ORCA::GetCost(const Vector2D& velocity, Agent* agent, const WorldBase * wo
// In short, both cases can actually use the same cost function:
return
maxDistance
+
2
*
agent
->
getMaximumSpeed
();
/*if (orcaSolution.isFeasible)
{
// In this case, if the query velocity lies on the wrong side of any ORCA line, its cost is infinite.
// Because the ORCA program is feasible, there should be at least one velocity for which this is not the case.
for (const auto& orcaLine : orcaSolution.orcaLines)
{
if (getSignedDistanceToOrcaLine(velocity, orcaLine) > 0.0f)
return MaxFloat;
}
// otherwise, this velocity is apparently allowed, and the cost is the difference to vPref
return (velocity - agent->getPreferredVelocity()).magnitude();
}
else
{
// In this case, the ORCA program is infeasible, so any velocity lies on the wrong side of at least one ORCA line.
// We should then look for the "least bad" velocity. The cost of a velocity is the largest of all signed line distances.
float maxDistance = -MaxFloat;
for (const auto& orcaLine : orcaSolution.orcaLines)
{
float distanceToOrcaLine = getSignedDistanceToOrcaLine(velocity, orcaLine);
maxDistance = std::max(maxDistance, distanceToOrcaLine);
}
return maxDistance;
}*/
}
Vector2D
ORCA
::
GetGlobalMinimum
(
Agent
*
agent
,
const
WorldBase
*
world
)
const
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment