32 Commits

Author SHA1 Message Date
8b6ee0cc06 disable debug logs 2022-06-10 16:09:47 +02:00
140e3509be disable road microservice 2022-06-10 16:09:30 +02:00
c915e2b957 feat: add linear models and autodetect models configuration 2022-06-10 16:09:03 +02:00
1123071750 tune: fix PWM and min/max throttke 2022-06-10 16:07:51 +02:00
1bfb3d1930 fix: bad camera topic 2022-06-10 16:07:17 +02:00
4663a545df chore: bump robocar-simulator to v0.4.1
refs robocars/robocar-setup#3
2022-06-09 18:16:02 +02:00
94773908e6 chore: bump robocar-road to v0.2.0
refs robocars/robocar-setup#3
2022-06-09 17:54:41 +02:00
48b2abd99b chore: bump robocar-pca9685 to v0.6.1
refs robocars/robocar-setup#3
2022-06-09 16:34:37 +02:00
4eb2084ce6 chore: bump robocar-steering to v0.5.1
refs robocars/robocar-setup#3
2022-06-09 16:12:45 +02:00
c25fa4b13b chore: bump robocar-recorder-store to v0.2.1
refs robocars/robocar-setup#3
2022-06-08 21:10:13 +02:00
1fdd3932d6 chore: bump robocar-record to v0.5.1
refs robocars/robocar-setup#3
2022-06-08 20:53:14 +02:00
aa9443c7ff chore: bump robocar-throttle to v0.4.2
refs robocars/robocar-setup#3
2022-06-08 20:42:26 +02:00
300ed78b2a chore: bump robocar-steering-tflite-edgetpu to v0.5.1
refs robocars/robocar-setup#3
2022-06-08 20:27:48 +02:00
2eb1fe3b10 chore: bump robocar-led to v0.5.1
refs robocars/robocar-setup#3
2022-06-07 23:56:17 +02:00
8d259c3311 chore: bump robocar-arduino to v0.7.1
refs robocars/robocar-setup#3
2022-06-07 19:54:10 +02:00
3c80b4a970 feat(k8s): use mqtt service endpoint url
closes #1
2022-06-07 19:13:38 +02:00
d558415684 chore(k8s): bump robocar-throttle image 2022-06-07 18:54:36 +02:00
74d54c14b5 debug(arduino): disable debug logs 2022-06-07 18:53:46 +02:00
6d6cd5b26e refactor: move steering/throttle pin after car rebuilding 2022-06-07 18:53:13 +02:00
b21171cecb freeze arduino image 2022-06-07 18:52:36 +02:00
bbf4328e6c refactor: unify pwm config for arduino and pca9685 2022-06-07 18:51:53 +02:00
e1602339ee freeze: robocar-pca9685 OK 2022-05-30 16:16:33 +02:00
1dde1786f6 fix: bad throttle pwm parameters 2022-05-30 15:01:00 +02:00
d3071a5abf clean: pca9685 deployment 2022-05-30 14:28:33 +02:00
e0955aac8f It's working! 2022-05-30 14:24:48 +02:00
d1bfafba1a clean: remove old files 2022-05-19 15:04:45 +02:00
64a72482e7 fix: bad mqtt topic for oak-camera 2022-05-19 15:04:10 +02:00
e13e5026b5 race: fix configurations 2022-02-19 20:11:41 +01:00
182a3d447b feat(µservice): run oak-camera as non root 2022-01-28 18:36:54 +01:00
e71eb6d66d freeze oak-camera microservice version 2022-01-28 18:15:01 +01:00
43bd45926a freeze arduino microservice version 2022-01-28 18:14:39 +01:00
f1c20b3de2 feat: replace rpi camera with oak camera 2022-01-28 18:07:36 +01:00
12 changed files with 154 additions and 67 deletions

View File

@ -1 +1,2 @@
# Set group on camera device
SUBSYSTEM=="vchiq", GROUP="video", MODE="0660"

View File

