Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running demo_quadruped.py gives malloc error #34

Closed
jviereck opened this issue Mar 20, 2019 · 1 comment
Closed

Running demo_quadruped.py gives malloc error #34

jviereck opened this issue Mar 20, 2019 · 1 comment

Comments

@jviereck
Copy link
Contributor

jviereck commented Mar 20, 2019

The current version of the demo_quadruped.py uses the tsid.SolverHQuadProgFast, which under debug mode yields a not allowed malloc error. When changing to tsid.SolverHQuadProg, this error goes away (though there is a new one due to reading of the contact force in the 3d PointContact case from invdyn.getContactForce(contact.name, sol) - that's a separate bug I look into tomorrow):

$ gdb -ex r --args python demo_quadruped.py

[...]

[SolverHQuadProgFast.qp solver] Resizing equality constraints from 0 to 18
[SolverHQuadProgFast.qp solver] Resizing inequality constraints from 0 to 20
[SolverHQuadProgFast.qp solver] Resizing Hessian from 0 to 26
Level 0
 - base-dynamics: w=1, equality, 6x26
 - BL_contact_force_constraint: w=1, inequality, 5x26
 - BR_contact_force_constraint: w=1, inequality, 5x26
 - FL_contact_force_constraint: w=1, inequality, 5x26
 - FR_contact_force_constraint: w=1, inequality, 5x26
Level 1
 - BL_contact_motion_task: w=1, equality, 3x26
 - BL_contact_force_reg_task: w=1e-05, equality, 3x26
 - BR_contact_motion_task: w=1, equality, 3x26
 - BR_contact_force_reg_task: w=1e-05, equality, 3x26
 - FL_contact_motion_task: w=1, equality, 3x26
 - FL_contact_force_reg_task: w=1e-05, equality, 3x26
 - FR_contact_motion_task: w=1, equality, 3x26
 - FR_contact_force_reg_task: w=1e-05, equality, 3x26
 - task-com: w=1, equality, 3x26
 - task-posture: w=0.001, equality, 8x26

[SolverHQuadProgFast.qp solver] Resizing equality constraints from 18 to 6
python: /usr/include/eigen3/Eigen/src/Core/util/Memory.h:206: void 
Eigen::internal::check_that_malloc_is_allowed(): Assertion `is_malloc_allowed() && "heap allocation is 
forbidden (EIGEN_RUNTIME_NO_MALLOC is defined and g_is_malloc_allowed is false)"' failed.

[...]

#10 0x00007fffc82dab26 in tsid::solvers::SolverHQuadProgFast::resize (this=0x1bb0cf0, n=26, neq=6, nin=20)
    at /home/jviereck/dev/tools/tsid/src/solvers/solver-HQP-eiquadprog-fast.cpp:58
58	        m_CE.resize(neq, n);
@andreadelprete
Copy link
Collaborator

Fixed by commit f4f9645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants