From fba3171a77c3b13b385e6205387aa630be042b93 Mon Sep 17 00:00:00 2001 From: Sherif Nafee Date: Wed, 23 Jul 2025 15:06:12 +0300 Subject: [PATCH] Fix imu noise application --- Runtime/Tx/ImuTx.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Runtime/Tx/ImuTx.cs b/Runtime/Tx/ImuTx.cs index a54cce0..c3f34f3 100644 --- a/Runtime/Tx/ImuTx.cs +++ b/Runtime/Tx/ImuTx.cs @@ -62,6 +62,10 @@ void FixedUpdate() } protected override ProBridge.ProBridge.Msg GetMsg(TimeSpan ts) { + data.angular_velocity = _angularVelocity.ToRosAngular(); + data.linear_acceleration = _acceleration.ToRos(); + data.orientation = _orientation.ToRos(); + if (applyNoise) { data.angular_velocity.x += GaussianNoise.Generate(angularVelocityNoiseStdDev); @@ -82,10 +86,6 @@ protected override ProBridge.ProBridge.Msg GetMsg(TimeSpan ts) data.orientation = orientationWithNoise.ToRos(); } - - data.angular_velocity = _angularVelocity.ToRosAngular(); - data.linear_acceleration = _acceleration.ToRos(); - data.orientation = _orientation.ToRos(); return base.GetMsg(ts); }