@ -0,0 +1 @@
SUBSYSTEM=="usb", ATTRS{idVendor}=="03e7", MODE="0666"

View File

@ -30,11 +30,14 @@
# notify: reboot
- name: Set group on camera device
- name: Add udev rules
copy:
src: 10-vchiq-permissions.rules
dest: /etc/udev/rules.d/10-vchiq-permissions.rules
src: "{{ item }}"
dest: /etc/udev/rules.d/{{ item }}
notify: reboot
with_items:
- 10-vchiq-permissions.rules
- 80-movidius.rules
- name: Set groups to pi user

View File

@ -1,13 +0,0 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: robocar-pca9685
data:
################
# STEERING PWM #
################
STEERING_LEFT_PWM: "1092"
STEERING_RIGHT_PWM: "1986"
STEERING_CENTER_PWM: "1583"

View File

@ -7,7 +7,7 @@ metadata:
reloader.stakater.com/auto: "true"
spec:
revisionHistoryLimit: 0
replicas: 1
replicas: 0
strategy:
type: Recreate
selector:
@ -81,6 +81,84 @@ spec:
hostPath:
path: "/dev/video0"
type: CharDevice
---
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
image: docker.io/cyrilix/robocar-oak-camera
args:
- "--image-width=$(CAMERA_WIDTH)"
- "--image-height=$(CAMERA_HEIGHT)"
securityContext:
runAsUser: 1234
privileged: true
volumeMounts:
- name: sys
mountPath: /sys
- name: dev
mountPath: /dev
env:
- name: MQTT_BROKER
value: localhost # because use host network
- 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
- 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"
- name: TZ
value: "Europe/Paris"
hostNetwork: true
volumes:
- name: sys
hostPath:
path: /sys
- name: dev
hostPath:
path: "/dev"
---
apiVersion: apps/v1
kind: Deployment
@ -106,15 +184,15 @@ spec:
image: docker.io/cyrilix/robocar-pca9685
args:
- "--mqtt-retain=false"
- "--throttle-channel=1"
- "--steering-channel=0"
- "--throttle-zero-pwm=378"
- "--throttle-min-pwm=250"
- "--throttle-max-pwm=500"
- "--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)"
- "--update-pwm-frequency=10"
- "--update-pwm-frequency=25"
- "--log=info"
securityContext:
runAsUser: 1234
@ -156,18 +234,33 @@ spec:
- name: STEERING_LEFT_PWM
valueFrom:
configMapKeyRef:
name: robocar-pca9685
name: robocar-steering-pwm
key: STEERING_LEFT_PWM
- name: STEERING_RIGHT_PWM
valueFrom:
configMapKeyRef:
name: robocar-pca9685
name: robocar-steering-pwm
key: STEERING_RIGHT_PWM
- name: STEERING_CENTER_PWM
valueFrom:
configMapKeyRef:
name: robocar-pca9685
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:

View File

@ -7,11 +7,13 @@ 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.4.0-1-gc42086a
newTag: v0.6.1
- name: docker.io/cyrilix/robocar-oak-camera
newTag: v0.1.0

View File

