pyaidrone 2.9__tar.gz → 3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyaidrone-2.9 → pyaidrone-3.0}/PKG-INFO +1 -1
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone/aiDrone.py +14 -6
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone.egg-info/PKG-INFO +1 -1
- {pyaidrone-2.9 → pyaidrone-3.0}/setup.py +1 -1
- {pyaidrone-2.9 → pyaidrone-3.0}/README.md +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone/__init__.py +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone/aidrone_mavlink_bridge.py +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone/deflib.py +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone/drone.py +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone/edu.py +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone/ikeyevent.py +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone/packet.py +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone/parse.py +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone/sensor.py +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone/vision_ai.py +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone.egg-info/SOURCES.txt +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone.egg-info/dependency_links.txt +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone.egg-info/requires.txt +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/pyaidrone.egg-info/top_level.txt +0 -0
- {pyaidrone-2.9 → pyaidrone-3.0}/setup.cfg +0 -0
|
@@ -346,25 +346,33 @@ class AIDrone:
|
|
|
346
346
|
self.posX = self.posY = 0
|
|
347
347
|
self.setOption(OPT_FLIGHT_VEL)
|
|
348
348
|
|
|
349
|
-
def rc_control(self, roll=0, pitch=0, yaw=
|
|
350
|
-
"""roll·pitch
|
|
349
|
+
def rc_control(self, roll=0, pitch=0, yaw=None, throttle=None):
|
|
350
|
+
"""roll·pitch 를 한 번에 준다 (실시간 수동 조종용).
|
|
351
351
|
|
|
352
352
|
velocity() 를 앞뒤·좌우로 따로 부르면 서로 필드를 0으로 덮어써서
|
|
353
353
|
한 방향만 먹는다. 대각선 이동이나 방향키 동시 입력에는 이 메서드를 쓴다.
|
|
354
354
|
|
|
355
355
|
roll : 좌우 속도 (오른쪽 +, 왼쪽 -) -VEL_MAX ~ VEL_MAX
|
|
356
356
|
pitch : 전후 속도 (앞 +, 뒤 -)
|
|
357
|
-
yaw : 회전
|
|
357
|
+
yaw : 목표 회전 '절대각도'(도). None 이면 현재 방향을 그대로 유지한다.
|
|
358
|
+
※ 회전은 rotation()/rotationTo() 로 각도를 누적하는 것을 권장.
|
|
359
|
+
(이 드론의 YAW 는 '속도'가 아니라 '이륙 기준 절대각'이라,
|
|
360
|
+
속도 0 을 주면 원래 방향으로 돌아가 버린다.)
|
|
358
361
|
throttle : 고도(cm). None 이면 기존 고도 유지
|
|
359
362
|
|
|
360
|
-
Tello 의 send_rc_control
|
|
363
|
+
Tello 의 send_rc_control 과 달리, yaw 를 비우면 각도가 유지된다.
|
|
361
364
|
"""
|
|
362
365
|
roll = DefLib.constrain(int(roll), VEL_MAX, VEL_MIN)
|
|
363
366
|
pitch = DefLib.constrain(int(pitch), VEL_MAX, VEL_MIN)
|
|
364
|
-
yaw = DefLib.constrain(int(yaw), YAWVEL_MAX, -YAWVEL_MAX)
|
|
365
367
|
self.makepkt.setField(Packet.IDX_ROLL, roll)
|
|
366
368
|
self.makepkt.setField(Packet.IDX_PITCH, pitch)
|
|
367
|
-
|
|
369
|
+
if yaw is not None:
|
|
370
|
+
# 절대 각도로 설정하고 내부 상태(rot)도 갱신 → 이후에도 유지됨
|
|
371
|
+
self.rot = (int(yaw) + 180) % 360 - 180
|
|
372
|
+
self.makepkt.setField(Packet.IDX_YAW, self.rot)
|
|
373
|
+
else:
|
|
374
|
+
# yaw 를 건드리지 않고 현재 각도(self.rot)를 그대로 유지
|
|
375
|
+
self.makepkt.setField(Packet.IDX_YAW, self.rot)
|
|
368
376
|
if throttle is not None:
|
|
369
377
|
self.makepkt.setField(Packet.IDX_THR,
|
|
370
378
|
DefLib.constrain(int(throttle), ALT_MAX, ALT_MIN),
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="pyaidrone",
|
|
5
|
-
version="
|
|
5
|
+
version="3.0",
|
|
6
6
|
description="Library for AIDrone Products",
|
|
7
7
|
long_description=open("README.md").read(), # README.md 내용을 long_description으로 사용
|
|
8
8
|
long_description_content_type="text/markdown", # README 파일이 markdown 형식임을 지정
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|