Skip to content
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

cost function #25

Open
hhxzzy opened this issue Dec 14, 2020 · 4 comments
Open

cost function #25

hhxzzy opened this issue Dec 14, 2020 · 4 comments

Comments

@hhxzzy
Copy link

hhxzzy commented Dec 14, 2020

Hello, I am new to this and I got a little confused when I try to find the cost funtion of the MPC process. I want to alter the cost function like adding some term to it. And I wonder if there an explicit way of setting the cost function. Thank you so much!

@soldierofhell
Copy link

soldierofhell commented Dec 15, 2020

See the available options starting here:

if (objective_type == "minimum_time")

@hhxzzy
Copy link
Author

hhxzzy commented Dec 16, 2020

Thanks for replying!
A few more questions:

  1. It seems that the codes from line 555 to line 641 ask me to set the objective type for the optimal control problem. But I am not very clear the meanings of the options. Is the option "minimum_time" sets the cost function whose solution uses the least time? And what do "quadratic_form" and "minimum_time_via_points" mean?
  2. This segment of codes set some parameters like the weights in the matrixes. Is this all I can do to alter the cost function? Can I alter the cost function more flexibly?
    Thanks again for your reply!

@soldierofhell
Copy link

soldierofhell commented Dec 16, 2020

See the cost implementations in https://github.com/rst-tu-dortmund/mpc_local_planner/tree/master/mpc_local_planner/include/mpc_local_planner/optimal_control
They subclass corbo::StageCost mostly by implementing computeXXXTerm() cost terms

@MuXingchui
Copy link

See the cost implementations in https://github.com/rst-tu-dortmund/mpc_local_planner/tree/master/mpc_local_planner/include/mpc_local_planner/optimal_control They subclass corbo::StageCost mostly by implementing computeXXXTerm() cost terms

Hello, I am also a new to this and I got a little confused when I try to find the cost funtion of the MPC process. Where can I see the definition of the cost function? I want to know how MPC plans the trajectory to avoid obstacles if there are unknown obstacles on the path. In other words, I want to know in which file can I see the definition of the obstacle avoidance function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants