Autonomous Wind Turbine Inspection Framework Enabled by Visual Tracking Nonlinear Model Predictive Control (VT-NMPC)
This repository contains the code and simulation files for the autonomous wind turbine inspection project. For this purpose, a time optimal path planner and a Visual tracking MPC is developed. Link to paper:
Installation instructions:
Install Ubuntu 18.04 and ROS melodic
Create SSH key for computer
Follow the following tutorial Create SSH key
Clone directory in the home folder
cd
git clone https://github.com/abdelhakim96/Wind-Turbine-Inspection
Download the PX4 folder from here: PX4 files download and place it inside the Wind-Turbine-Inspection folder
Clone the WTI_catkin inside the catkin_ws
cd catkin_ws
git clone git@github.com:abdelhakim96/WTI_catkin.git
Switch to the most recent branch using git checkout
Build workspace
cd catkin_ws
cd catkin_make
Download dependecies and setup px4:
sudo apt-get ros-mavros-mav-msgs
cd Wind-Turbine-Inspection
./install_dependencies_and_setup_px4_modified.sh
note: ignore the errors related to python 2.7
Add alias for arming the drone and setting the mode to offboard.
sudo gedit ~/.bashrc
Add the following lines for
alias arm='rosrun mavros mavsafety arm'
alias disarm='rosrun mavros mavsafety disarm'
alias offboard='rosrun mavros mavsys mode -c OFFBOARD'
Starting the simulation:
cd Wind-Turbine-Inspection/WTI_px4_modified/shell_scripts/
./run_sitl_gazebo_withWrapper_terminator.sh matrice_100
Running the Inspection Planner
launch rqt_reconfigure trajectory
roslaunch dji_m100_trajectory m100_trajectory_v2_indoor.launch
Activate traj_on
in the terminal arm the dorne and set the mode to offboard on by typing the following commands
arm
offboard
The drone will take off.
Next: launch the VT-MPC.
roslaunch quaternion_point_traj_nmpc quaternion_point_traj_nmpc.launch
Adding wind to the simulation
roslaunch dji_m100_trajectory windgen_recdata.launch
Running the whole inspection frame work:
The optimal sequence of points and surface normals are created in txt file format, which the NMPC uses to generate optimal control actions. The planner is run for a default wind turbine model.
To run the default planner:
- Bring the drone to the initial position (-3, 0, 3)
- Run the point and normal generator node
rosrun dji_m100_trajectory GP_statemachine
-
change the mode to GP (Global Planner) and tick point to inspect checkbox
-
change the mode to GP (Global Planner) and tick point to inspect checkbox
TODO
- clean the repo from unnecassary folders
- rename and the reorganize the nmpc controller structures
- Recheck the installation instructions and test it
- Add the inspection process launching instructions
- Add images to the simulation launch instructions
- Add description of the framework and simulation environment
- Add description of the different controllers
- Add description of the path planner