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

run error in matlab version #3

Closed BrightAlex closed 10 months ago

BrightAlex commented 10 months ago

Thanks a lot for your work. In Matlab version of this project, it seems the 'DM' function appearing in 'LocomotionMPC_qpoases.m' has not been included. Here is the error message when I run the simulink model 'Hector_Simulation.slx'. (My environment is Matlab R2023a in Linux).

An error occurred while running the simulation and the simulation was terminated Caused by: Error due to multiple causes. Undefined function 'DM' for input arguments of type 'double'. Error evaluating MATLAB function in '[Hector_Simulation/Controllers/MPC Stance-leg/MPC controller](matlab:open_and_hilite_hyperlink ('Hector_Simulation/Controllers/MPC Stance-leg/MPC controller','error'))' Component:Simulink | Category:Model error

Could you help me to solve this problem? Many thanks!

junhengl commented 10 months ago

The DM variable type is from CasADi, please make sure you have CasADi matlab downloaded and included in your path.