update robot config
This commit is contained in:
parent
3edbd1dc34
commit
2e01a6035a
@ -312,6 +312,24 @@ void DeviceManager::init_devices_() {
|
||||
LOG(INFO) << "[DeviceManager]: Init Robot " << id << " Success";
|
||||
}
|
||||
|
||||
// EYOU的先用新版的
|
||||
config::RobotConfig robot_config;
|
||||
ConfigHelper::getRobotConfig(robot_config);
|
||||
for (int i = 0; i < robot_config.ethercat_robots().size(); i++) {
|
||||
auto robot = robot_config.ethercat_robots(i);
|
||||
if (!robot.enable())
|
||||
continue;
|
||||
auto id = robot.id();
|
||||
if (devices_.count(id)) {
|
||||
LOG(ERROR) << "[DeviceManager]: Duplicate Robot Device ID" << id;
|
||||
throw runtime_error("[DeviceManager]: Duplicate Robot Device ID" + id);
|
||||
}
|
||||
std::cout << "DexHand[" << i << "]: " << id << std::endl;
|
||||
auto device = dev_factory_->createFromConfig<AbstractRobot,config::EthercatRobotConfig>(robot);
|
||||
devices_[id] = device;
|
||||
std::get<std::shared_ptr<AbstractRobot>>(devices_[id])->init();
|
||||
}
|
||||
|
||||
config::MicroPhoneConfig micro_phone_config;
|
||||
ConfigHelper::getMicroPhonesConfig(micro_phone_config);
|
||||
for (int i = 0; i < micro_phone_config.ffmpeg_microphones().size(); i++) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user