Open james-p-foster opened 5 years ago
May I ask how you solved this error problem, thanks!
May I ask how you solved this error problem, thanks!
Apologies, as this was several years ago I've long since stopped working on this project. Best of luck!
Hi,
I'm struggling to implement a constraint that enforces the absolute pitch and roll (that is, pitch and roll w.r.t. the inertial world frame) of the feet of my robot to be zero.
To me, the most natural way seems to be to define the contact coordinate frames on each foot, then use computeEulerAngles() on these frames to find the orientation of the foot relative to the world frame, and then put that angle into a SymFunction that is constrained to be zero.
When I do this, and compile, I get some kind of compilation/mex error, that the function "Dot" (which I'm assuming is originally from Mathematica) is not within scope:
For reference, here's my MATLAB function for creating a SymFunction of absolute foot pitch (absolute roll is nearly identical):
As you can see the robot has a ContactPoints field where the contact frames are defined.
I've tried to dig into both the FROST file template.cc and my own Mathematica copy of mdefs.h in order to add functionality to the "Dot" function, but that opens a whole can of worms I don't know how to deal with.
Can anyone help me to either troubleshoot this Euler Angles approach, or if you have implemented a similar constraint, suggest an alternative method?
Cheers,
-- James