mit-biomimetics / Cheetah-Software

MIT License
2.61k stars 926 forks source link

Virtual Overloaded Problem about qpoases in balance control #20

Closed Cauchy4ier closed 4 years ago

Cauchy4ier commented 4 years ago

Happy new year. I am trying to write my own controller, but when I intend to include the header files that are related to BalanceController and qpoases, I encounter virtual overloaded problems which happen in the third- party codes instead of mine. Like this, 1

I could add the "-Wno-overloaded-virtual" flag to the Cmakelist, and the whole building progress ran smoothly. But when I activated the simulation and my own controller, the simulation crashed with segfault. image

Did you guys meet the same problem when writing the codes about balance standing or trotting? If so, how did you solve it?

dicarlo236 commented 4 years ago

I don't know for sure, but based on the error message, I'm guessing you have some bug related to a std::vector (or our vector class for eigen stuff) in your code, maybe you don't set the size of the vector, or you are accessing past the end. I would guess it is unrelated to the virtual override warning.

You could try using a debugger to find out exactly where it is crashing - I believe debug symbols are enabled by default in our build configuration.

You may also find these useful: https://eigen.tuxfamily.org/dox/group__TopicStlContainers.html https://eigen.tuxfamily.org/dox/group__DenseMatrixManipulation__Alignement.html

Cauchy4ier commented 4 years ago

Thank you for the response, I will give it a try.