Skip to content

Commit

Permalink
trying to fix transform issue
Browse files Browse the repository at this point in the history
  • Loading branch information
eprager0 committed May 14, 2024
1 parent 5d76ad8 commit 07fcc14
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions AirLib/include/sensors/imu/ImuSimple.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,11 @@ namespace airlib
output.orientation = ground_truth.kinematics->pose.orientation;

//acceleration is in world frame so transform to body frame
// output.linear_acceleration = VectorMath::rotateVectorReverse(output.linear_acceleration, ground_truth.kinematics->pose.orientation, true);
//VectorMath::transformToBodyFrame(output.linear_acceleration, ground_truth.kinematics->pose.orientation, true);
std::cout << "X accel: untransformed = " << output.linear_acceleration.x();
output.linear_acceleration = VectorMath::transformToBodyFrame(output.linear_acceleration,
ground_truth.kinematics->pose.orientation,
true);
std::cout << ", transformed = " << output.linear_acceleration.x() << "\n";

//add noise
addNoise(output.linear_acceleration, output.angular_velocity);
Expand Down

0 comments on commit 07fcc14

Please sign in to comment.