-
Notifications
You must be signed in to change notification settings - Fork 31
Direct Casadi solving for rate MPC #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Pedro-Roque
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check these and change accordingly @joris997 , I'll approve it after :)
|
done @Pedro-Roque |
|
Great! If my test checks out, I'll merge. |
Jaeyoung-Lim
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense that this would be a complete separate node, but sharing the models and formulations?
Or do you think this switch is general enough that we can switch back and forth?
I am a bit worried since the reason we went for acados was for simplicity. (You can see how little number of codes are needed to create a MPC node with this implementation.
|
@Jaeyoung-Lim I think that the mpc_spacecraft should still be the entrypoint, and perhaps the MPC's need to be abstracted away. I'll start reviewing this PR and make some changes for clarity and ease-of-use. @joris997 the time as finally come! |
…adi rate mpc only
…the framework, mode combination
|
@joris997 any updates on this? |
Instead of having to use acados, some users (like me :) ) may want to use the more intuitive casadi solver. This is a first PR for that, only containing the rate MPC.
I've decided to add a differentiator,
eulerandrk4integration method to thespacecraft_rate_model. The MPC itself is located inspacecraft_casadi_rate_mpc.py. In the launch file (and therefore command line) it is now possible to call either acados or casadi for the rate mpc via theframeworkflag.Current solvers: IPOPT and SQPMethod
Tested in SITL with
`ros2 launch px4_mpc mpc_spacecraft_launch.py mode:=rate namespace:=snap setpoint_from_rviz:=False framework:=casadi'