# ROS

ROS driver wrapper for DJI/Ryze Tello drone

Node: [src/tello\_driver\_node.py](https://github.com/anqixu/tello_driver/blob/master/src/tello_driver_node.py)

Topics:

* `~cmd_vel`: [ geometry\_msgs/Twist](http://docs.ros.org/api/geometry_msgs/html/msg/Twist.html)
* `~fast_mode`:[ std\_msgs/Empty](http://docs.ros.org/api/std_msgs/html/msg/Empty.html)
* `~image_raw`: [sensor\_msgs/Image](http://docs.ros.org/api/sensor_msgs/html/msg/Image.html)
* `~takeoff`: [std\_msgs/Empty](http://docs.ros.org/api/std_msgs/html/msg/Empty.html)
* `~throw_takeoff`: [std\_msgs/Empty](http://docs.ros.org/api/std_msgs/html/msg/Empty.html)
* `~land`: [std\_msgs/Empty](http://docs.ros.org/api/std_msgs/html/msg/Empty.html)
* `~palm_land`: [std\_msgs/Empty](http://docs.ros.org/api/std_msgs/html/msg/Empty.html)
* `~flattrim`:[ std\_msgs/Empty](http://docs.ros.org/api/std_msgs/html/msg/Empty.html)
* `~flip`: [std\_msgs/Uint8](http://docs.ros.org/api/std_msgs/html/msg/UInt8.html)

Parameters:

* `~tello_ip`
* `~tello_cmd_port`
* `~client_port`
* `~connect_timeout_sec`

## Installation

```
$ cd
$ git clone https://github.com/anqixu/TelloPy.git
$ cd TelloPy
$ sudo -H pip2 install -e .
$ cd ..
$ git clone https://github.com/anqixu/h264_image_transport.git
$ git clone https://github.com/anqixu/tello_driver.git
$ cd ..
$ rosdep install h264_image_transport
$ rosdep install tello_driver
$ catkin build tello_driver
```

Optionally, install the [following udev rules](https://github.com/anqixu/sixad_rumble/blob/master/misc/10-gamepads.rules) for PS3 gamepads; see instructions in comments on top of file.

## Running the driver

* turn on drone and wait for its front lights to blink amber
* connect WiFi to drone's access point (e.g. `TELLO_######`)
* `$ roslaunch tello_driver launch/tello_node.launch`

To see the camera:

```
$ rosrun rqt_image_view rqt_image_view /tello/image_raw/compressed
```
