Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'error Not joystick' #201

Open
Zolubas opened this issue Sep 3, 2023 · 1 comment
Open

'error Not joystick' #201

Zolubas opened this issue Sep 3, 2023 · 1 comment

Comments

@Zolubas
Copy link

Zolubas commented Sep 3, 2023

Hi every one.
I'm trying to send command like:

But after some commands like this:

from djitellopy import Tello
import time
tello = Tello()
tello.connect()
tello.takeoff()
tello.move_forward(100)
time.sleep(0.5)
tello.rotate_clockwise(90)
time.sleep(0.5)
tello.move_forward(100)
time.sleep(0.5)
tello.rotate_clockwise(90)
time.sleep(0.5)
tello.move_forward(100)
...
tello.land()

I received the 'error Not joystick' error.

Thanks to the library, and any assistance will be appreciated.

My terminal:

$ python s_path.py 
[INFO] tello.py - 122 - Tello instance was initialized. Host: '192.168.10.1'. Port: '8889'.
[INFO] tello.py - 437 - Send command: 'command'
[INFO] tello.py - 461 - Response command: 'ok'
[INFO] tello.py - 437 - Send command: 'takeoff'
[INFO] tello.py - 461 - Response takeoff: 'ok'
[INFO] tello.py - 437 - Send command: 'forward 100'
[INFO] tello.py - 461 - Response forward 100: 'ok'
[INFO] tello.py - 437 - Send command: 'cw 90'
[INFO] tello.py - 461 - Response cw 90: 'ok'
[INFO] tello.py - 437 - Send command: 'forward 100'
[INFO] tello.py - 461 - Response forward 100: 'ok'
[INFO] tello.py - 437 - Send command: 'cw 90'
[INFO] tello.py - 461 - Response cw 90: 'ok'
[INFO] tello.py - 437 - Send command: 'forward 100'
[INFO] tello.py - 461 - Response forward 100: 'error Not joystick'
[INFO] tello.py - 437 - Send command: 'forward 100'
[INFO] tello.py - 461 - Response forward 100: 'error Not joystick'
[INFO] tello.py - 437 - Send command: 'forward 100'
[INFO] tello.py - 461 - Response forward 100: 'error Not joystick'
Traceback (most recent call last):
  File "s_path.py", line 45, in <module>
    path(tello)
  File "s_path.py", line 32, in path
    path_s(tello,x,rs,yaw)
  File "s_path.py", line 13, in path_s
    tello.move_forward(x)
  File "/home/user/.local/lib/python3.8/site-packages/djitellopy/enforce_types.py", line 54, in wrapper
    return func(*args, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/djitellopy/tello.py", line 649, in move_forward
    self.move("forward", x)
  File "/home/user/.local/lib/python3.8/site-packages/djitellopy/enforce_types.py", line 54, in wrapper
    return func(*args, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/djitellopy/tello.py", line 614, in move
    self.send_control_command("{} {}".format(direction, x))
  File "/home/user/.local/lib/python3.8/site-packages/djitellopy/enforce_types.py", line 54, in wrapper
    return func(*args, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/djitellopy/tello.py", line 486, in send_control_command
    self.raise_result_error(command, response)
  File "/home/user/.local/lib/python3.8/site-packages/djitellopy/enforce_types.py", line 54, in wrapper
    return func(*args, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/djitellopy/tello.py", line 528, in raise_result_error
    raise Exception("Command '{}' was unsuccessful for {} tries. Latest response:\t'{}'"
Exception: Command 'forward 100' was unsuccessful for 4 tries. Latest response:	'error Not joystick'
[INFO] tello.py - 437 - Send command: 'land'
^C
@M4GNV5
Copy link
Collaborator

M4GNV5 commented Sep 4, 2023

Hey Fernando, long time no see 😎

Please try calibrating the drone using the official app. After connecting to your drone using your phone you can start the calibration procedure from the Tello App settings menu.
The app will then guide you through calibration (taking of the rotors and placing the drone in different positions).

Cheers Jakob

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants