Skip to content
Snippets Groups Projects
Commit e6c6e2f8 authored by Timo Weberruß's avatar Timo Weberruß
Browse files

Implement combined distance

parent 1af26b60
No related branches found
No related tags found
2 merge requests!109Social layers,!55Draft: Implement human grouping
......@@ -2,14 +2,15 @@
namespace armarx::navigation::components::dynamic_scene_provider
{
CombinedDistance::CombinedDistance()
CombinedDistance::CombinedDistance(double maxOrientationInfluence)
{
this->euclidean = EuclideanDistance();
this->orientation = OrientationDistance(maxOrientationInfluence, 1);
}
double CombinedDistance::computeDistance(Human &h1, Human &h2)
{
return orientation.computeDistance(h1, h2) * euclidean.computeDistance(h1, h2);
}
}
#pragma once
#include "DistanceFunction.h"
#include "EuclideanDistance.h"
#include "OrientationDistance.h"
namespace armarx::navigation::components::dynamic_scene_provider
......@@ -8,7 +10,12 @@ namespace armarx::navigation::components::dynamic_scene_provider
class CombinedDistance : DistanceFunction
{
public:
CombinedDistance();
CombinedDistance(double maxOrientationInfluence);
virtual double computeDistance(Human &h1, Human &h2);
private:
EuclideanDistance euclidean;
OrientationDistance orientation;
double maxOrientationInfluence;
};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment