Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
ddp-actuator-solver
Commits
4d2bf10e
Commit
4d2bf10e
authored
Jan 04, 2016
by
flforget
Browse files
Merge branch 'master' of github.com:flforget/DDP
parents
6b37650a
15341d92
Changes
2
Hide whitespace changes
Inline
Side-by-side
cpp/include/ilqrsolver.h
View file @
4d2bf10e
...
...
@@ -78,7 +78,7 @@ public:
void
initTrajectory
();
void
backwardLoop
();
void
forwardLoop
();
char
isQuudefinitePositive
(
commandMat_t
&
Quu
);
bool
isQuudefinitePositive
(
const
commandMat_t
&
Quu
);
struct
traj
getLastSolvedTrajectory
();
private:
protected:
...
...
cpp/src/ilqrsolver.cpp
View file @
4d2bf10e
...
...
@@ -162,10 +162,21 @@ ILQRSolver::traj ILQRSolver::getLastSolvedTrajectory()
return
lastTraj
;
}
char
ILQRSolver
::
isQuudefinitePositive
(
commandMat_t
&
Quu
)
bool
ILQRSolver
::
isQuudefinitePositive
(
const
commandMat_t
&
Quu
)
{
/*
Todo : check if Quu is definite positive
*/
return
1
;
//Eigen::JacobiSVD<commandMat_t> svd_Quu (Quu, ComputeThinU | ComputeThinV);
Eigen
::
VectorXcd
singular_values
=
Quu
.
eigenvalues
();
for
(
long
i
=
0
;
i
<
Quu
.
cols
();
++
i
)
{
if
(
singular_values
[
i
].
real
()
<
0.
)
{
std
::
cout
<<
"not sdp"
<<
std
::
endl
;
return
false
;
}
}
return
true
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment