anqixu / tello_driver

ROS driver for DJI/Ryze Tello drones
Apache License 2.0
98 stars 98 forks source link

Runtime error #19

Closed erinline closed 2 years ago

erinline commented 2 years ago

When I try to launch the tello node, I get an error and the driver crashes:

erinline@erinline-MacBookPro:~/test_tello$ roslaunch tello_driver tello_node.launch 
... logging to /home/erinline/.ros/log/4fa3c65a-cd9e-11ec-a117-f45c89a267e3/roslaunch-erinline-MacBookPro-7819.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://erinline-MacBookPro:45439/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.13
 * /tello/tello/connect_timeout_sec: 10.0
 * /tello/tello/local_cmd_client_port: 8890
 * /tello/tello/local_vid_server_port: 6038
 * /tello/tello/stream_h264_video: False
 * /tello/tello/tello_cmd_server_port: 8889
 * /tello/tello/tello_ip: 192.168.10.1

NODES
  /tello/
    image_compressed (image_transport/republish)
    tello (tello_driver/tello_driver_node.py)

auto-starting new master
process[master]: started with pid [7830]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 4fa3c65a-cd9e-11ec-a117-f45c89a267e3
process[rosout-1]: started with pid [7843]
started core service [/rosout]
process[tello/tello-2]: started with pid [7849]
process[tello/image_compressed-3]: started with pid [7851]
Tello: 20:40:38.243:  Info: tellopy - Arkady's Version
Tello: 20:40:38.244:  Info: tellopy - Arkady's Version
Traceback (most recent call last):
  File "/home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py", line 306, in <module>
    main()
  File "/home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py", line 300, in main
    robot = TelloNode()
  File "/home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py", line 81, in __init__
    log=log)
TypeError: __init__() got an unexpected keyword argument 'local_cmd_client_port'
[tello/tello-2] process has died [pid 7849, exit code 1, cmd /home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py __name:=tello __log:=/home/erinline/.ros/log/4fa3c65a-cd9e-11ec-a117-f45c89a267e3/tello-tello-2.log].
log file: /home/erinline/.ros/log/4fa3c65a-cd9e-11ec-a117-f45c89a267e3/tello-tello-2*.log

I followed all the install instructions. As a result of this error, no video stream is even coming through. Please advise :)

anqixu commented 2 years ago

Hmm a couple of thoughts:

Good luck!

erinline commented 2 years ago

Yep, it's a dualbooted Macbook Pro, running this in Ubuntu :) I double checked and I do have your fork checked out, I believe. My directory structure is a ROS workspace, and inside src, it includes tello_driver, TelloPy, and h264 library. The TelloPy origin is your repo, but nonetheless, I get this error (and it's different this time, I don't know why).

erinline@erinline-MacBookPro:~/test_tello$ roslaunch tello_driver tello_node.launch 
... logging to /home/erinline/.ros/log/edee1ef4-d0c4-11ec-9cc3-f45c89a267e3/roslaunch-erinline-MacBookPro-4135.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://erinline-MacBookPro:45151/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.13
 * /tello/tello/connect_timeout_sec: 10.0
 * /tello/tello/local_cmd_client_port: 8890
 * /tello/tello/local_vid_server_port: 6038
 * /tello/tello/stream_h264_video: False
 * /tello/tello/tello_cmd_server_port: 8889
 * /tello/tello/tello_ip: 192.168.10.1

NODES
  /tello/
    image_compressed (image_transport/republish)
    tello (tello_driver/tello_driver_node.py)

auto-starting new master
process[master]: started with pid [4148]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to edee1ef4-d0c4-11ec-9cc3-f45c89a267e3
process[rosout-1]: started with pid [4162]
started core service [/rosout]
process[tello/tello-2]: started with pid [4169]
process[tello/image_compressed-3]: started with pid [4170]
Traceback (most recent call last):
  File "/home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py", line 306, in <module>
    main()
  File "/home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py", line 300, in main
    robot = TelloNode()
  File "/home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py", line 74, in __init__
    log = RospyLogger('Tello')
  File "/home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py", line 27, in __init__
    super(RospyLogger, self).__init__(header)
TypeError: super() argument 1 must be type, not classobj
[tello/tello-2] process has died [pid 4169, exit code 1, cmd /home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py __name:=tello __log:=/home/erinline/.ros/log/edee1ef4-d0c4-11ec-9cc3-f45c89a267e3/tello-tello-2.log].
log file: /home/erinline/.ros/log/edee1ef4-d0c4-11ec-9cc3-f45c89a267e3/tello-tello-2*.log
^C[tello/image_compressed-3] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
anqixu commented 2 years ago

Hmm I can't fully help you here, but the symptom suggests that you are using some Python2.x version, and either:

Here are some possible fixes, both involving editing tello_driver_node.py:

  1. change line 25 to class RospyLogger(logger.Logger, object):
  2. -or- change line 27 to super().__init__(header)
erinline commented 2 years ago

Using your suggestion 1 worked for that bug, thanks! However, now I get the first error again (only without mention of Arkady's TelloPy, I think that was just because I had tried so many versions on one laptop):

setting /run_id to 36505290-dd52-11ec-81c7-f45c89a267e3
process[rosout-1]: started with pid [5649]
started core service [/rosout]
process[tello/tello-2]: started with pid [5656]
process[tello/image_compressed-3]: started with pid [5657]
Traceback (most recent call last):
  File "/home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py", line 306, in <module>
    main()
  File "/home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py", line 300, in main
    robot = TelloNode()
  File "/home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py", line 81, in __init__
    log=log)
TypeError: __init__() got an unexpected keyword argument 'local_cmd_client_port'
[tello/tello-2] process has died [pid 5656, exit code 1, cmd /home/erinline/test_tello/src/tello_driver/src/tello_driver_node.py __name:=tello __log:=/home/erinline/.ros/log/36505290-dd52-11ec-81c7-f45c89a267e3/tello-tello-2.log].
log file: /home/erinline/.ros/log/36505290-dd52-11ec-81c7-f45c89a267e3/tello-tello-2*.log
^C[tello/image_compressed-3] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

I'll keep digging into it and post here if I figure it out!