Git Product home page Git Product logo

tello_driver's Introduction

tello_driver Build Status

1. Overview

Communicating with the Tello drone can be done either using official Tello SDK or one of the unofficial libraries. The unofficial libraries originated from the reverse-engineering the raw packages broadcasted by the Tello. This ROS package is build on top of the unofficial TelloPy library. The TelloPy library is used at this moment since it offers more functionalities than the official Tello SDK or any other unofficial library.

Developing of the tello_driver ROS package is inspired by tello_driver, which by now diverged considerately from the original work. Furthermore, development of this ROS package pursues not to modify the TelloPy library, but instead apply any modification or addition to the ros_driver package in an encapsulated manner. This prevents breaking functionalities when updating the TelloPy library.

Installation

ROS distribution

Binary release from the ROS repository:

  • Kinetic: $ sudo apt install ros-kinetic-tello-driver

Build from source

  • $ cd <CATKIN_WS/SRC>
  • $ git clone --recursive https://github.com/appie-17/tello_driver.git
  • $ cd ..
  • $ catkin_make
  • $ source devel/setup.bash

Launch

  • Turn on Tello drone
  • Connect to drone's WiFi access point (TELLO_XXXXXX)
  • $ roslaunch tello_driver tello_node.launch
  • $ roslaunch tello_driver joy_teleop.launch

2. Nodes

2.1 tello_driver_node

Main node running as interface for the TelloPy library

Subscribed topics

Published topics

Services

TODO

Parameters

  • ~/tello_driver_node/connect_timeout_sec
  • ~/tello_driver_node/fixed_video_rate
  • ~/tello_driver_node/local_cmd_client_port
  • ~/tello_driver_node/local_vid_server_port
  • ~/tello_driver_node/stream_h264_video
  • ~/tello_driver_node/tello_cmd_server_port
  • ~/tello_driver_node/tello_ip
  • ~/tello_driver_node/vel_cmd_scale
  • ~/tello_driver_node/video_req_sps_hz
  • ~/tello_driver_node/altitude_limit
  • ~/tello_driver_node/attitude_limit
  • ~/tello_driver_node/low_bat_threshold

2.2 gamepad_teleop_node

Converting gamepad input controls from joy_node to commands for tello_driver_node

Subscribed topics

Published topic

Services

None

Parameters

2.3 joy_node

Receive input from gamepad controller and publish into sensor_msgs/Joy message

Subscribed topics

None

Published topics

Services

None

Parameters

  • ~/joy_node/deadzone
  • ~/joy_node/dev

3. Troubleshooting

  • No more video output after reconnect
    Relaunch the tello_driver_node to continue the video stream after WiFi reconnection. Only an issue when using PyAV to decode h264 video instead of ROS codec_image_transport.

4. Notes

  • Stream raw video
    Depends on PyAV package: $ pip install av --user

    Installation of PyAV on Ubuntu 16.04 requires ffmpeg of at least version 3:

    $ sudo add-apt-repository ppa:jonathonf/ffmpeg-3
    $ sudo apt update && sudo apt install ffmpeg

5. Work-in-progress

6. License

tello_driver's People

Contributors

anqixu avatar jordy-van-appeven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tello_driver's Issues

No module named _internal.tello

Thanks for making this package. Looks awesome!

I ran into this error starting the tello_node:

Traceback (most recent call last):
File "/opt/ros/kinetic/lib/tello_driver/tello_driver_node", line 17, in
from tellopy._internal import tello
File "/opt/ros/kinetic/lib/python2.7/dist-packages/tellopy/init.py", line 8, in
from tellopy._internal.tello import Tello
ImportError: No module named _internal.tello

Compatibility with ROS kinetic

Can you confirm that this driver does not work for ROS kinetic, as you need to be running Python 2.7 for Kinetic and that horrendous PyAV (which the driver node and TelloPy import) will not install under Python 2?

By the way, why does TelloPy need PyAV just to get a video stream - surely there are better, simpler ways to do this. See gemSquared's alternative here: hanyazou/TelloPy#40

Compatibility with SDK 2.x

Dear all,
Have you tried the package with SDK 2.x which supports the Tello SDK? Does it work?

Thank you

Ubuntu 20.04 and ROS Noetic -> ImportError: No module named yaml

