Compare commits
2 Commits
viva_tech_
...
fix/pca968
Author | SHA1 | Date | |
---|---|---|---|
de8e22db1d | |||
3f31891de1 |
13
ansible/roles/microservices/files/robocar/car/configmap.yaml
Normal file
13
ansible/roles/microservices/files/robocar/car/configmap.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: robocar-pca9685
|
||||
data:
|
||||
################
|
||||
# STEERING PWM #
|
||||
################
|
||||
STEERING_LEFT_PWM: "1092"
|
||||
STEERING_RIGHT_PWM: "1986"
|
||||
STEERING_CENTER_PWM: "1583"
|
||||
|
@ -117,7 +117,10 @@ spec:
|
||||
mountPath: /dev
|
||||
env:
|
||||
- name: MQTT_BROKER
|
||||
value: localhost # because use host network
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_BROKER_HOST
|
||||
name: robocar
|
||||
- name: MQTT_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
@ -163,7 +166,7 @@ spec:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pca9685
|
||||
name: pca9685-steering
|
||||
annotations:
|
||||
reloader.stakater.com/auto: "true"
|
||||
spec:
|
||||
@ -181,20 +184,15 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: pca9685
|
||||
image: docker.io/cyrilix/robocar-pca9685
|
||||
image: docker.io/cyrilix/robocar-pca9685-python
|
||||
args:
|
||||
- "--mqtt-retain=false"
|
||||
- "--throttle-channel=15"
|
||||
- "--steering-channel=14"
|
||||
- "--throttle-zero-pwm=$(THROTTLE_ZERO_PWM)"
|
||||
- "--throttle-min-pwm=$(THROTTLE_MIN_PWM)"
|
||||
- "--throttle-max-pwm=$(THROTTLE_MAX_PWM)"
|
||||
- "--steering-left-pwm=$(STEERING_LEFT_PWM)"
|
||||
- "--steering-right-pwm=$(STEERING_RIGHT_PWM)"
|
||||
- "--steering-center-pwm=$(STEERING_CENTER_PWM)"
|
||||
- "--pwm-freq=60"
|
||||
- "--update-pwm-frequency=25"
|
||||
- "--log=info"
|
||||
- "steering"
|
||||
- "--i2c-bus=1"
|
||||
- "--i2c-address=40"
|
||||
- "--pca9685-channel=0"
|
||||
- "--left-pulse=$(STEERING_LEFT_PWM)"
|
||||
- "--right-pulse=$(STEERING_RIGHT_PWM)"
|
||||
- "--debug"
|
||||
securityContext:
|
||||
runAsUser: 1234
|
||||
runAsGroup: 998 # Set 998/i2c group to access to i2c device
|
||||
@ -206,7 +204,7 @@ spec:
|
||||
- name: MQTT_BROKER
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_BROKER
|
||||
key: MQTT_BROKER_HOST
|
||||
name: robocar
|
||||
- name: MQTT_USERNAME
|
||||
valueFrom:
|
||||
@ -219,13 +217,8 @@ spec:
|
||||
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
|
||||
value: rc-pca9685-steering
|
||||
- name: MQTT_TOPIC
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_STEERING
|
||||
@ -235,33 +228,89 @@ spec:
|
||||
- name: STEERING_LEFT_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-steering-pwm
|
||||
name: robocar-pca9685
|
||||
key: STEERING_LEFT_PWM
|
||||
- name: STEERING_RIGHT_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-steering-pwm
|
||||
name: robocar-pca9685
|
||||
key: STEERING_RIGHT_PWM
|
||||
- name: STEERING_CENTER_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-steering-pwm
|
||||
name: robocar-pca9685
|
||||
key: STEERING_CENTER_PWM
|
||||
- name: THROTTLE_MIN_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-throttle-pwm
|
||||
key: THROTTLE_MIN_PWM
|
||||
- name: THROTTLE_MAX_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-throttle-pwm
|
||||
key: THROTTLE_MAX_PWM
|
||||
- name: THROTTLE_ZERO_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-throttle-pwm
|
||||
key: THROTTLE_ZERO_PWM
|
||||
- name: TZ
|
||||
value: "Europe/Paris"
|
||||
volumes:
|
||||
- name: i2c
|
||||
hostPath:
|
||||
path: /dev/i2c-1
|
||||
type: CharDevice
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pca9685-throttle
|
||||
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-throttle
|
||||
image: docker.io/cyrilix/robocar-pca9685-python
|
||||
args:
|
||||
- "throttle"
|
||||
- "--zero-pulse=378"
|
||||
- "--min-pulse=250"
|
||||
- "--max-pulse=500"
|
||||
- "--i2c-bus=1"
|
||||
- "--i2c-address=40"
|
||||
- "--pca9685-channel=1"
|
||||
- "--debug"
|
||||
securityContext:
|
||||
runAsUser: 1234
|
||||
runAsGroup: 998 # Set 998/i2c group to access to i2c device
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /dev/i2c-1
|
||||
name: i2c
|
||||
env:
|
||||
- name: MQTT_BROKER
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_BROKER_HOST
|
||||
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-throttle
|
||||
- name: MQTT_TOPIC
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_THROTTLE
|
||||
name: robocar
|
||||
- name: MQTT_QOS
|
||||
value: "0"
|
||||
- name: TZ
|
||||
value: "Europe/Paris"
|
||||
volumes:
|
||||
|
@ -7,13 +7,14 @@ namespace: robocar
|
||||
resources:
|
||||
- ../common
|
||||
- deployments.yaml
|
||||
- configmap.yaml
|
||||
|
||||
images:
|
||||
- name: docker.io/cyrilix/robocar-camera
|
||||
newTag: v0.3.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-pca9685
|
||||
newTag: v0.6.4
|
||||
- name: docker.io/cyrilix/robocar-pca9685-python
|
||||
newTag: v0.1.0-12-g2966f92
|
||||
|
||||
- name: docker.io/cyrilix/robocar-oak-camera
|
||||
newTag: v0.1.0
|
@ -4,11 +4,12 @@ metadata:
|
||||
name: robocar
|
||||
data:
|
||||
# Broker configuration
|
||||
MQTT_BROKER_HOST: mqtt.robocar.svc.cluster.local
|
||||
MQTT_BROKER: "tcp://mqtt.robocar.svc.cluster.local:1883"
|
||||
MQTT_BROKER_HOST: 192.168.2.221
|
||||
MQTT_BROKER: "tcp://192.168.2.221:1883"
|
||||
#MQTT_BROKER: "tcp://mqtt.robocar.svc.cluster.local:1883"
|
||||
|
||||
# Camera
|
||||
MQTT_TOPIC_CAMERA: car/satanas/part/camera/color
|
||||
MQTT_TOPIC_CAMERA: car/satanas/part/camera/camera/color
|
||||
MQTT_TOPIC_CAMERA_OAK_COLOR: car/satanas/part/camera/color
|
||||
|
||||
|
||||
@ -40,15 +41,8 @@ data:
|
||||
############
|
||||
# Throttle #
|
||||
############
|
||||
# Min value to start is 0.12
|
||||
# Good value for manual: 0.15
|
||||
#THROTTLE_MIN: "0.15"
|
||||
#THROTTLE_MAX: "0.15"
|
||||
|
||||
THROTTLE_MIN: "0.19"
|
||||
THROTTLE_MAX: "0.19"
|
||||
|
||||
|
||||
THROTTLE_MIN: "0.3"
|
||||
THROTTLE_MAX: "0.4"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
@ -61,21 +55,7 @@ data:
|
||||
STEERING_LEFT_PWM: "1002"
|
||||
STEERING_RIGHT_PWM: "1985"
|
||||
STEERING_CENTER_PWM: "1491"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: robocar-throttle-pwm
|
||||
data:
|
||||
################
|
||||
# THROTTLE PWM #
|
||||
################
|
||||
#THROTTLE_MIN_PWM: "1092"
|
||||
#THROTTLE_MAX_PWM: "1986"
|
||||
#THROTTLE_ZERO_PWM: "1583"
|
||||
THROTTLE_MIN_PWM: "960"
|
||||
THROTTLE_MAX_PWM: "1949"
|
||||
THROTTLE_ZERO_PWM: "1452"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
@ -100,17 +80,10 @@ metadata:
|
||||
name: robocar-models
|
||||
data:
|
||||
# model to use for steering
|
||||
MODEL_STEERING: model_categorical_160x120h0_edgetpu.tflite
|
||||
#MODEL_STEERING: model_categorical_160x120h0_edgetpu.tflite
|
||||
|
||||
#MODEL_STEERING: model_linear_160x120h40_edgetpu.tflite
|
||||
|
||||
|
||||
#MODEL_STEERING: model_linear_160x120h20_edgetpu.tflite
|
||||
#MODEL_STEERING: model_categorical_160x120h20_edgetpu.tflite
|
||||
|
||||
|
||||
#MODEL_STEERING: model_linear_160x120h50_edgetpu.tflite
|
||||
MODEL_STEERING: model_160x120h0_edgetpu.tflite
|
||||
MODEL_STEERING3: model_edgetpu.tflite
|
||||
MODEL_STEERING4: model_160x120h20_edgetpu.tflite
|
||||
MODEL_STEERING2: model-sim-bigimg_edgetpu.tflite
|
||||
|
||||
MODEL_IMAGE_WIDTH: "160"
|
||||
MODEL_IMAGE_HEIGHT: "120"
|
||||
|
@ -28,12 +28,9 @@ spec:
|
||||
- "--steering-left-pwm=$(STEERING_LEFT_PWM)"
|
||||
- "--steering-right-pwm=$(STEERING_RIGHT_PWM)"
|
||||
- "--steering-center-pwm=$(STEERING_CENTER_PWM)"
|
||||
- "--throttle-zero-pwm=$(THROTTLE_ZERO_PWM)"
|
||||
- "--throttle-min-pwm=$(THROTTLE_MIN_PWM)"
|
||||
- "--throttle-max-pwm=$(THROTTLE_MAX_PWM)"
|
||||
- "-log=info"
|
||||
volumeMounts:
|
||||
- mountPath: "/dev/ttyAMA0"
|
||||
- mountPath: "/dev/ttyAMA1"
|
||||
name: serial
|
||||
securityContext:
|
||||
privileged: true
|
||||
@ -94,28 +91,12 @@ spec:
|
||||
configMapKeyRef:
|
||||
name: robocar-steering-pwm
|
||||
key: STEERING_CENTER_PWM
|
||||
|
||||
- name: THROTTLE_MIN_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-throttle-pwm
|
||||
key: THROTTLE_MIN_PWM
|
||||
- name: THROTTLE_MAX_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-throttle-pwm
|
||||
key: THROTTLE_MAX_PWM
|
||||
- name: THROTTLE_ZERO_PWM
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: robocar-throttle-pwm
|
||||
key: THROTTLE_ZERO_PWM
|
||||
- name: TZ
|
||||
value: "Europe/Paris"
|
||||
volumes:
|
||||
- name: serial
|
||||
hostPath:
|
||||
path: /dev/ttyAMA0
|
||||
path: /dev/ttyAMA1
|
||||
type: CharDevice
|
||||
|
||||
---
|
||||
@ -226,6 +207,9 @@ spec:
|
||||
args:
|
||||
- "--model=/model/$(MODEL_STEERING)"
|
||||
- "--edge-verbosity=0"
|
||||
- "--img-width=$(MODEL_IMAGE_WIDTH)"
|
||||
- "--img-height=$(MODEL_IMAGE_HEIGHT)"
|
||||
- "--horizon=$(HORIZON)"
|
||||
- "--log=info"
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
@ -259,7 +243,7 @@ spec:
|
||||
- name: MQTT_TOPIC_CAMERA
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
key: MQTT_TOPIC_CAMERA_OAK_COLOR
|
||||
key: MQTT_TOPIC_CAMERA
|
||||
name: robocar
|
||||
- name: MQTT_TOPIC_STEERING
|
||||
valueFrom:
|
||||
@ -399,7 +383,7 @@ spec:
|
||||
image: docker.io/cyrilix/robocar-throttle
|
||||
args:
|
||||
- "-mqtt-retain=false"
|
||||
- "-log=info"
|
||||
- "-debug=false"
|
||||
securityContext:
|
||||
runAsUser: 1234
|
||||
runAsGroup: 1234
|
||||
@ -596,7 +580,7 @@ metadata:
|
||||
reloader.stakater.com/auto: "true"
|
||||
spec:
|
||||
revisionHistoryLimit: 0
|
||||
replicas: 0
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
|
@ -8,6 +8,5 @@ metadata:
|
||||
subsets:
|
||||
- addresses:
|
||||
- ip: 192.168.2.221
|
||||
# - ip: 192.168.217.19
|
||||
ports:
|
||||
- port: 1883
|
@ -10,26 +10,25 @@ resources:
|
||||
|
||||
images:
|
||||
- name: docker.io/cyrilix/robocar-arduino
|
||||
newTag: v0.8.0
|
||||
newTag: v0.6.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-led
|
||||
newTag: v0.5.1
|
||||
|
||||
- name: docker.io/cyrilix/robocar-steering-tflite-edgetpu
|
||||
#newTag: v0.5.0
|
||||
newTag: v0.5.0-1-gbc90193
|
||||
|
||||
- name: docker.io/cyrilix/robocar-throttle
|
||||
newTag: v0.5.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-steering-tflite-edgetpu
|
||||
newTag: v0.4.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-throttle
|
||||
newTag: v0.4.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-record
|
||||
newTag: v0.5.1
|
||||
newTag: v0.5.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-recorder-store
|
||||
newTag: v0.2.1
|
||||
newTag: v0.2.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-steering
|
||||
newTag: v0.5.1
|
||||
newTag: v0.5.0
|
||||
|
||||
- name: docker.io/cyrilix/robocar-road
|
||||
newTag: v0.2.0
|
||||
newTag: v0.1.0-5-gdc6e465
|
||||
|
@ -11,4 +11,4 @@ resources:
|
||||
|
||||
images:
|
||||
- name: docker.io/cyrilix/robocar-simulator
|
||||
newTag: v0.4.1
|
||||
newTag: v0.4.0
|
||||
|
Reference in New Issue
Block a user