DRCL-USC / Hector_Simulation

Simulation Software (ROS/MATLAB) for HECTOR Humanoid Robot Locomotion Control/Bipedal Locomotion Control/Force-and-moment-based MPC
https://youtu.be/NcW-NFwjMh0
Other
370 stars 115 forks source link

About the horizonLength of MPC controllor #12

Closed gaiyi7788 closed 8 months ago

gaiyi7788 commented 8 months ago

Outstanding work!

I hope to try changing the horizonLength of the MPC controllor to see how the controllor works. However, when I turn the horizonLength to less than 10, the following error happened:

hector_ctrl: malloc.c:4036: _int_malloc: Assertion (unsigned long) (size) >= (unsigned long) (nb) failed.

Could you give me some advice, thank you!

junhengl commented 8 months ago

Hi there, this code structure is not really meant to be used with shorter than 10 horizon length. You may want to rewrite some of the gait planning and contact schedule section of the code to reach this autonomy. Feel free to modify those in convexMPCLocomotion.cpp

gaiyi7788 commented 8 months ago

Got it! Thank you for the timely reply!