-
Notifications
You must be signed in to change notification settings - Fork 192
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
Bring MPC to new rpq_quadrotor_control #5
Comments
@kohlerj a first idea: I propose to make a pure virtual class for as There are some differences between the two which we have to cover in a clean implementation:
Therefore, I propose a solution by introducing the |
Hey, From what I understand, correct me if I am wrong, the only difference btw the position controller and the mpc controller is the fact that the latter needs the whole future trajectory whereas the former only need one point. If SO, then we could adapt the actual position controller to take the tail of the actual trajectory (a one element one in case of a simple reference) and pop the first element as reference. The mpc controller would use the whole trajectory. Also I think passing the parameters at each time is not that bad, overhead is minimal since passed by ref. Rather, it gives you the opportunity to dynamically modify the behavior of the controller, let's say if you're simply moving to your start point before executing a more aggressive trajectory. |
Agree on passing the whole trajectory tail! |
Additional: |
@foehnph When merging #60 and before closing this issue, could you please make a small comment with what you actually implemented out of all the things discussed above? Thanks |
Status comment for merging #60
|
is the lookahead always used? also if the mpc is not used? Because then the default parameter should be 0.0. |
right now, yes it is always used. |
isn't this a lot of unnecessary overhead for computing the reference trajectory when using the position controller? |
well... the whole tracking is not very optimized right now. you also looked through the whole trajectory to find the current state at each loop... so no, it is not many additional iterations, if that's what you ment. shall I add hints and links to MPC in the readme and the wiki once it's public? |
I mean in "executeTrajectory" you are now always composing a trajectory of lookahead duration (to be fed to the controller's "run" function) which is not necessary for the position controller since it only uses one trajectory points and therefore the autopilot's default "predictive_control_lookahead" parameter should be 0.0 for use with the position controller or do I not understand that correctly? |
you do understand this correctly, but it since position controller only takes the first point in the reference, passing it a whole lookahead is not a problem. |
got it, I will not bother you any longer ;) |
no problem, happy to hear opinions on work you did mainly xD |
@foehnph I guess this can be closed... How about advertising the MPC repo in the readme here and also describe and link to it in this repo's wiki? |
@foehnph What's the status here? |
No description provided.
The text was updated successfully, but these errors were encountered: