Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polympc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Petr Listov
polympc
Commits
9cfe7e59
Commit
9cfe7e59
authored
3 years ago
by
Johannes Waibel
Browse files
Options
Downloads
Patches
Plain Diff
Update mpc_wrapper.hpp: Set x_guess in comprehensive, reshaped form.
parent
87e2f7fc
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/control/mpc_wrapper.hpp
+4
-0
4 additions, 0 deletions
src/control/mpc_wrapper.hpp
with
4 additions
and
0 deletions
src/control/mpc_wrapper.hpp
+
4
−
0
View file @
9cfe7e59
...
...
@@ -182,6 +182,10 @@ public:
{
m_solver
.
m_x
.
template
head
<
varx_size
>()
=
x_guess
;
}
inline
void
x_guess_reshaped
(
const
Eigen
::
Ref
<
const
Eigen
::
Matrix
<
scalar_t
,
nx
,
num_nodes
>>&
x_guess_mat
)
noexcept
{
m_solver
.
m_x
.
template
head
<
varx_size
>()
=
Eigen
::
Map
<
const
traj_state_t
>
(
x_guess_mat
.
rowwise
().
reverse
().
eval
().
data
(),
nx
*
num_nodes
);
}
inline
void
u_guess
(
const
Eigen
::
Ref
<
const
traj_control_t
>&
u_guess
)
noexcept
{
m_solver
.
m_x
.
template
segment
<
varu_size
>(
varx_size
)
=
u_guess
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment