Skip to content
Snippets Groups Projects

Fix degree/radian bug

1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
+ 2
2
@@ -168,12 +168,12 @@ class CrazyLogger:
@@ -168,12 +168,12 @@ class CrazyLogger:
def x(self):
def x(self):
""" Return x-position of robot center"""
""" Return x-position of robot center"""
# Note that the offset of the crazyflie mount position is included
# Note that the offset of the crazyflie mount position is included
return self._state[0] - np.sin(self._state[3])*self._position_offset
return self._state[0] - np.sin(np.deg2rad(self._state[3]))*self._position_offset
def y(self):
def y(self):
""" Return y-position of robot center"""
""" Return y-position of robot center"""
# Note that the offset of the crazyflie mount position is included
# Note that the offset of the crazyflie mount position is included
return self._state[1] + np.cos(self._state[3])*self._position_offset
return self._state[1] + np.cos(np.deg2rad(self._state[3]))*self._position_offset
def z(self):
def z(self):
""" Return z-position of robot center"""
""" Return z-position of robot center"""
Loading