Skip to content

Multithreading memory safety of CppAdInterface #42

@ghost

Description

Hi,

Is CppAdInterface thread-safe? I used CppAdInterface for constraint and dynamics calculation but encountered some multithreading memory problems. On memory allocation/de-allocation of Eigen matrix or std::vector throughout the pipeline (from getting constraint Jacobian to the destruction of ocs2::ModelData), the debugger reports memory problem randomly including double free and invalid pointer. However with single threaded SLQ, everything is fine.

I didn't use the provided MPC-ROS interface; instead, I directly call run(...,...) of GaussNewtonDDP_MPC. The official example of anymal runs well on my computer so I think I may have ignored some important steps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions