fix: 摄像头亮度默认夜间

This commit is contained in:
2026-04-11 20:00:57 +08:00
parent f00d6661c0
commit 9009107a64
5 changed files with 202 additions and 3 deletions

View File

@@ -27,6 +27,33 @@ require_robot_command_center_root() {
export OMNISOCKETGO_ROOT="${OMNISOCKETGO_ROOT:-${DEFAULT_OMNISOCKETGO_ROOT}}"
omni_camera_device_was_set=0
omni_camera_profile_was_set=0
omni_camera_brightness_was_set=0
omni_camera_custom_ctrl_was_set=0
omni_camera_verify_was_set=0
if [[ "${OMNI_CAMERA_DEVICE+x}" == "x" ]]; then
omni_camera_device_was_set=1
preserved_omni_camera_device="${OMNI_CAMERA_DEVICE}"
fi
if [[ "${OMNI_CAMERA_PROFILE+x}" == "x" ]]; then
omni_camera_profile_was_set=1
preserved_omni_camera_profile="${OMNI_CAMERA_PROFILE}"
fi
if [[ "${OMNI_CAMERA_BRIGHTNESS+x}" == "x" ]]; then
omni_camera_brightness_was_set=1
preserved_omni_camera_brightness="${OMNI_CAMERA_BRIGHTNESS}"
fi
if [[ "${OMNI_CAMERA_CUSTOM_CTRL+x}" == "x" ]]; then
omni_camera_custom_ctrl_was_set=1
preserved_omni_camera_custom_ctrl="${OMNI_CAMERA_CUSTOM_CTRL}"
fi
if [[ "${OMNI_CAMERA_VERIFY+x}" == "x" ]]; then
omni_camera_verify_was_set=1
preserved_omni_camera_verify="${OMNI_CAMERA_VERIFY}"
fi
ENV_FILES=(
"${SCRIPT_DIR}/robot-remote.env"
"${SCRIPT_DIR}/robot-remote.env.local"
@@ -41,6 +68,22 @@ for env_file in "${ENV_FILES[@]}"; do
fi
done
if [[ "${omni_camera_device_was_set}" == "1" ]]; then
export OMNI_CAMERA_DEVICE="${preserved_omni_camera_device}"
fi
if [[ "${omni_camera_profile_was_set}" == "1" ]]; then
export OMNI_CAMERA_PROFILE="${preserved_omni_camera_profile}"
fi
if [[ "${omni_camera_brightness_was_set}" == "1" ]]; then
export OMNI_CAMERA_BRIGHTNESS="${preserved_omni_camera_brightness}"
fi
if [[ "${omni_camera_custom_ctrl_was_set}" == "1" ]]; then
export OMNI_CAMERA_CUSTOM_CTRL="${preserved_omni_camera_custom_ctrl}"
fi
if [[ "${omni_camera_verify_was_set}" == "1" ]]; then
export OMNI_CAMERA_VERIFY="${preserved_omni_camera_verify}"
fi
export OMNISOCKETGO_ROOT="${OMNISOCKETGO_ROOT:-${DEFAULT_OMNISOCKETGO_ROOT}}"
export ROBOT_COMMAND_CENTER_ROOT="${ROBOT_COMMAND_CENTER_ROOT:-$(dirname "${OMNISOCKETGO_ROOT}")/robot-command-center}"
@@ -72,6 +115,11 @@ export ROBOT_RECEIVER_OUTPUT_TOPIC="${ROBOT_RECEIVER_OUTPUT_TOPIC:-/hric/robot/c
export ROBOT_RECEIVER_FRAME_ID="${ROBOT_RECEIVER_FRAME_ID:-pelvis}"
export ROBOT_RECEIVER_WATCHDOG_TIMEOUT="${ROBOT_RECEIVER_WATCHDOG_TIMEOUT:-0.5}"
export ROBOT_RECEIVER_PUBLISH_RATE_HZ="${ROBOT_RECEIVER_PUBLISH_RATE_HZ:-100.0}"
export OMNI_CAMERA_DEVICE="${OMNI_CAMERA_DEVICE:-/dev/video0}"
export OMNI_CAMERA_PROFILE="${OMNI_CAMERA_PROFILE:-night}"
export OMNI_CAMERA_BRIGHTNESS="${OMNI_CAMERA_BRIGHTNESS:-}"
export OMNI_CAMERA_CUSTOM_CTRL="${OMNI_CAMERA_CUSTOM_CTRL:-}"
export OMNI_CAMERA_VERIFY="${OMNI_CAMERA_VERIFY:-0}"
export OMNI_VIDEO_SERVER_ADDR="${OMNI_VIDEO_SERVER_ADDR:-${ROBOT_SIDE_OMNISOCKET_SERVER_ADDR:-}}"
export OMNI_VIDEO_RELAY_VIA="${OMNI_VIDEO_RELAY_VIA:-${ROBOT_SIDE_OMNISOCKET_RELAY_VIA:-}}"
export OMNI_CONTROL_SERVER_ADDR="${OMNI_CONTROL_SERVER_ADDR:-${ROBOT_SIDE_OMNISOCKET_SERVER_ADDR:-}}"