19 #include "asr_recognizer_prediction_ism/pose_prediction/PaperPredictionNormalized.h" 22 #include <gtest/gtest.h> 48 std::string dbfilename =
"/home/patrick/catkin_ws/src/ilcasRosFull/perception/scene_understanding/recognizer_prediction_ism/test/rsc/smacks_throne.sqlite";
49 double confidence = 1;
50 double numberOfSpecifiers = 20;
86 PointPtr plateDeepPointPtr(
new Point(-0.888345658850255, 0.632926776060424,
88 QuaternionPtr plateDeepQuatPtr(
new Quaternion(0.651570493634819, -0.643417330721776,
89 -0.27727505130885, 0.2908411529908));
90 PosePtr plateDeepPosePtr(
new Pose(plateDeepPointPtr, plateDeepQuatPtr));
94 PointPtr cupPdVPointPtr(
new Point(-0.89555632189646,
97 QuaternionPtr cupPdVQuatPtr(
new Quaternion(0.0437368287079934,
103 for (asr_next_best_view::AttributedPoint attributedPoint : attributedPointCloud.elements)
105 double x = attributedPoint.pose.position.x;
106 double y = attributedPoint.pose.position.y;
107 double z = attributedPoint.pose.position.z;
108 double qw = attributedPoint.pose.orientation.w;
109 double qx = attributedPoint.pose.orientation.x;
110 double qy = attributedPoint.pose.orientation.y;
111 double qz = attributedPoint.pose.orientation.z;
113 PointPtr currentPointPtr(
new Point(x,y,z));
114 QuaternionPtr currentQuaternionPtr(
new Quaternion(qw, qx, qy, qz));
115 double distance = GeometryHelper::getDistanceBetweenPoints(currentPointPtr,cupPdVPointPtr);
116 double angle = GeometryHelper::getAngleBetweenQuats(currentQuaternionPtr, cupPdVQuatPtr);
118 if (distance < 0.003 && angle < 5)
128 int main(
int argc,
char **argv)
130 testing::InitGoogleTest(&argc, argv);
131 return RUN_ALL_TESTS();
TEST_F(PaperPredictionNormalizedTest, databaseTest)
PaperPredictionNormalizedPtr paperPredictionNormalizedPtr
ISM::ObjectSetPtr recognizedSet
static void SetUpTestCase()
ISM::RecognitionResultPtr resultPtr
ISM::PosePtr referencePose
static void TearDownTestCase()
int main(int argc, char **argv)
std::vector< ISM::VotedPointsTypePtr > votedPoints
std::vector< ISM::RecognitionResultPtr > recognitionResults
std::vector< ISM::PointPtr > idealPoints