Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
acceleration_qp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
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
Auctus Team
People
LucasJoseph
acceleration_qp
Commits
39b67d26
Commit
39b67d26
authored
1 year ago
by
JOSEPH Lucas
Browse files
Options
Downloads
Patches
Plain Diff
Remove log not used
parent
e669c6dc
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/controller.cpp
+0
-37
0 additions, 37 deletions
src/controller.cpp
with
0 additions
and
37 deletions
src/controller.cpp
+
0
−
37
View file @
39b67d26
...
...
@@ -68,49 +68,12 @@ Eigen::VectorXd Acceleration::update(Eigen::VectorXd q, Eigen::VectorXd qdot, Ei
(
(
-
model
.
velocityLimit
-
qdot_d
)
/
horizon_dt
).
cwiseMax
(
2.0
*
(
model
.
lowerPositionLimit
-
q
-
qdot_d
*
horizon_dt
)
/
(
horizon_dt
*
horizon_dt
)
);
// qp.ub = q2dot_max;
// qp.lb = -q2dot_max;
// qp.a_constraints.block(0, 0, model.nv, model.nv) = Eigen::MatrixXd::Identity(model.nv,model.nv);
// qp.a_constraints.block(model.nv, 0, model.nv, model.nv) = Eigen::MatrixXd::Identity(model.nv,model.nv);
// qp.a_constraints.block(2*model.nv, 0, model.nv, model.nv) = Eigen::MatrixXd::Identity(model.nv,model.nv);
// qp.lb_a.block(0, 0, model.nv, 1) = -q3dot_max * horizon_dt + q2dot_d;
// qp.lb_a.block(model.nv, 0, model.nv, 1) = (-model.velocityLimit - qdot_d)/horizon_dt;
// qp.lb_a.block(2*model.nv, 0, model.nv, 1) = 2.0 * ( model.lowerPositionLimit - q - qdot_d * horizon_dt ) / (horizon_dt * horizon_dt);
// qp.ub_a.block(0, 0, model.nv, 1) = q3dot_max * horizon_dt + q2dot_d;
// qp.ub_a.block(model.nv, 0, model.nv, 1) = (model.velocityLimit - qdot_d)/horizon_dt;
// qp.ub_a.block(2*model.nv, 0, model.nv, 1) = 2.0 * ( model.upperPositionLimit - q - qdot_d * horizon_dt ) / (horizon_dt * horizon_dt);
qp_solution
=
qp_solver
.
SolveQP
(
qp
);
q3dot_constraint
=
(
qp_solution
-
q2dot_d
)
/
horizon_dt
;
q2dot_constraint
=
qp_solution
;
qdot_constraint
=
qdot_d
+
qp_solution
*
horizon_dt
;
q_constraint
=
q
+
qdot_d
*
horizon_dt
+
0.5
*
qp_solution
*
horizon_dt
*
horizon_dt
;
return
qp_solution
;
}
void
Acceleration
::
getQPConstraints
(
Eigen
::
VectorXd
&
q3dot_constraint
,
Eigen
::
VectorXd
&
q2dot_constraint
,
Eigen
::
VectorXd
&
qdot_constraint
,
Eigen
::
VectorXd
&
q_constraint
)
{
q3dot_constraint
=
this
->
q3dot_constraint
;
q2dot_constraint
=
this
->
q2dot_constraint
;
qdot_constraint
=
this
->
qdot_constraint
;
q_constraint
=
this
->
q_constraint
;
}
void
Acceleration
::
getQPLimits
(
Eigen
::
VectorXd
&
q3dot_lim
,
Eigen
::
VectorXd
&
q2dot_lim
,
Eigen
::
VectorXd
&
qdot_lim
,
Eigen
::
VectorXd
&
q_lim_lower
,
Eigen
::
VectorXd
&
q_lim_upper
)
{
q3dot_lim
=
this
->
q3dot_max
;
q2dot_lim
=
this
->
q2dot_max
;
qdot_lim
=
this
->
model
.
velocityLimit
;
q_lim_lower
=
model
.
lowerPositionLimit
;
q_lim_upper
=
model
.
upperPositionLimit
;
}
bool
Acceleration
::
load_robot_model
(
std
::
string
robot_description
,
std
::
vector
<
std
::
string
>
joint_names
)
{
// Load the urdf model
...
...
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