Tello和ROS的一些资料

版权声明:本文为zhangrelay原创文章,有错请轻拍,转载请注明,谢谢... https://blog.csdn.net/ZhangRelay/article/details/85563481

之前,一些博文给出了Cozmo和Vector等地面小型机器人的资料,这篇博文,针对空中机器人---Tello。

github上有python等sdk的介绍和说明,这里不再详细介绍。

下载对应ros功能包,进行编译即可使用。


tello_driver(github.com/anqixu/tello_driver


免责声明:此套餐正在进行中。对于您使用此软件的任何后果,我不承担任何责任。文档可能会被破坏,功能和API目前被认为是VOLATILE。

DISCLAIMER: This package is an work-in-progress. I take no responsibility for any consequences of you using this software. The documentation might be broken, and features and API are considered VOLATILE presently.

适用于DJI / Ryze Tello无人机的ROS驱动程序包

ROS driver wrapper for DJI/Ryze Tello drone

节点Node:

src/tello_driver_node.py

主题Topics:

~cmd_vel: geometry_msgs/Twist
~fast_mode: std_msgs/Empty
~image_raw: sensor_msgs/Image
~takeoff: std_msgs/Empty
~throw_takeoff: std_msgs/Empty
~land: std_msgs/Empty
~palm_land: std_msgs/Empty
~flattrim: std_msgs/Empty
~flip: std_msgs/Uint8


参数Parameters:

~tello_ip
~tello_cmd_port
~client_port
~connect_timeout_sec


安装Installation:
$ cd <CATKIN_WS/SRC>
$ 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 # not working currently
$ catkin build tello_driver
(可选)为PS3游戏手柄安装以下udev规则 ; 请参阅文件顶部的注释中的说明。

$ cd <CATKIN_WS/SRC>
$ 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
skip this step: $ # rosdep install tello_driver # not working currently
$ catkin build tello_driver

运行驱动程序Running the driver:
打开无人机,等待前灯琥珀色闪烁


将WiFi连接到无人机的接入点(例如TELLO_######)
$ roslaunch tello_driver launch/tello_node.launch

要查看摄像头:

$ rosrun rqt_image_view rqt_image_view /tello/image_raw/compressed

使用有线DualShock 3游戏手柄远程操作无人机
首先检查以下内容并可能调整参数/代码/映射parameters / code / mappings:

launch/joy_teleop.launch
launch/logger.launch
src/gamepad_marshall_node.py


现在运行:

$ roslaunch tello_driver devel.launch

连接多个无人机
通过使用多个USB WiFi加密狗和运行UDP代理服务器的Docker容器,可以连接到多个Tello无人机。

已知的错误
有时,也许在没有移动游戏手柄模拟棒/发送命令的情况下起飞时/tello/cmd_vel,进一步的cmd_vel将无法工作; 通过重新启动节点,移动游戏手柄模拟棒/发送消息到/tello/cmd_velFIRST,然后起飞来修复



ROS2(github.com/clydemcqueen/tello_ros)

tello_ros 是Tello和Tello EDU无人机的ROS2驱动程序。

功能包
有3个ROS2包:

tello_driver 是连接到无人机的C ++ ROS2节点
tello_msgs 是一组ROS2消息
tello_description 包含一个URDF和其他对rviz2和Gazebo有用的文件
接口
许多Tello命令(例如,takeoff和land)都在长时间运行,客户希望知道它们何时完成。在ROS1中,在这些情况下使用动作很常见,但ROS2 Bouncy中没有动作。目前,接口使用ROS服务tello_command来启动命令,并使用相应的ROS主题tello_response来指示命令完成。

一次只能激活一个命令。命令完成后,可以启动下一个命令。

如果在15秒内没有收到任何命令,Tello无人机将自动着陆。驱动程序发送适当的保持活动消息以避免这种情况。

驱动程序激活视频并发送有关image_raw主题的图像。在camera_info主题上发送相机信息。

服务
~tello_command tello_msgs / TelloCommand
发布的主题
~tello_response std_msgs /字符串
~flight_data tello_msgs / FlightData
~image_raw sensor_msgs /图像
~camera_info sensor_msgs / CameraInfo
安装要求
Ubuntu 18.04
ROS2 Bouncy
libasio-dev 1.10.8-1
ffmpeg 3.4.4-0ubuntu0.18.04.1,包括这些库:
libavcodec.so.57.1​​07.100
libavutil.so.55.78.100
libswscale.so.4.8.100
OpenCV 3
发送命令
使用command主题将任意字符串发送到无人机。例子:

ros2 service call /tello_command tello_msgs/TelloCommand "{cmd: 'takeoff'}"
ros2 service call /tello_command tello_msgs/TelloCommand "{cmd: 'land'}"
ros2 service call /tello_command tello_msgs/TelloCommand "{cmd: 'rc 10 0 0 0'}"
ros2 service call /tello_command tello_msgs/TelloCommand "{cmd: 'battery?'}"
设备经过测试
Tello
固件v01.04.35.01,SDK v1.3
Tello EDU
固件v02.04.69.03,SDK v2.0
在CLion中运行C ++节点
设置LD_LIBRARY_PATH以获取已编译的tello_msgs库。例:

source /opt/ros/bouncy/setup.bash
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:~/ros2/flock2_ws/install/tello_msgs/lib
bash ~/.local/share/JetBrains/Toolbox/apps/CLion/ch-0/183.4588.63/bin/clion.sh
积分
h264decoder来自:https://github.com/DaWelter/h264decoder

资源
Tello用户手册1.4:解释灯光等等。
Tello固件版本:不包括Tello EDU固件版本。
SDK 1.3:对于特洛。
SDK 2.0:对于Tello EDU。
Tello EDU Mission Pad指南(SDK 2.0)适用于Tello EDU。



重要步骤:

连接到Tello:

编译ROS1和ROS2:

111:

222:

更多内容稍后补充。

----

Fin

----

猜你喜欢

转载自blog.csdn.net/ZhangRelay/article/details/85563481