// // Created by linbo on 2025/11/11. // #ifndef CMVR_ES_SOVLER_INTERFACE_H #define CMVR_ES_SOVLER_INTERFACE_H #include #include "rapidxml/xml_parser.h" #include "utils/solver/qp_solver.h" #include "utils/base/os.h" #include "utils/base/timer.h" #include "utils/base/ring_buffer.h" namespace cmvr::device { template class SolverInterface { public: SolverInterface(const SolverInterface&) = delete; SolverInterface& operator=(const SolverInterface&) = delete; static SolverInterface& getInstance(const XmlNode& cfg); static SolverInterface& getInstance(); static void destroyInstance(); private: explicit SolverInterface(const XmlNode &cfg); private: XmlNode cfg_; static std::once_flag init_flag_; static std::shared_ptr instance_; std::vector joint_names_; std::vector link_names_; std::shared_ptr> m_state_; std::shared_ptr> m_robot_; std::shared_ptr> m_cctrl_; }; } #endif //CMVR_ES_SOVLER_INTERFACE_H