Hi, I'm working on Ubuntu 20.04 and ROS Noetic. I want to install tello_driver but I get the following error message:

SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.16.0
 * /tello/tello_driver_node/camera_calibration: /home/user/roswor...
 * /tello/tello_driver_node/connect_timeout_sec: 10.0
 * /tello/tello_driver_node/local_cmd_client_port: 8890
 * /tello/tello_driver_node/local_vid_server_port: 6038
 * /tello/tello_driver_node/stream_h264_video: True
 * /tello/tello_driver_node/tello_cmd_server_port: 8889
 * /tello/tello_driver_node/tello_ip: 192.168.10.1

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

ROS_MASTER_URI=http://localhost:11311

process[tello/tello_driver_node-1]: started with pid [68052]
WARNING: Package name "turtle_controllers_A2B" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, underscores, and dashes.
process[tello/image_compressed-2]: started with pid [68053]
Traceback (most recent call last):
  File "/home/user/rosworskpaces/urubu/src/tello_driver/nodes/tello_driver_node", line 2, in <module>
    import rospy
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/__init__.py", line 47, in <module>
    from std_msgs.msg import Header
  File "/opt/ros/noetic/lib/python3/dist-packages/std_msgs/msg/__init__.py", line 1, in <module>
    from ._Bool import *
  File "/opt/ros/noetic/lib/python3/dist-packages/std_msgs/msg/_Bool.py", line 6, in <module>
    import genpy
  File "/opt/ros/noetic/lib/python3/dist-packages/genpy/__init__.py", line 34, in <module>
    from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
  File "/opt/ros/noetic/lib/python3/dist-packages/genpy/message.py", line 50, in <module>
    import yaml
ImportError: No module named yaml
[tello/tello_driver_node-1] process has died [pid 68052, exit code 1, cmd /home/user/rosworskpaces/urubu/src/tello_driver/nodes/tello_driver_node __name:=tello_driver_node __log:=/home/user/.ros/log/68f837dc-3646-11ee-bd15-894ccdf7d5d8/tello-tello_driver_node-1.log].
log file: /home/user/.ros/log/68f837dc-3646-11ee-bd15-894ccdf7d5d8/tello-tello_driver_node-1*.log

I tried install the yaml using pip3 install pyyaml, pip install pyaml but the issue persists.

user@drone:~$ pip3 install pyyaml
Requirement already satisfied: pyyaml in /usr/lib/python3/dist-packages (5.3.1)

Does anyone know what the problem could be? Any help would be amazing. Thanks!

CMake Error Message with codec image transport

When I run catkin_make for tello_ driver I get the following error message regarding codec_image_transport:

-- Could NOT find codec_image_transport (missing: codec_image_transport_DIR)
-- Could not find the required component 'codec_image_transport'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "codec_image_transport" with any of the following names:

    codec_image_transportConfig.cmake
    codec_image_transport-config.cmake

  Add the installation prefix of "codec_image_transport" to CMAKE_PREFIX_PATH
  or set "codec_image_transport_DIR" to a directory containing one of the
  above files.  If "codec_image_transport" provides a separate development
  package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  tello_driver/CMakeLists.txt:7 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/user/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/user/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:3526: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

Constant Linear Speed

Hi,

In my application, I need the drone with a constant velocity on x-axis. But if I send twist.linear.x = CONSTANT it goes well in some directions but on others it goes slower/faster. How do I set the speed so it flies with a linear speed ?

Odometry data is not working

I am running the tello_driver_node, everything works fine, but the odometry data is not being updated or is wrong.
Is there any kind of calibration/parameters to be set for this to work properly?

Ubuntu 20.04 and ROS Noetic -> ImportError: No module named rospkg

Hi, I'm working on Ubuntu 20.04 and ROS Noetic. I want to install tello_driver but I get the following error message:

SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.15.11
 * /tello/tello_driver_node/camera_calibration: /home/user...
 * /tello/tello_driver_node/connect_timeout_sec: 10.0
 * /tello/tello_driver_node/local_cmd_client_port: 8890
 * /tello/tello_driver_node/local_vid_server_port: 6038
 * /tello/tello_driver_node/stream_h264_video: True
 * /tello/tello_driver_node/tello_cmd_server_port: 8889
 * /tello/tello_driver_node/tello_ip: 192.168.10.1

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

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

