-
Notifications
You must be signed in to change notification settings - Fork 1
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
added most of the requirements needed for the structure of the QP in … #14
base: col-trans
Are you sure you want to change the base?
Conversation
…-firmware into qp-lee-payload
… the QP with the new normals
src/modules/src/stabilizer.c
Outdated
@@ -129,6 +134,7 @@ static struct { | |||
|
|||
// for payloads | |||
static float payload_alpha = 0.9; // between 0...1; 1: no filter | |||
static float otherID = 2.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be uint8_t
src/modules/src/stabilizer.c
Outdated
@@ -431,6 +446,8 @@ PARAM_ADD_CORE(PARAM_UINT8, stop, &emergencyStop) | |||
|
|||
PARAM_ADD_CORE(PARAM_FLOAT, pAlpha, &payload_alpha) | |||
|
|||
PARAM_ADD_CORE(PARAM_FLOAT, otherID, &payload_alpha) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- PARAM_FLOAT -> PARAM_UINT8
- &payload_alpha -> &otherID
src/modules/src/stabilizer.c
Outdated
peerLocalizationOtherPosition_t* otherCF = peerLocalizationGetPositionByID(otherID); | ||
if (otherCF != NULL) { | ||
state.position2.x = otherCF->pos.x; | ||
state.position2.x = otherCF->pos.y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state.position2.x -> state.position.y
src/modules/src/stabilizer.c
Outdated
if (otherCF != NULL) { | ||
state.position2.x = otherCF->pos.x; | ||
state.position2.x = otherCF->pos.y; | ||
state.position2.x = otherCF->pos.z; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state.position2.x -> state.position.z
PARAM_ADD(PARAM_FLOAT, n1, &g_self.n1.x) | ||
PARAM_ADD(PARAM_FLOAT, n1, &g_self.n1.y) | ||
PARAM_ADD(PARAM_FLOAT, n1, &g_self.n1.z) | ||
PARAM_ADD(PARAM_FLOAT, n2, &g_self.n2.x) | ||
PARAM_ADD(PARAM_FLOAT, n2, &g_self.n2.y) | ||
PARAM_ADD(PARAM_FLOAT, n2, &g_self.n2.z) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove. Also, they would need to have different names for this to work.
PARAM_ADD(PARAM_FLOAT, mu1x, &g_self.mu1.x) | ||
PARAM_ADD(PARAM_FLOAT, mu1y, &g_self.mu1.y) | ||
PARAM_ADD(PARAM_FLOAT, mu1z, &g_self.mu1.z) | ||
PARAM_ADD(PARAM_FLOAT, mu2x, &g_self.mu2.x) | ||
PARAM_ADD(PARAM_FLOAT, mu2y, &g_self.mu2.y) | ||
PARAM_ADD(PARAM_FLOAT, mu2z, &g_self.mu2.z) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove. If you want to be able to look at them, you would need to add them to logging, not to params
self->desVirtInp.x = (&workspace)->solution->x[0]; | ||
self->desVirtInp.y = (&workspace)->solution->x[1]; | ||
self->desVirtInp.z = (&workspace)->solution->x[2]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did this change? shouldn't you use 3,4,5, like before?
I added the required matrices and structure needed for formulating the QP. I documented each variable added in comments. The only step left is to actually add the osqp code in the firmware.