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

Implement MovementDistance

parent fea33c07
No related branches found
No related tags found
2 merge requests!109Social layers,!55Draft: Implement human grouping
This commit is part of merge request !55. Comments created here will be created in the context of that merge request.
......@@ -33,7 +33,7 @@ namespace armarx::navigation::human
class EuclideanDistance : public DistanceFunction
{
public:
EuclideanDistance(double min = 0);
EuclideanDistance();
virtual double computeDistance(Human &h1, Human &h2);
};
}
......@@ -7,9 +7,9 @@ namespace armarx::navigation::human
}
double armarx::navigation::human::MovementDistance::computeDistance(Human &h1, Human &h2)
double MovementDistance::computeDistance(Human &h1, Human &h2)
{
return (h1.linearVelocity - h2.linearVelocity).norm();
}
}
......@@ -27,6 +27,10 @@
namespace armarx::navigation::human
{
/**
* @brief A DistanceFunction that defines the distance between two humans as the difference
* in velocity (that is, the norm of the linear velocity difference vector).
*/
class MovementDistance : public DistanceFunction
{
public:
......
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