@ -4,11 +4,12 @@ metadata:
name: robocar
data:
# Broker configuration
MQTT_BROKER_HOST: localhost
MQTT_BROKER: "tcp://192.168.2.221:1883"
MQTT_BROKER_HOST: mqtt.robocar.svc.cluster.local
MQTT_BROKER: "tcp://mqtt.robocar.svc.cluster.local:1883"
# Camera
MQTT_TOPIC_CAMERA: car/satanas/part/camera
MQTT_TOPIC_CAMERA: car/satanas/part/camera/color
MQTT_TOPIC_CAMERA_OAK_COLOR: car/satanas/part/camera/color
# Radio command
@ -39,7 +40,7 @@ data:
############
# Throttle #
############
THROTTLE_MIN: "0.3"
THROTTLE_MIN: "0.25"
THROTTLE_MAX: "0.4"
---
apiVersion: v1
@ -53,7 +54,21 @@ 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: "967"
THROTTLE_MAX_PWM: "1966"
THROTTLE_ZERO_PWM: "1460"
---
apiVersion: v1
kind: ConfigMap
@ -78,8 +93,11 @@ metadata:
name: robocar-models
data:
# model to use for steering
#MODEL_STEERING: model_categorical_160x120h20_edgetpu.tflite
MODEL_STEERING: model_linear_160x120h20_edgetpu.tflite
MODEL_STEERING5: model_160x120h0_edgetpu.tflite
MODEL_STEERING3: model_edgetpu.tflite
MODEL_STEERING: model_160x120h20_edgetpu.tflite
MODEL_STEERING4: model_160x120h20_edgetpu.tflite
MODEL_STEERING2: model-sim-bigimg_edgetpu.tflite
MODEL_IMAGE_WIDTH: "160"

View File

@ -30,7 +30,7 @@ spec:
- "--steering-center-pwm=$(STEERING_CENTER_PWM)"
- "-log=info"
volumeMounts:
- mountPath: "/dev/ttyAMA1"
- mountPath: "/dev/ttyAMA0"
name: serial
securityContext:
privileged: true
@ -96,7 +96,7 @@ spec:
volumes:
- name: serial
hostPath:
path: /dev/ttyAMA1
path: /dev/ttyAMA0
type: CharDevice
---
@ -207,9 +207,6 @@ 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
@ -243,7 +240,7 @@ spec:
- name: MQTT_TOPIC_CAMERA
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_CAMERA
key: MQTT_TOPIC_CAMERA_OAK_COLOR
name: robocar
- name: MQTT_TOPIC_STEERING
valueFrom:
@ -550,7 +547,7 @@ spec:
- name: MQTT_TOPIC_CAMERA
valueFrom:
configMapKeyRef:
key: MQTT_TOPIC_CAMERA
key: MQTT_TOPIC_CAMERA_OAK_COLOR
name: robocar
- name: MQTT_TOPIC_STEERING
valueFrom:
@ -580,7 +577,7 @@ metadata:
reloader.stakater.com/auto: "true"
spec:
revisionHistoryLimit: 0
replicas: 1
replicas: 0
strategy:
type: Recreate
selector:

View File

@ -8,5 +8,6 @@ metadata:
subsets:
- addresses:
- ip: 192.168.2.221
# - ip: 192.168.217.19
ports:
- port: 1883

View File

@ -10,25 +10,25 @@ resources:
images:
- name: docker.io/cyrilix/robocar-arduino
newTag: v0.5.0-2-g9b5e9c2
newTag: v0.7.1
- name: docker.io/cyrilix/robocar-led
newTag: v0.5.0
newTag: v0.5.1
- name: docker.io/cyrilix/robocar-steering-tflite-edgetpu
newTag: v0.4.0
newTag: v0.5.0
- name: docker.io/cyrilix/robocar-throttle
newTag: v0.4.0
newTag: v0.4.2
- name: docker.io/cyrilix/robocar-record
newTag: v0.5.0
newTag: v0.5.1
- name: docker.io/cyrilix/robocar-recorder-store
newTag: v0.2.0
newTag: v0.2.1
- name: docker.io/cyrilix/robocar-steering
newTag: v0.5.0
newTag: v0.5.1
- name: docker.io/cyrilix/robocar-road
newTag: v0.1.0-5-gdc6e465
newTag: v0.2.0

View File

@ -11,4 +11,4 @@ resources:
images:
- name: docker.io/cyrilix/robocar-simulator
newTag: v0.4.0
newTag: v0.4.1

View File

@ -1,16 +0,0 @@
---
- name: Copy docker-compose env file
template:
src: env
dest: /home/pi/.env
- name: Copy stack file
copy:
src: "{{ item }}"
dest: /home/pi/
with_items:
- simulator-compose.yaml
- car.yaml
- robocar.yaml
- simulator.yaml