Conversation
Pedro-Roque
left a comment
There was a problem hiding this comment.
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.
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'