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

Fix unit test dependency

parent 008820ca
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.
......@@ -23,6 +23,7 @@ armarx_add_library(teb_human
CombinedDistance.cpp
ConvexHullGenerator.cpp
MovementDistance.cpp
HEADERS
types.h
aron_conversions.h
......@@ -47,6 +48,7 @@ armarx_add_test(human_test
PUBLIC
ArmarXCore
armarx_navigation::core
armarx_navigation::human
PRIVATE
range-v3::range-v3
......
......@@ -38,6 +38,7 @@
#include <armarx/navigation/Test.h>
#include <armarx/navigation/core/basic_types.h>
#include <armarx/navigation/human/Test.h>
#include <armarx/navigation/human/types.h>
using armarx::navigation::core::Pose2D;
......@@ -46,21 +47,24 @@ using armarx::navigation::human::Human;
BOOST_AUTO_TEST_CASE(testEuclideanDistance)
{
// EuclideanDistance distance = EuclideanDistance();
// Pose2D pose1 = Pose2D::Identity();
// pose1.translation() = Eigen::Vector2f(3, 4);
// pose1.linear() = Eigen::Rotation2Df(1.1).toRotationMatrix();
// Human h1 = {.pose = pose1,
// .linearVelocity = Eigen::Vector2f(0.2, 0.1),
// .detectionTime = armarx::DateTime::Now()};
// Pose2D pose2 = Pose2D::Identity();
// pose2.translation() = Eigen::Vector2f(6, 8);
// pose2.linear() = Eigen::Rotation2Df(2.3).toRotationMatrix();
// Human h2 = {.pose = pose2,
// .linearVelocity = Eigen::Vector2f(0.5, 0.8),
// .detectionTime = armarx::DateTime::Now()};
const EuclideanDistance distance = EuclideanDistance();
Pose2D pose1 = Pose2D::Identity();
pose1.translation() = Eigen::Vector2f(3, 4);
pose1.linear() = Eigen::Rotation2Df(1.1).toRotationMatrix();
const Human h1 = {.pose = pose1,
.linearVelocity = Eigen::Vector2f(0.2, 0.1),
.detectionTime = armarx::DateTime::Now()};
Pose2D pose2 = Pose2D::Identity();
pose2.translation() = Eigen::Vector2f(6, 8);
pose2.linear() = Eigen::Rotation2Df(2.3).toRotationMatrix();
const Human h2 = {.pose = pose2,
.linearVelocity = Eigen::Vector2f(0.5, 0.8),
.detectionTime = armarx::DateTime::Now()};
double d = distance.computeDistance(h1, h2);
ARMARX_INFO << "Distance is" + std::to_string(d);
BOOST_CHECK_CLOSE(d, 4, 0.001);
}
//BOOST_AUTO_TEST_CASE(testPathLength)
......
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