|
| 1 | +# Robotics AI Suite: Visual Demo Image Template |
| 2 | +# Ubuntu 24.04 LTS + ROS2 Jazzy + Turtlesim + rqt tools |
| 3 | +# |
| 4 | +# Minimal image for running visual ROS2 demos in a QEMU VM. |
| 5 | +# Includes turtlesim, rqt_graph, rqt_plot, and X11 forwarding support. |
| 6 | +# |
| 7 | +# Usage: |
| 8 | +# sudo ./os-image-composer build -t image-templates/robotics-demo-ubuntu24-x86_64.yml |
| 9 | +# |
| 10 | +# VM prerequisites: |
| 11 | +# sudo apt install -y qemu-system-x86 ovmf |
| 12 | +# cp /usr/share/OVMF/OVMF_CODE_4M.fd . |
| 13 | +# cp /usr/share/OVMF/OVMF_VARS_4M.fd . |
| 14 | +# |
| 15 | +# VM launch: |
| 16 | +# qemu-system-x86_64 -machine q35 -enable-kvm -cpu host -smp 4 -m 4096 \ |
| 17 | +# -drive if=pflash,format=raw,readonly=on,file=OVMF_CODE_4M.fd \ |
| 18 | +# -drive if=pflash,format=raw,file=OVMF_VARS_4M.fd \ |
| 19 | +# -drive file=robotics-demo-ubuntu24-24.04.raw,format=raw,if=virtio \ |
| 20 | +# -device virtio-net-pci,netdev=net0 \ |
| 21 | +# -netdev user,id=net0,hostfwd=tcp::2222-:22 \ |
| 22 | +# -nographic |
| 23 | +# |
| 24 | +# Connect with X11 forwarding: |
| 25 | +# ssh -X -p 2222 robot@localhost |
| 26 | +# |
| 27 | +# ROS2 is auto-sourced on login. If needed manually: |
| 28 | +# source /opt/ros/jazzy/setup.bash |
| 29 | +# |
| 30 | +# Run demos: |
| 31 | +# # Demo 1: Turtlesim — visual turtle control with arrow keys |
| 32 | +# ros2 run turtlesim turtlesim_node & |
| 33 | +# ros2 run turtlesim turtle_teleop_key |
| 34 | +# |
| 35 | +# # Demo 2: rqt_graph — live node/topic graph (refresh to see connections) |
| 36 | +# ros2 run rqt_graph rqt_graph & |
| 37 | +# |
| 38 | +# # Demo 3: rqt_plot — real-time data chart (move turtle to see updates) |
| 39 | +# ros2 run rqt_plot rqt_plot /turtle1/pose/x /turtle1/pose/y /turtle1/pose/theta & |
| 40 | +# |
| 41 | +# # Demo 4: Talker/Listener — add more nodes to the graph |
| 42 | +# ros2 run demo_nodes_cpp talker & |
| 43 | +# ros2 run demo_nodes_cpp listener & |
| 44 | + |
| 45 | +# AI-searchable metadata for template discovery |
| 46 | +metadata: |
| 47 | + description: Minimal ROS2 Jazzy demo image with visual tools (turtlesim, rqt) for QEMU VM testing |
| 48 | + use_cases: |
| 49 | + - Visual ROS2 demos in QEMU virtual machines |
| 50 | + - Turtlesim keyboard-controlled robot simulation |
| 51 | + - rqt_graph node/topic visualization |
| 52 | + - rqt_plot real-time data charting |
| 53 | + - ROS2 talker/listener pub/sub testing |
| 54 | + - X11 forwarding GUI demos over SSH |
| 55 | + keywords: |
| 56 | + - robotics |
| 57 | + - ros2 |
| 58 | + - jazzy |
| 59 | + - turtlesim |
| 60 | + - rqt |
| 61 | + - demo |
| 62 | + - qemu |
| 63 | + - vm |
| 64 | + - x11 |
| 65 | + - visualization |
| 66 | + - ubuntu |
| 67 | + capabilities: |
| 68 | + - x11-forwarding |
| 69 | + - ssh-gui |
| 70 | + - ros2-demos |
| 71 | + - ipv6-disabled |
| 72 | + recommendedFor: |
| 73 | + - "quick visual ROS2 demo in a VM" |
| 74 | + - "testing ROS2 image builds before hardware deployment" |
| 75 | + - "team onboarding and ROS2 training" |
| 76 | + |
| 77 | +image: |
| 78 | + name: robotics-demo-ubuntu24 |
| 79 | + version: "24.04" |
| 80 | + |
| 81 | +target: |
| 82 | + os: ubuntu |
| 83 | + dist: ubuntu24 |
| 84 | + arch: x86_64 |
| 85 | + imageType: raw |
| 86 | + |
| 87 | +# 12GiB is sufficient for this minimal demo image |
| 88 | +disk: |
| 89 | + name: robotics-demo |
| 90 | + artifacts: |
| 91 | + - type: raw |
| 92 | + compression: gz |
| 93 | + size: 12GiB |
| 94 | + partitionTableType: gpt |
| 95 | + partitions: |
| 96 | + - id: boot |
| 97 | + type: esp |
| 98 | + flags: |
| 99 | + - esp |
| 100 | + - boot |
| 101 | + start: 1MiB |
| 102 | + end: 513MiB |
| 103 | + fsType: fat32 |
| 104 | + mountPoint: /boot/efi |
| 105 | + mountOptions: umask=0077 |
| 106 | + - id: rootfs |
| 107 | + type: linux-root-amd64 |
| 108 | + start: 513MiB |
| 109 | + end: "0" |
| 110 | + fsType: ext4 |
| 111 | + mountPoint: / |
| 112 | + mountOptions: defaults |
| 113 | + |
| 114 | +packageRepositories: |
| 115 | + # ROS2 Jazzy repository |
| 116 | + - codename: "noble" |
| 117 | + url: "http://packages.ros.org/ros2/ubuntu" |
| 118 | + pkey: "https://raw.githubusercontent.com/ros/rosdistro/master/ros.key" |
| 119 | + component: "main" |
| 120 | + |
| 121 | +systemConfig: |
| 122 | + name: robotics-demo |
| 123 | + description: Intel Robotics AI Suite - Visual Demo (Turtlesim + rqt) |
| 124 | + |
| 125 | + immutability: |
| 126 | + enabled: false |
| 127 | + |
| 128 | + packages: |
| 129 | + # Base system |
| 130 | + - ubuntu-minimal |
| 131 | + - systemd |
| 132 | + - systemd-resolved |
| 133 | + - systemd-boot |
| 134 | + - openssh-server |
| 135 | + - network-manager |
| 136 | + - sudo |
| 137 | + - curl |
| 138 | + - vim |
| 139 | + |
| 140 | + # Boot/initramfs (required for UKI) |
| 141 | + - dracut-core |
| 142 | + - cryptsetup-bin |
| 143 | + |
| 144 | + # X11 forwarding support (required for GUI over SSH) |
| 145 | + - xauth |
| 146 | + - x11-apps |
| 147 | + |
| 148 | + # ROS2 Jazzy Core |
| 149 | + - ros-jazzy-ros-base |
| 150 | + - ros-jazzy-rmw-cyclonedds-cpp |
| 151 | + |
| 152 | + # Visual demo packages |
| 153 | + - ros-jazzy-turtlesim |
| 154 | + - ros-jazzy-rqt |
| 155 | + - ros-jazzy-rqt-graph |
| 156 | + - ros-jazzy-rqt-plot |
| 157 | + |
| 158 | + # Demo nodes (talker/listener) |
| 159 | + - ros-jazzy-demo-nodes-cpp |
| 160 | + - ros-jazzy-demo-nodes-py |
| 161 | + |
| 162 | + kernel: |
| 163 | + version: "6.14" |
| 164 | + cmdline: "console=ttyS0,115200 console=tty0 loglevel=7" |
| 165 | + packages: |
| 166 | + - linux-image-generic-hwe-24.04 |
| 167 | + |
| 168 | + configurations: |
| 169 | + # ROS2 environment setup |
| 170 | + - cmd: "echo 'source /opt/ros/jazzy/setup.bash' >> /etc/bash.bashrc" |
| 171 | + - cmd: "echo 'export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp' >> /etc/bash.bashrc" |
| 172 | + |
| 173 | + # Enable required services |
| 174 | + - cmd: "systemctl enable NetworkManager" |
| 175 | + - cmd: "systemctl enable ssh" |
| 176 | + |
| 177 | + # Fix SSH X11 forwarding (IPv6 socket allocation fails in QEMU) |
| 178 | + - cmd: "echo 'AddressFamily inet' >> /etc/ssh/sshd_config" |
| 179 | + |
| 180 | + # Disable IPv6 (avoids DNS/connection timeouts in VM environments) |
| 181 | + - cmd: "echo 'net.ipv6.conf.all.disable_ipv6 = 1' >> /etc/sysctl.d/99-disable-ipv6.conf" |
| 182 | + - cmd: "echo 'net.ipv6.conf.default.disable_ipv6 = 1' >> /etc/sysctl.d/99-disable-ipv6.conf" |
| 183 | + |
| 184 | + # Set hostname |
| 185 | + - cmd: "echo 'robotics-demo' > /etc/hostname" |
| 186 | + |
| 187 | + users: |
| 188 | + - name: robot |
| 189 | + password: robot |
| 190 | + groups: |
| 191 | + - sudo |
| 192 | + - dialout # Access to serial ports (/dev/ttyUSB*, /dev/ttyACM*) for robot hardware |
0 commit comments