Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing selection matrix in BoundedSpeedConstr #58

Open
anastasiabolotnikova opened this issue Nov 20, 2019 · 0 comments
Open

Missing selection matrix in BoundedSpeedConstr #58

anastasiabolotnikova opened this issue Nov 20, 2019 · 0 comments

Comments

@anastasiabolotnikova
Copy link

There seems to be a missing multiplication by a selection matrix in the BoundedSpeedConstr::update.

Starting from the constraint documentation in QPConstr.h we have the following
missing_selectin_matrix

Multiplication by a selection matrix indicated in red above seems to be missing in the implementation QPConstr.cpp

lower_.segment(index, rows).noalias() = cont_[i].dof * (-normalAcc - (speed / timeStep_));
upper_.segment(index, rows).noalias() = lower_.segment(index, rows);

lower_.segment(index, rows).noalias() += (cont_[i].lSpeed / timeStep_);
upper_.segment(index, rows).noalias() += (cont_[i].uSpeed / timeStep_);

This should give undesired results in case when selection matrix cont_[i].dof zeros some DoFs for which the lower and/or upper speed limits are specified as non-zero. I suppose, this usually won't happen, but to have correct constraint implementation and to make it foolproof against such situation, it should be the following:

lower_.segment(index, rows).noalias() = cont_[i].dof * (-normalAcc - (speed / timeStep_));
upper_.segment(index, rows).noalias() = lower_.segment(index, rows);

lower_.segment(index, rows).noalias() += cont_[i].dof * (cont_[i].lSpeed / timeStep_);
upper_.segment(index, rows).noalias() += cont_[i].dof * (cont_[i].uSpeed / timeStep_);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant