A key activity in the deployment of quadcopters is controller tuning. This research chapter addresses the problem of how to optimize the parameter set of a controller for a quadcopter. Existing research in iterative controller optimization has centered on the use of linear models of the process. However, in this research chapter, we propose a procedure based on conjugate gradient optimization for controller tuning when the dynamic model is nonlinear and the test signals are stochastic. To validate the findings, a bipartite ROS application was implemented. The first part corresponds to the orientation controller of the drone which runs on the onboard computer. The second part carries out the position controller and runs on a ground station computer. ROS Indigo Igloo is used for the code of this chapter.