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

added most of the requirements needed for the structure of the QP in … #14

Open
wants to merge 38 commits into
base: col-trans
Choose a base branch
from

Conversation

Khaledwahba1994
Copy link
Collaborator

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.

@@ -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;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be uint8_t

@@ -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)
Copy link

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

peerLocalizationOtherPosition_t* otherCF = peerLocalizationGetPositionByID(otherID);
if (otherCF != NULL) {
state.position2.x = otherCF->pos.x;
state.position2.x = otherCF->pos.y;
Copy link

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

if (otherCF != NULL) {
state.position2.x = otherCF->pos.x;
state.position2.x = otherCF->pos.y;
state.position2.x = otherCF->pos.z;
Copy link

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

Comment on lines 517 to 522
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)
Copy link

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.

Comment on lines 530 to 535
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)
Copy link

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

Comment on lines 259 to 261
self->desVirtInp.x = (&workspace)->solution->x[0];
self->desVirtInp.y = (&workspace)->solution->x[1];
self->desVirtInp.z = (&workspace)->solution->x[2];
Copy link

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?

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

Successfully merging this pull request may close these issues.

2 participants