From f6b42ec8c4fe58f8477acae32d2f4c1ae4bfe66b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Weberru=C3=9F?= <timo.weberruss@student.kit.edu>
Date: Mon, 7 Nov 2022 17:17:33 +0100
Subject: [PATCH] Fix dimension mismatches

---
 .../navigation/human/test/human_tracker_test.cpp    | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/source/armarx/navigation/human/test/human_tracker_test.cpp b/source/armarx/navigation/human/test/human_tracker_test.cpp
index f7497fba..3d2e8037 100644
--- a/source/armarx/navigation/human/test/human_tracker_test.cpp
+++ b/source/armarx/navigation/human/test/human_tracker_test.cpp
@@ -109,8 +109,8 @@ namespace armarx::navigation::human
                                                Point(0.015, 0.009),
                                                Point(0.002, 0.001)};
 
-        const Eigen::Vector2f leftFootPos = pos + Eigen::Vector3f(0, 0.1);
-        const Eigen::Vector2f rightFootPos = pos + Eigen::Vector3f(0, -0.1);
+        const Eigen::Vector2f leftFootPos = pos + Eigen::Vector2f(0, 0.1);
+        const Eigen::Vector2f rightFootPos = pos + Eigen::Vector2f(0, -0.1);
 
         std::vector<Point> leftFootPoints = std::vector<Point>();
         std::vector<Point> rightFootPoints = std::vector<Point>();
@@ -124,11 +124,12 @@ namespace armarx::navigation::human
 
         using Pose = Eigen::Isometry3f;
         Pose leftFootPose = Pose::Identity();
-        leftFootPose.translation() = leftFootPos;
+        leftFootPose.translation() = Eigen::Vector3f(leftFootPos.x(), leftFootPos.y(), 0);
         //        leftFootPose.linear() = Eigen::Rotation2Df(orientation).toRotationMatrix();
 
         Pose rightFootPose = Pose::Identity();
-        rightFootPose.translation() = rightFootPos;
+        rightFootPose.translation() = Eigen::Vector3f(rightFootPos.x(), rightFootPos.y(), 0);
+        ;
         //        rightFootPose.linear() = Eigen::Rotation2Df(orientation).toRotationMatrix();
 
         const Ellipsoid leftFootEllipse = {.pose = leftFootPose, .radii = Point(0.05, 0.04)};
@@ -155,7 +156,7 @@ namespace armarx::navigation::human
 
         // PARAMETERS
 
-        const Eigen::Vector2f initialPosition(0, 0, 2);
+        const Eigen::Vector3f initialPosition(0, 0, 2);
         const float orientation = M_PI_2;
         const Eigen::Quaternionf orientationQuat = quatFromEuler(0, 0, orientation);
 
@@ -165,7 +166,7 @@ namespace armarx::navigation::human
 
         // CONVERSIONS
         const float timespanMs = timestepMs * cameraSteps;
-        const Eigen::Vector2f endPosition =
+        const Eigen::Vector3f endPosition =
             initialPosition + movementSpeedMetPerSec * timespanMs / 1000;
         const Eigen::Vector3f posDelta = (endPosition - initialPosition) / cameraSteps;
 
-- 
GitLab