2022-01-02 16:33:18 +00:00
---
apiVersion : apps/v1
kind : Deployment
metadata :
name : camera
annotations :
reloader.stakater.com/auto : "true"
spec :
revisionHistoryLimit : 0
2022-01-28 17:07:36 +00:00
replicas : 0
2022-01-02 16:33:18 +00:00
strategy :
type : Recreate
selector :
matchLabels :
component : camera
template :
metadata :
labels :
component : camera
spec :
containers :
- name : camera
image : docker.io/cyrilix/robocar-camera
args :
- "-mqtt-pub-frequency=$(MQTT_CAMERA_PUB_FREQUENCY)"
- "-video-device=0"
- "-video-width=$(CAMERA_WIDTH)"
- "-video-height=$(CAMERA_HEIGHT)"
2022-01-28 17:05:36 +00:00
- "-log=info"
2022-01-02 16:33:18 +00:00
securityContext :
runAsUser : 1234
runAsGroup : 44 # Set 44/video group to access to video device
privileged : true
volumeMounts :
- name : camera-device
mountPath : /dev/video0
env :
- name : MQTT_BROKER
valueFrom :
configMapKeyRef :
key : MQTT_BROKER
name : robocar
- name : MQTT_USERNAME
valueFrom :
secretKeyRef :
key : MQTT_USERNAME
name : mqtt-credentials
- name : MQTT_PASSWORD
valueFrom :
secretKeyRef :
key : MQTT_PASSWORD
name : mqtt-credentials
- name : MQTT_CLIENT_ID
value : rc-camera
- name : MQTT_TOPIC
valueFrom :
configMapKeyRef :
key : MQTT_TOPIC_CAMERA
name : robocar
- name : CAMERA_WIDTH
valueFrom :
configMapKeyRef :
key : CAMERA_WIDTH
name : robocar-camera
- name : CAMERA_HEIGHT
valueFrom :
configMapKeyRef :
key : CAMERA_HEIGHT
name : robocar-camera
- name : MQTT_CAMERA_PUB_FREQUENCY
valueFrom :
configMapKeyRef :
key : MQTT_CAMERA_PUB_FREQUENCY
name : robocar-camera
- name : MQTT_QOS
value : "0"
- name : TZ
value : "Europe/Paris"
volumes :
- name : camera-device
hostPath :
path : "/dev/video0"
type : CharDevice
2022-01-28 17:07:36 +00:00
---
apiVersion : apps/v1
kind : Deployment
metadata :
name : oak-camera
annotations :
reloader.stakater.com/auto : "true"
spec :
revisionHistoryLimit : 0
replicas : 1
strategy :
type : Recreate
selector :
matchLabels :
component : oak-camera
template :
metadata :
labels :
component : oak-camera
spec :
containers :
- name : camera
2022-11-11 17:03:22 +00:00
image : git.cyrilix.bzh/robocars/robocar-oak-camera
2022-01-28 17:07:36 +00:00
args :
- "--image-width=$(CAMERA_WIDTH)"
- "--image-height=$(CAMERA_HEIGHT)"
2022-09-04 16:05:32 +00:00
- "--objects-threshold=$(THRESHOLD_OBJECTS)"
2024-01-13 17:26:23 +00:00
- "--camera-fps=$(CAMERA_FPS)"
2022-11-11 17:03:22 +00:00
- "--log=info"
2024-01-26 11:25:36 +00:00
- "--camera-tuning-exposition=8300us"
#- "--camera-tuning-exposition=500us"
2024-03-09 15:00:54 +00:00
- "--stereo-mode-lr-check" # remove incorrectly calculated disparity pixels due to occlusions at object borders
- "--stereo-mode-extended-disparity" # allows detecting closer distance objects for the given baseline. This increases the maximum disparity search from 96 to 191, meaning the range is now: [ 0..190 ]
- "--stereo-mode-subpixel" # improves the precision and is especially useful for long range measurements
#- "--stereo-post-processing-median-filter"
#- "--stereo-post-processing-median-value=KERNEL_7x7" #{MEDIAN_OFF,KERNEL_3x3,KERNEL_5x5,KERNEL_7x7}
- "--stereo-post-processing-speckle-filter"
- "--stereo-post-processing-speckle-enable=true"
- "--stereo-post-processing-speckle-range=200"
#- "--stereo-post-processing-temporal-filter"
#- "--stereo-post-processing-temporal-persistency-mode=VALID_2_IN_LAST_4" # {PERSISTENCY_OFF,VALID_8_OUT_OF_8,VALID_2_IN_LAST_3,VALID_2_IN_LAST_4,VALID_2_OUT_OF_8,VALID_1_IN_LAST_2,VALID_1_IN_LAST_5,VALID_1_IN_LAST_8,PERSISTENCY_INDEFINITELY}
#- "--stereo-post-processing-temporal-alpha=0.4"
#- "--stereo-post-processing-temporal-delta=0"
- "--stereo-post-processing-spatial-filter"
- "--stereo-post-processing-spatial-enable=true"
- "--stereo-post-processing-spatial-hole-filling-radius=4"
#- "--stereo-post-processing-spatial-alpha=0.5"
#- "--stereo-post-processing-spatial-delta=0"
- "--stereo-post-processing-spatial-num-iterations=1"
- "--stereo-post-processing-threshold-filter"
- "--stereo-post-processing-threshold-min-range=1450"
- "--stereo-post-processing-threshold-max-range=15000"
#- "--stereo-post-processing-decimation-filter"
#- "--stereo-post-processing-decimation-decimal-factor=2" # {1,2,3,4}
#- "--stereo-post-processing-decimation-mode=PIXEL_SKIPPING" # {PIXEL_SKIPPING,NON_ZERO_MEDIAN,NON_ZERO_MEAN}
2022-01-28 17:07:36 +00:00
securityContext :
2024-01-13 17:26:23 +00:00
runAsUser : 0
2022-01-28 17:07:36 +00:00
privileged : true
volumeMounts :
- name : sys
mountPath : /sys
- name : dev
mountPath : /dev
env :
2022-10-07 12:42:25 +00:00
- name : MQTT_BROKER_HOST
2022-06-07 17:11:15 +00:00
value : localhost # because use host network
2022-10-07 12:42:25 +00:00
- name : MQTT_BROKER_PORT
value : "30183"
2022-01-28 17:07:36 +00:00
- name : MQTT_USERNAME
valueFrom :
secretKeyRef :
key : MQTT_USERNAME
name : mqtt-credentials
- name : MQTT_PASSWORD
valueFrom :
secretKeyRef :
key : MQTT_PASSWORD
name : mqtt-credentials
- name : MQTT_CLIENT_ID
value : rc-oak-camera
- name : MQTT_TOPIC_CAMERA
valueFrom :
configMapKeyRef :
key : MQTT_TOPIC_CAMERA_OAK_COLOR
name : robocar
2022-09-04 16:05:32 +00:00
- name : MQTT_TOPIC_OBJECTS
valueFrom :
configMapKeyRef :
key : MQTT_TOPIC_OBJECTS
name : robocar
2024-03-09 15:00:54 +00:00
- name : MQTT_TOPIC_DISPARITY
valueFrom :
configMapKeyRef :
key : MQTT_TOPIC_CAMERA_DISPARITY
name : robocar
2022-09-04 16:05:32 +00:00
- name : THRESHOLD_OBJECTS
valueFrom :
configMapKeyRef :
2022-11-11 17:03:22 +00:00
key : OBJECTS_THRESHOLD
2022-09-04 16:05:32 +00:00
name : robocar-objects
2024-01-13 17:26:23 +00:00
- name : CAMERA_FPS
valueFrom :
configMapKeyRef :
key : CAMERA_FPS
name : robocar-camera
2022-01-28 17:07:36 +00:00
- name : CAMERA_WIDTH
valueFrom :
configMapKeyRef :
key : CAMERA_WIDTH
name : robocar-camera
- name : CAMERA_HEIGHT
valueFrom :
configMapKeyRef :
key : CAMERA_HEIGHT
name : robocar-camera
- name : MQTT_QOS
value : "0"
2024-01-26 11:25:36 +00:00
#- name: DEPTHAI_LEVEL
# value: debug
2022-01-28 17:07:36 +00:00
- name : TZ
value : "Europe/Paris"
hostNetwork : true
volumes :
- name : sys
hostPath :
path : /sys
- name : dev
hostPath :
path : "/dev"
2022-01-02 16:33:18 +00:00
---
apiVersion : apps/v1
kind : Deployment
metadata :
name : pca9685
annotations :
reloader.stakater.com/auto : "true"
spec :
revisionHistoryLimit : 0
replicas : 1
strategy :
type : Recreate
selector :
matchLabels :
component : pca9685
template :
metadata :
labels :
component : pca9685
spec :
containers :
- name : pca9685
2022-01-28 17:05:36 +00:00
image : docker.io/cyrilix/robocar-pca9685
2022-01-02 16:33:18 +00:00
args :
2022-01-28 17:05:36 +00:00
- "--mqtt-retain=false"
2022-06-07 16:53:13 +00:00
- "--throttle-channel=15"
2024-01-13 17:26:23 +00:00
- "--steering-channel=13"
2022-09-04 16:05:32 +00:00
- "--throttle-zero-pwm=$(THROTTLE_PCA9685_ZERO_PWM)"
- "--throttle-min-pwm=$(THROTTLE_PCA9685_MIN_PWM)"
- "--throttle-max-pwm=$(THROTTLE_PCA9685_MAX_PWM)"
- "--steering-left-pwm=$(STEERING_PCA9685_LEFT_PWM)"
- "--steering-right-pwm=$(STEERING_PCA9685_RIGHT_PWM)"
- "--steering-center-pwm=$(STEERING_PCA9685_CENTER_PWM)"
- "--pwm-freq=50"
2022-06-16 14:02:57 +00:00
- "--update-pwm-frequency=25"
2022-01-28 17:05:36 +00:00
- "--log=info"
2022-01-02 16:33:18 +00:00
securityContext :
2022-05-30 12:28:33 +00:00
runAsUser : 1234
runAsGroup : 998 # Set 998/i2c group to access to i2c device
2022-01-02 16:33:18 +00:00
privileged : true
volumeMounts :
- mountPath : /dev/i2c-1
name : i2c
2022-09-04 16:05:32 +00:00
envFrom :
- configMapRef :
name : robocar-pca9685-pwm
2022-01-02 16:33:18 +00:00
env :
- name : MQTT_BROKER
valueFrom :
configMapKeyRef :
key : MQTT_BROKER
name : robocar
- name : MQTT_USERNAME
valueFrom :
secretKeyRef :
key : MQTT_USERNAME
name : mqtt-credentials
- name : MQTT_PASSWORD
valueFrom :
secretKeyRef :
key : MQTT_PASSWORD
name : mqtt-credentials
- name : MQTT_CLIENT_ID
value : rc-pca9685
- name : MQTT_TOPIC_THROTTLE
valueFrom :
configMapKeyRef :
key : MQTT_TOPIC_THROTTLE
name : robocar
- name : MQTT_TOPIC_STEERING
valueFrom :
configMapKeyRef :
key : MQTT_TOPIC_STEERING
name : robocar
- name : MQTT_QOS
value : "0"
- name : TZ
value : "Europe/Paris"
volumes :
- name : i2c
hostPath :
path : /dev/i2c-1
type : CharDevice