Used for sending its position to the Crazyflie
| 33 | |
| 34 | |
| 35 | class Extpos(): |
| 36 | """ |
| 37 | Used for sending its position to the Crazyflie |
| 38 | """ |
| 39 | |
| 40 | def __init__(self, crazyflie=None): |
| 41 | """ |
| 42 | Initialize the Extpos object. |
| 43 | """ |
| 44 | self._cf = crazyflie |
| 45 | |
| 46 | def send_extpos(self, x, y, z): |
| 47 | """ |
| 48 | Send the current Crazyflie X, Y, Z position. This is going to be |
| 49 | forwarded to the Crazyflie's position estimator. |
| 50 | """ |
| 51 | |
| 52 | self._cf.loc.send_extpos([x, y, z]) |
| 53 | |
| 54 | def send_extpose(self, x, y, z, qx, qy, qz, qw): |
| 55 | """ |
| 56 | Send the current Crazyflie X, Y, Z position and attitude as a |
| 57 | normalized quaternion. This is going to be forwarded to the |
| 58 | Crazyflie's position estimator. |
| 59 | """ |
| 60 | self._cf.loc.send_extpose([x, y, z], [qx, qy, qz, qw]) |