Repository: WPI-MMR/gym_solo

Issue:
Potential Issue with Consistent Angular Units
https://github.com/WPI-MMR/gym_solo/blob/e4bcb11fb1b18da997494d56acf95bdd512a076a/gym_solo/core/obs.py#L205-L206. 

it doesn't really make sense that they would report one value in radians and one in degrees??

Discussion:

Patch:
diff --git a/gym_solo/core/obs.py b/gym_solo/core/obs.py
index 8a05a49..2631d4c 100644
--- a/gym_solo/core/obs.py
+++ b/gym_solo/core/obs.py
@@ -202,7 +202,6 @@ class TorsoIMU(Observation):
 
     if self._degrees:
       orien = np.degrees(orien)
-    else:
-      v_ang = np.radians(v_ang)
+      v_ang = np.degrees(v_ang)
 
     return np.concatenate([orien, v_lin, v_ang])


Test patch:
diff --git a/gym_solo/core/test_obs_observations.py b/gym_solo/core/test_obs_observations.py
index d7774f5..6129894 100644
--- a/gym_solo/core/test_obs_observations.py
+++ b/gym_solo/core/test_obs_observations.py
@@ -56,14 +56,15 @@ class TestTorsoIMU(unittest.TestCase):
       np.testing.assert_allclose(o.compute(),
                                  [0, 0, 90,
                                   30, 60, 90,
-                                  30, 60, 90])
+                                  30 * 180 / np.pi, 
+                                    60 * 180 / np.pi, 90* 180 / np.pi])
     
     with self.subTest('radians'):
       o = obs.TorsoIMU(0, degrees=False)
       np.testing.assert_allclose(o.compute(),
                                  [0, 0, 1/2 * np.pi,
                                   30, 60, 90,
-                                  1/6 * np.pi, 1/3 * np.pi, 1/2 * np.pi])
+                                  30, 60, 90])
 
 
 if __name__ == '__main__':