ec554bcf2c
Uses the mecanum controller properly across physical and virtual There is a timing issue with i2c which is why the control update is limited to 10hz The sonar and LED's arent yet working, this will come soon.
50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
---
|
|
- name: Setup robot
|
|
hosts: raspbot
|
|
become: true
|
|
|
|
vars:
|
|
docker_users:
|
|
- "{{ robot_user }}"
|
|
|
|
pre_tasks:
|
|
- name: Enable SPI via raspi-config
|
|
command: raspi-config nonint do_spi 0
|
|
changed_when: false
|
|
|
|
# Real-time scheduling setup per
|
|
# https://control.ros.org/kilted/doc/ros2_control/controller_manager/doc/userdoc.html#determinism
|
|
- name: Create realtime group
|
|
group:
|
|
name: realtime
|
|
state: present
|
|
|
|
- name: Add robot user to realtime group
|
|
user:
|
|
name: "{{ robot_user }}"
|
|
groups: realtime
|
|
append: true
|
|
|
|
- name: Configure real-time scheduling limits
|
|
copy:
|
|
dest: /etc/security/limits.d/99-realtime.conf
|
|
content: |
|
|
@realtime soft rtprio 99
|
|
@realtime soft priority 99
|
|
@realtime soft memlock unlimited
|
|
@realtime hard rtprio 99
|
|
@realtime hard priority 99
|
|
@realtime hard memlock unlimited
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
|
|
# - name: Install low-latency kernel for improved RT performance
|
|
# apt:
|
|
# name: linux-lowlatency
|
|
# state: present
|
|
# update_cache: true
|
|
|
|
roles:
|
|
- geerlingguy.docker
|