Skip to content

Commit

Permalink
Corrected imu subscriber to use radians
Browse files Browse the repository at this point in the history
  • Loading branch information
jeguzzi committed Sep 24, 2022
1 parent e4f2e3f commit beed4c2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/command_subjects.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,10 @@ struct ImuSubject : SubjectWithUID<0x00020009a7985b8d> {
acc_x = acc(imu_body.acceleration.x);
acc_y = -acc(imu_body.acceleration.y);
acc_z = -acc(imu_body.acceleration.z);
gyro_x = rad2deg(imu_body.angular_velocity.x);
gyro_y = -rad2deg(imu_body.angular_velocity.y);
gyro_z = -rad2deg(imu_body.angular_velocity.z);
// CHANGED: now in radians
gyro_x = imu_body.angular_velocity.x;
gyro_y = -imu_body.angular_velocity.y;
gyro_z = -imu_body.angular_velocity.z;
}
};

Expand Down

0 comments on commit beed4c2

Please sign in to comment.