setting /run_id to b96e7966-fc1d-11eb-befe-89052bf0da48
process[rosout-1]: started with pid [35325]
started core service [/rosout]
process[tello/tello_driver_node-2]: started with pid [35332]
process[tello/image_compressed-3]: started with pid [35333]
Traceback (most recent call last):
  File "/home/user/catkin_ws/src/tello_driver/nodes/tello_driver_node", line 2, in <module>
    import rospy
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/__init__.py", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/client.py", line 52, in <module>
    import roslib
  File "/opt/ros/noetic/lib/python3/dist-packages/roslib/__init__.py", line 50, in <module>
    from roslib.launcher import load_manifest  # noqa: F401
  File "/opt/ros/noetic/lib/python3/dist-packages/roslib/launcher.py", line 42, in <module>
    import rospkg
ImportError: No module named rospkg
[tello/tello_driver_node-2] process has died [pid 35332, exit code 1, cmd /home/user/catkin_ws/src/tello_driver/nodes/tello_driver_node __name:=tello_driver_node __log:=/home/user/.ros/log/b96e7966-fc1d-11eb-befe-89052bf0da48/tello-tello_driver_node-2.log].
log file: /home/user/.ros/log/b96e7966-fc1d-11eb-befe-89052bf0da48/tello-tello_driver_node-2*.log


I've seen that ImportError: No module named rospkg is pretty well known and I've been reading through a lot of posts but most of the people either have problems with conda (which does not run on my machine) or with the python version (they changed the version from 2. to 3.). My python version is 3.8.10 so I don't think that there is the problem. Does anyone know what the problem could be? Help would be much appreciated.

Can't access camera information

I am unable to get a video from tello.

Tello: 15:16:00.671: Info: video recv: 1460 bytes 9100 +166
terminate called after throwing an instance of 'std::runtime_error'
what(): Unknown encoding
Tello: 15:16:00.879: Info: video recv: 1460 bytes 9700 +164
[tello/image_compressed-3] process has died [pid 171367, exit code -6, cmd /opt/ros/noetic/lib/image_transport/republish raw in:=image_raw compressed out:=image_raw __name:=image_compressed __log:=/home/dylan/.ros/log/04adf7be-b324-11eb-a6b7-294c98992620/tello-image_compressed-3.log].
log file: /home/dylan/.ros/log/04adf7be-b324-11eb-a6b7-294c98992620/tello-image_compressed-3*.log
Tello: 15:16:01.088: Info: video recv: 1460 bytes 9d00 +166

/tello/image_raw/compressed not publishing anything

Hello,

I am having issues where the /tello/image_raw/compressed topic isn't publishing anything. I see some camera raw packets being sent under the /tello/image_raw/h264 topic though, so are there any parameters to check within the launch file to modify? I'm using ROS Melodic and the latest version of tello_driver and the Tello Drone firmware.

Video stream not working after changing Tello IP Address

I connected my Tello with my own WiFi connection and changed the Tello's IP Address everywhere inside the codes.

After running the tello_driver_node.py through the tello_node.launch, the code successfully connects to the Tello but the video stream gives an error.

Tello: 16:37:38.797: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 16:37:39.799: Error: video recv: timeout
Tello: 16:37:39.800: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 16:37:40.803: Error: video recv: timeout
Tello: 16:37:40.803: Info: start video (cmd=0x25 seq=0x01e4)
Tello: 16:37:41.807: Error: video recv: timeout
Tello: 16:37:41.807: Info: start video (cmd=0x25 seq=0x01e4)

How to solve this?
video_not_working

Can't Install

When downloading the package i get "unable to locate package"
When building form source i get the error CMake Error

at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by
"camera_info_manager_py" with any of the following names:

camera_info_manager_pyConfig.cmake
camera_info_manager_py-config.cmake

Add the installation prefix of "camera_info_manager_py" to
CMAKE_PREFIX_PATH or set "camera_info_manager_py_DIR" to a directory
containing one of the above files. If "camera_info_manager_py" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
tello_driver/CMakeLists.txt:7 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/ric/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/ric/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:852: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.