Skip to content
Snippets Groups Projects
Commit bab5321f authored by Petr Listov's avatar Petr Listov
Browse files

typos fix in ocp chapter

parent 0c58022a
No related branches found
No related tags found
No related merge requests found
...@@ -236,12 +236,12 @@ using *PolyMPC*. ...@@ -236,12 +236,12 @@ using *PolyMPC*.
/** initialise weight matrices to identity (for example)*/ /** initialise weight matrices to identity (for example)*/
Q.setIdentity(); Q.setIdentity();
R.setIdentity(); R.setIdentity();
QN.setIdentity; QN.setIdentity();
} }
Matrix<scalar_t, 3, 3> Q; Matrix<scalar_t, 3, 3> Q;
Matrix<scalar_t, 2, 2> R; Matrix<scalar_t, 2, 2> R;
Eigen::DiagonalMatrix<scalar_t, 3> QN{1,1,1}; Matrix<scalar_t, 3, 3> QN;
template<typename T> template<typename T>
inline void dynamics_impl(const Ref<const state_t<T>> x, const Ref<const control_t<T>> u, inline void dynamics_impl(const Ref<const state_t<T>> x, const Ref<const control_t<T>> u,
...@@ -330,12 +330,12 @@ Let's now move on to defining the dynamics functions. ...@@ -330,12 +330,12 @@ Let's now move on to defining the dynamics functions.
/** initialise weight matrices to identity (for example)*/ /** initialise weight matrices to identity (for example)*/
Q.setIdentity(); Q.setIdentity();
R.setIdentity(); R.setIdentity();
QN.setIdentity; QN.setIdentity();
} }
Matrix<scalar_t, 3, 3> Q; Matrix<scalar_t, 3, 3> Q;
Matrix<scalar_t, 2, 2> R; Matrix<scalar_t, 2, 2> R;
Eigen::DiagonalMatrix<scalar_t, 3> QN{1,1,1}; Matrix<scalar_t, 3, 3> QN;
template<typename T> template<typename T>
inline void dynamics_impl(const Ref<const state_t<T>> x, const Ref<const control_t<T>> u, inline void dynamics_impl(const Ref<const state_t<T>> x, const Ref<const control_t<T>> u,
...@@ -442,8 +442,8 @@ this problem as described in :ref:`chapter-nlp` chapter. We create a nonlinear s ...@@ -442,8 +442,8 @@ this problem as described in :ref:`chapter-nlp` chapter. We create a nonlinear s
using box_admm_solver = boxADMM<RobotOCP::VAR_SIZE, RobotOCP::NUM_EQ, RobotOCP::scalar_t, using box_admm_solver = boxADMM<RobotOCP::VAR_SIZE, RobotOCP::NUM_EQ, RobotOCP::scalar_t,
RobotOCP::MATRIXFMT, linear_solver_traits<RobotOCP::MATRIXFMT>::default_solver>; RobotOCP::MATRIXFMT, linear_solver_traits<RobotOCP::MATRIXFMT>::default_solver>;
using preconditioner_t = polympc::RuizEquilibration<RobotOCP::scalar_t, RobotOCP::VAR_SIZE, using preconditioner_t = RuizEquilibration<RobotOCP::scalar_t, RobotOCP::VAR_SIZE,
RobotOCP::NUM_EQ, RobotOCP::MATRIXFMT>; RobotOCP::NUM_EQ, RobotOCP::MATRIXFMT>;
int main(void) int main(void)
{ {
...@@ -505,7 +505,7 @@ Here is how our particular example will look like with the MPC wrapper: ...@@ -505,7 +505,7 @@ Here is how our particular example will look like with the MPC wrapper:
int main(void) int main(void)
{ {
/** create an MPC algorithm and set the prediction horison */ /** create an MPC algorithm and set the prediction horison */
using mpc_t = MPC<RobotOCP, MySolver, box_admm_solver>; using mpc_t = MPC<RobotOCP, Solver, box_admm_solver>;
mpc_t mpc; mpc_t mpc;
mpc.settings().max_iter = 20; mpc.settings().max_iter = 20;
mpc.settings().line_search_max_iter = 10; mpc.settings().line_search_max_iter = 10;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment