Migrate to a new physical robot

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.
This commit is contained in:
2026-05-27 13:25:20 +00:00
parent c1319a6357
commit ec554bcf2c
96 changed files with 2874 additions and 3730 deletions
+9 -52
View File
@@ -1,4 +1,5 @@
FROM ros:kilted
# FROM ros:kilted
FROM osrf/ros:kilted-desktop-full
ARG USERNAME=USERNAME
ARG USER_UID=1000
ARG USER_GID=$USER_UID
@@ -8,7 +9,7 @@ RUN if id -u $USER_UID ; then userdel `id -un $USER_UID` ; fi
# Create the user
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME -s /bin/bash \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
#
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
&& apt-get update \
@@ -18,25 +19,26 @@ RUN groupadd --gid $USER_GID $USERNAME \
RUN apt-get update && apt-get upgrade -y
# C++ development tools
RUN apt-get update && apt-get install -y \
RUN apt-get install -y \
build-essential \
cmake \
gdb \
clang \
clang-format \
clang-tidy \
libboost-all-dev
libboost-all-dev \
xterm
# Python development tools
RUN apt-get update && apt-get install -y \
RUN apt-get install -y \
python3-pip \
python3-venv \
python3-dev \
python3-argcomplete \
python3-colcon-common-extensions \
python3-colcon-mixin \
python3-rosdep \
python3-vcstool
python3-vcstool \
python3-smbus
# ROS 2 ament build tools
# RUN apt-get install -y \
@@ -46,51 +48,6 @@ RUN apt-get update && apt-get install -y \
# ros-${ROS_DISTRO}-ament-lint-auto \
# ros-${ROS_DISTRO}-ament-lint-common
# URDF / xacro tooling — needed to generate flat URDF for IDE preview
RUN apt-get update && apt-get install -y \
ros-${ROS_DISTRO}-xacro \
ros-${ROS_DISTRO}-robot-state-publisher
# Gazebo Harmonic + ROS 2 integration
RUN apt-get update && apt-get install -y \
ros-${ROS_DISTRO}-ros-gz \
ros-${ROS_DISTRO}-gz-ros2-control
# Navigation and SLAM
RUN apt-get update && apt-get install -y \
ros-${ROS_DISTRO}-nav2-bringup \
ros-${ROS_DISTRO}-slam-toolbox \
ros-${ROS_DISTRO}-joint-state-publisher \
ros-${ROS_DISTRO}-joint-state-broadcaster \
ros-${ROS_DISTRO}-joint-trajectory-controller \
ros-${ROS_DISTRO}-controller-manager
# Node.js for frontend development
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs
# Python venv for webui backend (isolated from system packages)
RUN python3 -m venv /opt/webui-venv \
&& /opt/webui-venv/bin/pip install --no-cache-dir \
fastapi \
"uvicorn[standard]" \
numpy
# Docker CLI for accessing the host daemon via the mounted socket
# docker-compose-plugin is only in Docker's official repo, not Ubuntu's.
# .docker_gid is written by initializeCommand on the host before the build,
# ensuring the in-container docker group GID matches the host socket GID.
COPY .docker_gid /tmp/.docker_gid
RUN apt-get update && apt-get install -y ca-certificates curl gnupg \
&& install -m 0755 -d /etc/apt/keyrings \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
&& chmod a+r /etc/apt/keyrings/docker.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
> /etc/apt/sources.list.d/docker.list \
&& apt-get update && apt-get install -y docker-ce-cli docker-compose-plugin \
&& groupadd -g "$(cat /tmp/.docker_gid)" docker \
&& usermod -aG docker $USERNAME
ENV SHELL /bin/bash
# ********************************************************