Ipuch / wheelchair-ocp

Optimal control for wheelchair propulsion
MIT License
1 stars 2 forks source link

Adding the wheel angle as ocp parameter #6

Open SamHybz opened 8 months ago

SamHybz commented 8 months ago

Requires to reassign the angle between "ContactFrame"/"Wheel" as a MX in the .bioMod To date, makes bioptim crash

Ipuch commented 8 months ago

see https://github.com/pyomeca/biorbd/issues/343

Ipuch commented 8 months ago

As far as I understand it's not possible to do it. Because biorbd/rbdl merges segments (mass, inertia, com, etc...) without any dof with respect to its parent segment.

Thus, the orientation parameter we want to change disappears when we load the model. To solve it, it would require to heavily modify biorbd or rbdl. I'm not sure I have the time for it 😅😅

I have a solution in mind nonetheless, we can create a surcouche on the top of biorbd.Model that makes all the marker positions manipulable MX and setting it in the wheel frame.

Once we have that we can set the coordinates of the marker as R cos(theta), R sin(theta) with theta our symbolic parameter.

It would be three to four methods to implement, estimated time: 1 hour.

Ipuch commented 6 months ago

My part is done.