gazebo_uav_control
gazebo_uav_control copied to clipboard
A basic example of using Gazbo+ROS with C++ to control a quadrotor UAV using basic PID control
Simple Quadrotor UAV PID Control
This repository include an example of using ROS and Gazebo to position control a quadrotor UAV, using C++. A simple PID controller (not the internal ROS controller) is used as the controller.
Initial Setup
git clone https://github.com/fdcl-gwu/gazebo_uav_control.git
cd gazebo_uav_control
git submodule update --init
catkin_make
cd devel && source setup.bash && cd ../
Running the code
roslaunch uav_gazebo simple_world.launch
Explanation
This code is organized as follows:
src/uav_control: plugin for controlling the UAVsrc/uav_gazebo: Gazebo simulation related files
This uses uav_control/src/control_plugin.cpp file which uses the Gazebo model plugin as described here.
Determining the current state and control input is done inside this file.
The states of the UAV can be checked with
rostopic echo /states
after launching Gazebo simulation.