Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): Fixed quaternion unit tests #18

Merged
merged 1 commit into from
Mar 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions kindr_ros/test/RosGeometryMsgPoseTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
TEST(RosGeometryMsgPoseEigen, convertFromRosGeometryMsg)
{
const kindr::Position3D referenceTranslation(0.3, -1.5, 0.6);
const kindr::RotationQuaternionPD referenceQuaternion(0.949, 0.133, 0.169, 0.231);
const kindr::RotationQuaternionPD referenceQuaternion(0.113, 0.071, -0.924, 0.35835);

geometry_msgs::Pose geometryPoseMsg;
geometryPoseMsg.orientation.x = referenceQuaternion.x();
Expand All @@ -64,7 +64,7 @@ TEST(RosGeometryMsgPoseEigen, convertFromRosGeometryMsg)
TEST(RosGeometryMsgPoseEigen, convertToRosGeometryMsg)
{
const kindr::Position3D referenceTranslation(0.3, -1.1, -0.6);
const kindr::RotationQuaternionPD referenceQuaternion(0.212, 0.0421, -0.958, 0.186);
const kindr::RotationQuaternionPD referenceQuaternion(0.212, 0.0421, -0.958, 0.1885);

kindr::HomogeneousTransformationPosition3RotationQuaternionD pose;
pose.getPosition() = referenceTranslation;
Expand All @@ -85,7 +85,7 @@ TEST(RosGeometryMsgPoseEigen, convertToRosGeometryMsg)
TEST(RosGeometryMsgTransformationEigen, convertFromRosGeometryMsg)
{
const kindr::Position3D referenceTranslation(0.12, 1.5, 0.6);
const kindr::RotationQuaternionPD referenceQuaternion(0.949, 0.133, 0.169, 0.231);
const kindr::RotationQuaternionPD referenceQuaternion(0.949, 0.133, 0.169, 0.230541);

geometry_msgs::Transform geometryTransformMsg;
geometryTransformMsg.rotation.x = referenceQuaternion.x();
Expand All @@ -107,7 +107,7 @@ TEST(RosGeometryMsgTransformationEigen, convertFromRosGeometryMsg)
TEST(RosGeometryMsgTransformationEigen, convertToRosGeometryMsg)
{
const kindr::Position3D referenceTranslation(0.3, -1.1345, -0.6);
const kindr::RotationQuaternionPD referenceQuaternion(0.212, 0.0421, -0.958, 0.186);
const kindr::RotationQuaternionPD referenceQuaternion(0.212, 0.0421, -0.958, 0.1885);

kindr::HomogeneousTransformationPosition3RotationQuaternionD transformation;
transformation.getPosition() = referenceTranslation;
Expand Down
4 changes: 2 additions & 2 deletions kindr_ros/test/RosGeometryMsgRotationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

TEST(RosGeometryMsgRotationQuaternionEigen, convertFromRosGeometryMsg)
{
const kindr::RotationQuaternionPD referenceQuaternion(0.113, 0.071, -0.924, 0.358);
const kindr::RotationQuaternionPD referenceQuaternion(0.113, 0.071, -0.924, 0.35835);

geometry_msgs::Quaternion geometryQuaternionMsg;
geometryQuaternionMsg.x = referenceQuaternion.x();
Expand All @@ -58,7 +58,7 @@ TEST(RosGeometryMsgRotationQuaternionEigen, convertFromRosGeometryMsg)

TEST(RosGeometryMsgRotationQuaternionEigen, convertToRosGeometryMsg)
{
const kindr::RotationQuaternionPD referenceQuaternion(0.212, 0.0421, -0.958, 0.186);
const kindr::RotationQuaternionPD referenceQuaternion(0.212, 0.0421, -0.958, 0.1885);

kindr::RotationQuaternionPD rotationQuaternion(referenceQuaternion);

Expand Down
6 changes: 3 additions & 3 deletions kindr_ros/test/RosTfPoseTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

TEST(RosTfPoseEigen, convertFromRosTf)
{
const kindr::RotationQuaternionD referenceQuaternion(0.949, 0.133, 0.169, 0.231);
const kindr::RotationQuaternionD referenceQuaternion(0.949, 0.133, 0.169, 0.2305);
const kindr::RotationMatrixD referenceRotationMatrix(referenceQuaternion);
const Eigen::Matrix3d referenceRotationMatrixEigen(referenceRotationMatrix.matrix());
const kindr::Position3D referenceTranslation(0.3, -1.5, 0.6);
Expand Down Expand Up @@ -140,7 +140,7 @@ TEST(RosTfPoseEigen, convertFromRosTf)

TEST(RosTfPoseEigen, convertToRosTf)
{
const kindr::RotationQuaternionD referenceQuaternion(0.113, 0.071, -0.924, 0.358);
const kindr::RotationQuaternionD referenceQuaternion(0.113, 0.071, -0.924, 0.3585);
const kindr::RotationMatrixD referenceRotationMatrix(referenceQuaternion);
const kindr::Position3D referenceTranslation(-22.4, 0.31, -4.6);

Expand Down Expand Up @@ -217,7 +217,7 @@ TEST(RosTfPoseEigen, convertToRosTf)

TEST(RosTfPoseEigen, convertTwoWays)
{
const kindr::RotationQuaternionD referenceQuaternion(0.212, 0.0421, -0.958, 0.186);
const kindr::RotationQuaternionD referenceQuaternion(0.212, 0.0421, -0.958, 0.1885);
const kindr::RotationMatrixD referenceRotationMatrix(referenceQuaternion);
const Eigen::Matrix3d referenceRotationMatrixEigen(referenceRotationMatrix.matrix());
const kindr::Position3D referenceTranslation(13.3, 2.6, -7.6);
Expand Down