from djitellopy import tello
import cv2
# Create instances for each Tello drone
drone1 = tello.Tello(ip= 192.168.10.2 ) # Replace with your first Wi-Fi adapter s IP
#drone2 = tello.Tello(ip= 192.168.10.3 ) # Replace with your second Wi-Fi adapter s IP
# ... Add more instances for additional drones
# Connect to drones
drone1.connect()
#drone2.connect()
# ... Connect other drones
# Send commands to drones
# drone1.takeoff()
# drone2.takeoff()
# ... Send other commands
# Clean up
drone1.streamon()
# while True:
# img = drone1.get_frame_read().frame
# img = cv2.resize(img, (360, 240))
# cv2.imshow("results", img)
# if cv2.waitKey(1) & 0xFF == ord( q ):
# break
每当我试图称之为“上游”功能时,我就发现这一错误,试图询问“查谟和克什米尔”,但不会给我一个答案。
Traceback (most recent call last):
File "C:UsersorigiPycharmProjectsDroneProjectvenvInterface.py", line 4, in <module>
drone1 = tello.Tello(ip= 192.168.10.2 ) # Replace with your first Wi-Fi adapter s IP
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:UsersorigiPycharmProjectsDroneProjectvenvLibsite-packagesdjitellopyenforce_types.py", line 54, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
TypeError: Tello.__init__() got an unexpected keyword argument ip
Exception ignored in: <function Tello.__del__ at 0x000001FAE5924720>
Traceback (most recent call last):
File "C:UsersorigiPycharmProjectsDroneProjectvenvLibsite-packagesdjitellopyenforce_types.py", line 54, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:UsersorigiPycharmProjectsDroneProjectvenvLibsite-packagesdjitellopy ello.py", line 1028, in __del__
self.end()
File "C:UsersorigiPycharmProjectsDroneProjectvenvLibsite-packagesdjitellopyenforce_types.py", line 54, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:UsersorigiPycharmProjectsDroneProjectvenvLibsite-packagesdjitellopy ello.py", line 1023, in end
host = self.address[0]
^^^^^^^^^^^^
AttributeError: Tello object has no attribute address
Process finished with exit code 1
我正在利用多个网络改编器连接多台风ze,但甚至能够打上溪流,为首批1台工作。
第一个计票仪的IP地址,即指定我网络的适应者,因为计票人拥有相同的IP
3. 任何答复都值得赞赏: