The main tello ros driver is located in the tello_ros package. You can find the README file in the tello_ros package. Notice that the readme file in the tello_ros package is not up to date, it indicates that it's using ROS2 Eloquent, but we are using ROS2 Galactic. But still, you can use the readme file to understand the basics of the tello ros driver.
Running a Tello simulation in Gazebo
tello_gazebo consists of several components:
TelloPluginsimulates a drone, handling takeoff, landing and very simple flight dynamicsmarkerscontains Gazebo models for fiducial markersfiducial.worldis a simple world with a bunch of fiducial markersinject_entity.pyis a script that will read an URDF (ROS) or SDF (Gazebo) file and spawn a model in a running instance of Gazebo- the built-in camera plugin is used to emulate the Gazebo forward-facing camera
https://docs.ros.org/ with the `ros-galactic-desktop` option.
sudo apt install gazebo11 libgazebo11 libgazebo11-dev
sudo apt install libasio-dev
sudo apt install ros-galactic-cv-bridge ros-galactic-camera-calibration-parsers
sudo apt install libignition-rendering3
pip3 install transformations
mkdir -p ~/drone_racing_ros2_ws/src
cd ~/drone_racing_ros2_ws/src
git clone https://github.com/TIERS/drone_racing_ros2.git
cd ..
source /opt/ros/galactic/setup.bash
colcon build
cd ~/drone_racing_ros2_ws
source install/setup.bash
export GAZEBO_MODEL_PATH=${PWD}/install/tello_gazebo/share/tello_gazebo/models
source /usr/share/gazebo/setup.sh
ros2 launch tello_gazebo simple_launch.py
You will see a single drone in a blank world. You can control the drone using the joystick.
If you run into the No namespace found error re-set GAZEBO_MODEL_PATH:
export GAZEBO_MODEL_PATH=${PWD}/install/tello_gazebo/share/tello_gazebo/models
source /usr/share/gazebo/setup.sh
ros2 service call /drone1/tello_action tello_msgs/TelloAction "{cmd: 'takeoff'}"
ros2 service call /drone1/tello_action tello_msgs/TelloAction "{cmd: 'land'}"
ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r __ns:=/drone1