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

Add support to track rigid body payloads #17

Open
wants to merge 24 commits into
base: qp-lee-payload
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2c730c4
Add support to track rigid body payloads
whoenig Dec 7, 2022
be0c2b9
add F_d and M_d to the leePayload object
Khaledwahba1994 Dec 13, 2022
c5da5c6
change to static
Khaledwahba1994 Dec 13, 2022
582104d
OSQP workspace for 3 uavs 2hps and rigid payload
Khaledwahba1994 Dec 13, 2022
b982d17
build updates for bindings and firmware
Khaledwahba1994 Dec 13, 2022
9931737
switching attachment points between uavs
Khaledwahba1994 Dec 13, 2022
f580146
bug in math3d done previously by me
Khaledwahba1994 Dec 13, 2022
f32422e
updating the workspace to have all of the entries in the sparse matri…
Khaledwahba1994 Dec 13, 2022
39854de
Add QP controller for rigid payload
Khaledwahba1994 Dec 13, 2022
87f830a
add setpoint for attitude of the payload
Khaledwahba1994 Dec 14, 2022
6e1f9da
Add params
Khaledwahba1994 Dec 14, 2022
6373ec8
Better tracking for the desired cable forces in simulation, which mak…
Khaledwahba1994 Dec 14, 2022
33d7515
proper management of the attachement points
whoenig Dec 15, 2022
7b22e47
bug in the QP, missed a negative sign
Khaledwahba1994 Dec 15, 2022
f02fbf3
add support to synchronize clocks across CFs
whoenig Dec 15, 2022
dd0fede
Addition of soft constraints
Khaledwahba1994 Dec 15, 2022
27027cd
Soft constraints commit
Khaledwahba1994 Dec 15, 2022
c973494
add qp profiling log
whoenig Dec 15, 2022
17442a9
Merge branch 'soft-constraint' into payload_pose_tracking
whoenig Dec 15, 2022
d208cd0
proper handling of failing qp
whoenig Dec 15, 2022
c336bb2
fix regularization update
whoenig Dec 15, 2022
7ac369f
make regularization configurable
whoenig Dec 16, 2022
8672d3a
worspace settings
Khaledwahba1994 Dec 16, 2022
4d29c1a
switch qiddot to vzero
Khaledwahba1994 Dec 16, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions bindings/cffirmware.i
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,21 @@ void collisionAvoidanceUpdateSetpointWrap(
free(workspace);
}

void state_set_neighbor_position(state_t *state, int idx, float x, float y, float z)
void state_set_neighbor_position(state_t *state, int idx, uint8_t id, float x, float y, float z)
{
state->position_neighbors[idx].x = x;
state->position_neighbors[idx].y = y;
state->position_neighbors[idx].z = z;
state->neighbors[idx].id = id;
state->neighbors[idx].pos.x = x;
state->neighbors[idx].pos.y = y;
state->neighbors[idx].pos.z = z;
}

void controller_lee_payload_set_attachement(controllerLeePayload_t* self, int idx, uint8_t id, float x, float y, float z)
{
self->attachement_points[idx].id = id;
self->attachement_points[idx].point.x = x;
self->attachement_points[idx].point.y = y;
self->attachement_points[idx].point.z = z;
}
%}

%pythoncode %{
Expand Down
1 change: 1 addition & 0 deletions bindings/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"src/lib/osqp/src/osqp/util.c",
"src/lib/osqp/src/osqp/workspace_2uav_2hp.c",
"src/lib/osqp/src/osqp/workspace_3uav_2hp.c",
"src/lib/osqp/src/osqp/workspace_3uav_2hp_rig.c",
]

cffirmware = Extension(
Expand Down
5 changes: 5 additions & 0 deletions src/hal/interface/usec_time.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
*/
void initUsecTimer(void);

/**
* Reset the microsecond-resolution timer to 0.
*/
void usecTimerReset(void);

/**
* Get microsecond-resolution timestamp.
*/
Expand Down
10 changes: 10 additions & 0 deletions src/hal/src/usec_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,16 @@ void initUsecTimer(void)
isInit = true;
}

void usecTimerReset(void)
{
IF_DEBUG_ASSERT(isInit);

const uint32_t zero = 0;
__atomic_store(&usecTimerHighCount, &zero, __ATOMIC_SEQ_CST);

TIM7->CNT = 0;
}

uint64_t usecTimestamp(void)
{
IF_DEBUG_ASSERT(isInit);
Expand Down
1 change: 1 addition & 0 deletions src/lib/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ obj-y += osqp/src/osqp/scaling.o
obj-y += osqp/src/osqp/util.o
obj-y += osqp/src/osqp/workspace_2uav_2hp.o
obj-y += osqp/src/osqp/workspace_3uav_2hp.o
obj-y += osqp/src/osqp/workspace_3uav_2hp_rig.o
Loading