diff --git a/cmvr-es/common/config/camera_config/camera_config.pb.txt b/cmvr-es/common/config/camera_config/camera_config.pb.txt index a33b8bc2..db18cd7e 100644 --- a/cmvr-es/common/config/camera_config/camera_config.pb.txt +++ b/cmvr-es/common/config/camera_config/camera_config.pb.txt @@ -10,11 +10,12 @@ realsense_cameras { align_mode: ALIGN_MODE_COLOR buffer_size: 30 sync: true + enable: false } uvc_cameras { id: "cam1" - usb: "/dev/video0" + usb: "/dev/uvc_left_camera" width: 640 height: 480 fps: 30 @@ -22,4 +23,5 @@ uvc_cameras { camera_mode: CAMERA_MODE_PHOTO stream_mode: STREAM_MODE_RGB buffer_size: 30 + enable: true } diff --git a/cmvr-es/common/config/dexhand_config/dexhand_config.pb.txt b/cmvr-es/common/config/dexhand_config/dexhand_config.pb.txt index 3ca234bd..e2d2d969 100644 --- a/cmvr-es/common/config/dexhand_config/dexhand_config.pb.txt +++ b/cmvr-es/common/config/dexhand_config/dexhand_config.pb.txt @@ -2,10 +2,12 @@ rh56dftp_dexhands { id: "hand1" ip: "192.168.1.213" port: 6000 + enable: false } rh56dftp_dexhands { id: "hand2" ip: "192.168.1.214" port: 6000 + enable: false } \ No newline at end of file diff --git a/cmvr-es/common/config/microphone_conifg/microphone_config.pb.txt b/cmvr-es/common/config/microphone_conifg/microphone_config.pb.txt index 237e4033..541151ea 100644 --- a/cmvr-es/common/config/microphone_conifg/microphone_config.pb.txt +++ b/cmvr-es/common/config/microphone_conifg/microphone_config.pb.txt @@ -3,4 +3,5 @@ ffmpeg_microphones { channels: 2 sampleRate: 44100 volume: 100 + enable: true } \ No newline at end of file diff --git a/cmvr-es/common/config/speaker_config/speaker_config.pb.txt b/cmvr-es/common/config/speaker_config/speaker_config.pb.txt index 6f7abc1a..318258de 100644 --- a/cmvr-es/common/config/speaker_config/speaker_config.pb.txt +++ b/cmvr-es/common/config/speaker_config/speaker_config.pb.txt @@ -1,3 +1,4 @@ ffmpeg_speakers { id: "spk1" + enable: true } \ No newline at end of file diff --git a/cmvr-es/device_manager/src/device_manager.cpp b/cmvr-es/device_manager/src/device_manager.cpp index fc9d35f8..2271a337 100644 --- a/cmvr-es/device_manager/src/device_manager.cpp +++ b/cmvr-es/device_manager/src/device_manager.cpp @@ -237,6 +237,8 @@ void DeviceManager::init_devices_() { for (int i = 0; i < camera_config.uvc_cameras().size(); i++) { auto cam = camera_config.uvc_cameras(i); + if (!cam.enable()) + continue; auto id = cam.id(); if (devices_.count(id)) { LOG(ERROR) << "[DeviceManager]: Duplicate Camera Device ID" << id; @@ -249,6 +251,8 @@ void DeviceManager::init_devices_() { } for (int i = 0; i < camera_config.realsense_cameras().size(); i++) { auto cam = camera_config.realsense_cameras(i); + if (!cam.enable()) + continue; auto id = cam.id(); if (devices_.count(id)) { LOG(ERROR) << "[DeviceManager]: Duplicate Camera Device ID" << id; @@ -264,6 +268,8 @@ void DeviceManager::init_devices_() { ConfigHelper::getDexHandsConfig(dexhand_cfg); for (int i = 0; i < dexhand_cfg.rh56dftp_dexhands().size(); i++) { auto dexhand = dexhand_cfg.rh56dftp_dexhands(i); + if (!dexhand.enable()) + continue; auto id = dexhand.id(); if (devices_.count(id)) { LOG(ERROR) << "[DeviceManager]: Duplicate DexHand Device ID" << id; @@ -295,6 +301,8 @@ void DeviceManager::init_devices_() { ConfigHelper::getMicroPhonesConfig(micro_phone_config); for (int i = 0; i < micro_phone_config.ffmpeg_microphones().size(); i++) { auto mic = micro_phone_config.ffmpeg_microphones(i); + if (!mic.enable()) + continue; auto id = mic.id(); if (devices_.count(id)) { LOG(ERROR) << "[DeviceManager]: Duplicate MicroPhone Device ID" << id; @@ -310,6 +318,8 @@ void DeviceManager::init_devices_() { ConfigHelper::getSpeakersConfig(speaker_config); for (int i = 0; i < speaker_config.ffmpeg_speakers().size(); i++) { auto speaker = speaker_config.ffmpeg_speakers(i); + if (!speaker.enable()) + continue; auto id = speaker.id(); if (devices_.count(id)) { LOG(ERROR) << "[DeviceManager]: Duplicate Speaker Device ID" << id; diff --git a/dependency/x86/third_party/grpc/v1.76.0/bin/grpc_cpp_plugin b/dependency/x86/third_party/grpc/v1.76.0/bin/grpc_cpp_plugin index 3576236b..d55fcc1b 100755 Binary files a/dependency/x86/third_party/grpc/v1.76.0/bin/grpc_cpp_plugin and b/dependency/x86/third_party/grpc/v1.76.0/bin/grpc_cpp_plugin differ diff --git a/protos/cmvr/config/camera_config/camera_config.proto b/protos/cmvr/config/camera_config/camera_config.proto index b83fc083..ee0235a2 100644 --- a/protos/cmvr/config/camera_config/camera_config.proto +++ b/protos/cmvr/config/camera_config/camera_config.proto @@ -32,6 +32,7 @@ message RealSenseCameraConfig { AlignMode align_mode = 9; int32 buffer_size = 10; bool sync = 11; + bool enable = 12; } // UVC摄像头 @@ -45,6 +46,7 @@ message UVCCameraConfig { CameraMode camera_mode = 7; StreamMode stream_mode = 8; int32 buffer_size = 9; + bool enable = 10; } // 主配置消息 - 统一管理所有摄像头 diff --git a/protos/cmvr/config/dexhand_config/dexhand_config.proto b/protos/cmvr/config/dexhand_config/dexhand_config.proto index e6a69a5b..85020216 100644 --- a/protos/cmvr/config/dexhand_config/dexhand_config.proto +++ b/protos/cmvr/config/dexhand_config/dexhand_config.proto @@ -5,7 +5,7 @@ message RH56DFTPDexHandConfig{ string id = 1; string ip = 2; int32 port = 3; - + bool enable = 4; } diff --git a/protos/cmvr/config/microphone_config/microphone_config.proto b/protos/cmvr/config/microphone_config/microphone_config.proto index 56cdac05..e98874f2 100644 --- a/protos/cmvr/config/microphone_config/microphone_config.proto +++ b/protos/cmvr/config/microphone_config/microphone_config.proto @@ -6,6 +6,7 @@ message FFMpegMicroPhoneConfig{ int32 channels = 2; int32 sampleRate = 3; int32 volume = 4; + bool enable = 5; } message MicroPhoneConfig{ diff --git a/protos/cmvr/config/speaker_config/speaker_conifg.proto b/protos/cmvr/config/speaker_config/speaker_conifg.proto index b3478494..7402b460 100644 --- a/protos/cmvr/config/speaker_config/speaker_conifg.proto +++ b/protos/cmvr/config/speaker_config/speaker_conifg.proto @@ -3,6 +3,7 @@ package cmvr.config; message FFMpegSpeakerConfig{ string id = 1; + bool enable = 2; } message SpeakerConfig{