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