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); }