Open Azircarry opened 11 months ago
Sure! The project includes two parts, first is a pure python simulation that runs a simple quadrotor model controlled by MPC. You should be able to run this using execute_trajectory.py. This script should be enough if your main interest is the MPC algorithm implemented using acados.
The second part of the project uses Gazebo as the simulation environment. Using the ROS messaging system, the script mpc_controller_node.py takes measurements of the current state of the quadrotor in Gazebo and using the same model and controller as in execute_trajectory.py computes the optimal control, which it then sends using the ROS messaging system back to the Gazebo drone. If RGP is enabled, the mpc_controller_node.py also tracks the differences between the state predicted using quad.py and the measurement from Gazebo and tries to fit the RGP to this discrepancy. The RGP is used in the MPC controller to enhance the quad.py model.
I'm afraid I can't tell you the proper order of running the code, since I haven't touched it for almost a year, and to be frank, I haven't done the best possible job of documentation I could have.
确定!该项目包括两部分,第一部分是纯 python 模拟,运行由 MPC 控制的简单四旋翼模型。您应该能够使用 execute_trajectory.py 运行它。如果您的主要兴趣是使用 acados 实现的 MPC 算法,那么此脚本应该足够了。
项目的第二部分使用凉亭作为模拟环境。使用 ROS 消息传递系统,脚本mpc_controller_node.py测量 Gazebo 中四旋翼飞行器的当前状态,并使用与 execute_trajectory.py 相同的模型和控制器计算最佳控制,然后使用 ROS 消息传递系统将其发送回 Gazebo 无人机。如果启用了 RGP,mpc_controller_node.py还会跟踪使用 quad.py 预测的状态与 Gazebo 的测量值之间的差异,并尝试使 RGP 适应此差异。RGP 在 MPC 控制器中用于增强 quad.py 模型。
恐怕我不能告诉你运行代码的正确顺序,因为我已经有将近一年没有接触它了,坦率地说,我没有尽我所能做好最好的文档工作。
Actually, I would like to do some online identification work on quadcopter drones, of course thank you very much for your answer, I hope you can forgive me for bothering you
If its identification that you are after then my project is probably not what you want. The only identification I am doing is in the RGP module, but that is very simple compared to the nonlinear quadrotor model. The RGP module fits three independent nonlinear scalar functions from the gathered data, while the quadrotor model is a set of 13 nonlinear ODEs. If you are determined to use RGP for quadrotor identification, I would start with researching if a GP model was used for this purpuse and then add the recursive (online) part later.
Excuse me, but can I ask you about the software and version of the source code? And can you tell me the operation process of the project (such as the command to run some files and the order of running), I hope it doesn't bother you, thank you very much