From f7f9acadb948e68c417df2030b68a4c9542a2829 Mon Sep 17 00:00:00 2001 From: Aditya Pande Date: Mon, 4 Apr 2022 14:39:16 -0700 Subject: [PATCH] IMU custom_rpy parent_frame should be set to 'world' (#212) Signed-off-by: Aditya --- src/ImuSensor.cc | 4 ++-- src/ImuSensor_TEST.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ImuSensor.cc b/src/ImuSensor.cc index b7cb5d1e..1b99971d 100644 --- a/src/ImuSensor.cc +++ b/src/ImuSensor.cc @@ -321,14 +321,14 @@ void ImuSensor::SetWorldFrameOrientation( // Set orientation reference frame if custom_rpy was supplied if (this->dataPtr->sensorOrientationRelativeTo == WorldFrameEnumType::CUSTOM) { - if (this->dataPtr->customRpyParentFrame == "") + if (this->dataPtr->customRpyParentFrame == "world") { this->SetOrientationReference(this->dataPtr->worldRelativeOrientation * this->dataPtr->customRpyQuaternion); } else { - ignwarn << "custom_rpy parent frame must be set to empty " + ignwarn << "custom_rpy parent frame must be set to 'world' " "string. Setting it to any other frame is not " "supported yet." << std::endl; } diff --git a/src/ImuSensor_TEST.cc b/src/ImuSensor_TEST.cc index c035a376..2b7576e2 100644 --- a/src/ImuSensor_TEST.cc +++ b/src/ImuSensor_TEST.cc @@ -411,7 +411,7 @@ TEST(ImuSensor_TEST, OrientationReference) << " " << " " << " CUSTOM" - << " 1.570795 0 0" + << " 1.570795 0 0" << " " << " " << " 1" @@ -507,7 +507,7 @@ TEST(ImuSensor_TEST, CustomRpyParentFrame) sensor->Update(std::chrono::steady_clock::duration( std::chrono::nanoseconds(10000000))); - // Since parent_frame is not set to empty in the sdf, + // Since parent_frame is not set to 'world' in the sdf, // custom_rpy will be rejected and reference orientation will // not be set. math::Quaterniond orientValue(math::Vector3d(-1.570795, 0, 0));