Repository navigation
Adding another solution - #4
Open
hoonyyhoon wants to merge 2 commits into
Open
hoonyyhoon wants to merge 2 commits into
hoonyyhoon wants to merge 2 commits into
Conversation
hoonyyhoon
commented
Oct 15, 2020
| //DifferentialState delta; | ||
| DifferentialState phi; | ||
|
|
||
| OnlineData coeff0, coeff1, coeff2, coeff3; |
Member
Author
There was a problem hiding this comment.
polynomial coefficient 입력
hoonyyhoon
commented
Oct 15, 2020
| // | ||
| // Weighting matrices and reference functions (acadoVariables.y) | ||
| // | ||
| auto y_dev = coeff0 + coeff1 * x + coeff2 * x * x + coeff3 * x * x * x; |
hoonyyhoon
commented
Oct 15, 2020
| // Weighting matrices and reference functions (acadoVariables.y) | ||
| // | ||
| auto y_dev = coeff0 + coeff1 * x + coeff2 * x * x + coeff3 * x * x * x; | ||
| auto angle = atan(coeff1 + 2*coeff2*x + 3*coeff3*x*x); |
hoonyyhoon
commented
Oct 15, 2020
| rfN << x << y << v << phi; | ||
| rf << y_dev - y; | ||
| rf << angle - phi; | ||
| rf << v - 60.0; |
hoonyyhoon
commented
Oct 15, 2020
| mpc.set(DISCRETIZATION_TYPE, MULTIPLE_SHOOTING); | ||
| //mpc.set(INTEGRATOR_TYPE, INT_RK4); | ||
| mpc.set(INTEGRATOR_TYPE, INT_IRK_RIIA3); | ||
| mpc.set(NUM_INTEGRATOR_STEPS, N * Ni); |
Member
|
build folder 날려주세요~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@KyuhwanYeon
빌드를 여러개해야해서 헷갈렸네요ㅜ
저는 coefficient를 받아서 처리하는 방식으로 구현해봤습니다.
cd acado_code_generator/build makecode generation 실행
./mpc
simple_mpc_export를 acado_mpc_export로 복사
mv simple_mpc_export/* ../../acado_mpc_export/cd ../../acado_mpc_export make파라미터 튜닝
src/acado.cpp 내 init_weight 함수 변수