Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Navigation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
Skills
Navigation
Commits
e51f23d7
Commit
e51f23d7
authored
2 years ago
by
Timo Weberruß
Browse files
Options
Downloads
Patches
Plain Diff
Use MovementDistance in CombinedDistance
parent
1ca0e184
No related branches found
Branches containing commit
No related tags found
2 merge requests
!109
Social layers
,
!55
Draft: Implement human grouping
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/armarx/navigation/human/CombinedDistance.cpp
+9
-3
9 additions, 3 deletions
source/armarx/navigation/human/CombinedDistance.cpp
source/armarx/navigation/human/CombinedDistance.h
+6
-1
6 additions, 1 deletion
source/armarx/navigation/human/CombinedDistance.h
with
15 additions
and
4 deletions
source/armarx/navigation/human/CombinedDistance.cpp
+
9
−
3
View file @
e51f23d7
...
...
@@ -2,15 +2,21 @@
namespace
armarx
::
navigation
::
human
{
CombinedDistance
::
CombinedDistance
(
double
maxOrientationInfluence
)
CombinedDistance
::
CombinedDistance
(
double
maxOrientationInfluence
,
double
movementInfluence
)
:
maxOrientationInfluence
(
maxOrientationInfluence
),
movementInfluence
(
movementInfluence
)
{
this
->
euclidean
=
EuclideanDistance
();
this
->
orientation
=
OrientationDistance
(
maxOrientationInfluence
,
1
);
this
->
orientation
=
OrientationDistance
();
this
->
movement
=
MovementDistance
();
}
double
CombinedDistance
::
computeDistance
(
Human
&
h1
,
Human
&
h2
)
{
return
orientation
.
computeDistance
(
h1
,
h2
)
*
euclidean
.
computeDistance
(
h1
,
h2
);
return
euclidean
.
computeDistance
(
h1
,
h2
)
// scales the euclidean distance by a factor in [1, maxOrientationInfluence]
*
(
1
+
(
maxOrientationInfluence
-
1
)
*
orientation
.
computeDistance
(
h1
,
h2
))
// scales the euclidean distance by a factor in [1, inf) depending on influence
*
(
1
+
movementInfluence
*
movement
.
computeDistance
(
h1
,
h2
));
}
}
This diff is collapsed.
Click to expand it.
source/armarx/navigation/human/CombinedDistance.h
+
6
−
1
View file @
e51f23d7
...
...
@@ -24,6 +24,7 @@
#include
"DistanceFunction.h"
#include
"EuclideanDistance.h"
#include
"MovementDistance.h"
#include
"OrientationDistance.h"
...
...
@@ -43,13 +44,17 @@ namespace armarx::navigation::human
* @brief CombinedDistance Creates a new combined distance with the specified orientation scale factor
* @param maxOrientationInfluence the euclidean distance between the humans will be scaled
* by up to this factor if they face away from each other
* @param movementInfluence scales the difference in velocity of the humans before applying
* it to the total distance
*/
CombinedDistance
(
double
maxOrientationInfluence
);
CombinedDistance
(
double
maxOrientationInfluence
,
double
movementInfluence
);
virtual
double
computeDistance
(
Human
&
h1
,
Human
&
h2
);
private:
EuclideanDistance
euclidean
;
OrientationDistance
orientation
;
MovementDistance
movement
;
double
maxOrientationInfluence
;
double
movementInfluence
;
};
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment