// // Created by lgv on 2025/8/13. // #include #include #include #include // for std::atof #include #include "../src/device_manager/include/device_manager.h" #include using namespace cmvr::device; int main(int argc, char* argv[]) { // 这里按你的原代码结构获取 robot std::string config_path = "/home/lgv/cmvr/cmvr-es/config/cabin_robot.xml"; const XmlNode config(config_path); if (!config.hasChild("DeviceManager")) { LOG(ERROR) << "Device Manager node not found"; return 1; } auto dmgr_cfg = config.getChild("DeviceManager"); auto &dmgr = DeviceManager::getInstance(dmgr_cfg); auto robot = dmgr.getDevice("hc01"); robot->eStop(); std::this_thread::sleep_for(std::chrono::milliseconds(500)); return 0; }