The first part is vision system which would detect the pad on the ground and compute the relative distance. This is based on opencv aruco marker algorithm. (/catkin_ws/src/opencvtest_py/src/test.py) The input of the system is the raw image of the camera and the output is the relative distance between drone and the launch pad in camera reference frame.
The second part is the PID control system(catkin_ws/control/src/control.py). When the vision system publishes the relative distance , the control system would subscribe it and use it as the input. A 3 dimension velocity loop PID control is built as we would control the x, y, z linear velocity to approach the mark.
cd ~/src/Firmware
source Tools/setup_gazebo.bash
roslaunch px4 drone.launch
rosrun offboard offboard_node
rosrun keyboard keyboard_ndoe
rosrun opencvtest_py test.py
rosrun control control.py