Closed avikde closed 4 years ago
Output from matlab 145.0000 0.0081 -0.0000 -0.0014
Output from C++ 145 0.00807963 -9.36425e-07 -0.00139418
Next step: connect this mex in the target_driver file, and run on the robot.
Using empirical popts; nonzero drv_roll for vertical momentum.
Simulink file (in dropbox) and mex file (built from this repo):
simulink.zip
Lots of trouble getting this into simulink. https://www.mathworks.com/help/simulink/sfg/integrating-existing-c-functions-into-simulink-models-with-the-legacy-code-tool.html
Works with QP solve
drv_pch appears to be hitting 0.5. need to check. pddes = [0,0,10,0,0,0]
Hypothesis: wlControllerInit() was not being called
Precise test to do:
Result at home 144.019363,0.032662,-0.034836,0.012172
There are some spikes (will attach matlab). Not sure if they are due to some aspect of simulink. Should try to create a mex of this one on my computer and run that to check.
Otherwise, seems like it produces ~0 drv_pch, ~20 drv_roll.
Can replicate the spikes with mex on my computer
du = -0.000 0.010 0.000, solved inaccurate
du = -0.000 0.010 0.003, maximum iterations reached
du = -0.002 -0.036 -0.004, maximum iterations reached
du = 0.006 0.204 -0.006, maximum iterations reached
du = 0.008 -0.070 0.060, maximum iterations reached
du = -0.001 -0.016 -0.006, maximum iterations reached
du = -0.000 -0.014 -0.008, maximum iterations reached
du = -0.000 -0.010 -0.006, solved
du = -0.000 -0.010 -0.005, solved
With osqp default settings
This is now basically working but it looks like this robot is more even left and right now. Need to get kinematic features again?
Should merge this in. Try to combine the momentum reference kpmom(pdes - p) into the QP?
Closes #171
Building on from #173
References