-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpixi.toml
More file actions
384 lines (314 loc) · 18.9 KB
/
Copy pathpixi.toml
File metadata and controls
384 lines (314 loc) · 18.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
[workspace]
name = "agentic-mobile-manipulator"
version = "1.0.0"
description = "Agentic Mobile Manipulator Demo"
channels = ["robostack-jazzy", "conda-forge"]
platforms = ["linux-64"]
# ─── Activation ─────────────────────────────────────────────────────────────────
# scripts/setup_env.sh sources the ros2_ws overlay when available.
[activation]
env = {DEMO_ROOT = "${PIXI_PROJECT_ROOT}"}
scripts = ["scripts/setup_env.sh"]
[dependencies]
# ─── ROS 2 Jazzy (RoboStack) ─────────────────────────────────────────────────
# The full ROS 2 runtime comes from the robostack-jazzy conda channel.
ros-jazzy-desktop = "0.11.0.*"
ros-jazzy-navigation2 = "1.3.12.*"
ros-jazzy-interactive-marker-twist-server = "2.1.1.*"
ros-jazzy-vision-msgs = "4.1.1.*"
ros-jazzy-moveit = "2.12.4.*"
ros-jazzy-moveit-py = "2.12.4.*"
ros-jazzy-tf-transformations = "1.1.1.*"
ros-jazzy-ros2-control = "4.45.1.*"
ros-jazzy-ros2-controllers = "4.40.0.*"
ros-jazzy-ur-description = "3.5.1.*"
ros-jazzy-control-msgs = "5.9.0.*"
ros-jazzy-control-toolbox = "4.11.0.*"
ros-jazzy-kinematics-interface = "1.7.0.*"
ros-jazzy-moveit-msgs = "2.6.0.*"
ros-jazzy-realtime-tools = "3.11.0.*"
ros-jazzy-srdfdom = "2.0.7.*"
ros-jazzy-simulation-interfaces = "1.5.1.*"
ros-jazzy-nav2-bringup = "1.3.12.*"
# ─── Build toolchain (for source packages remaining in ros2_ws/src) ──────────
# Use conda compilers so source packages stay ABI-compatible with the RoboStack
colcon-common-extensions = "*"
vcstool = "*"
c-compiler = "*"
cxx-compiler = "*"
pkg-config = "*"
qt-main = "*"
nlohmann_json = "3.11.3.*"
tomlplusplus = "3.3.0.*"
rust = ">=1.96.0,<1.97"
# ─── Workspace tasks ────────────────────────────────────────────────────────────
[tasks.check-env]
cmd = "bash scripts/check_env.sh"
description = "Fail fast if apt ROS 2 (/opt/ros) is sourced — must not be mixed with conda/RoboStack"
# ─── Feature: ros2 ──────────────────────────────────────────────────────────────
[feature.ros2.tasks.clone-ros2-ws]
cmd = "vcs import --input ros2_ws.repos"
outputs = ["ros2_ws/src/packages/rai_interfaces"]
description = "Clone ROS 2 workspace repositories"
[feature.ros2.tasks.build-ros2]
cmd = "colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release"
cwd = "ros2_ws"
outputs = ["ros2_ws/install/"]
depends-on = ["clone-ros2-ws"]
description = "Build the ROS 2 workspace with colcon (deps provided by conda/RoboStack — no rosdep)"
[feature.ros2.tasks.stack]
cmd = "bash scripts/tmux_run.sh agentic-mobile-manipulator-stack pixi run stack-fg"
description = "Launch the barebones ROS 2 stack in its own tmux session (robot + supporting nodes, no agents)"
[feature.ros2.tasks.stack-fg]
cmd = "bash scripts/run_ros2_stack.sh"
description = "Launch the barebones ROS 2 stack in the foreground (no tmux)"
[feature.ros2.tasks.agents]
cmd = "bash scripts/run_agents.sh"
description = "Start the rai agents + orchestrator in a tmux grid (nav2, moveit2, scene, inspection, safety, orchestrator)"
[feature.ros2.tasks.hmi]
cmd = "bash scripts/tmux_run.sh agentic-mobile-manipulator-hmi pixi run hmi-fg"
description = "Launch the Human-Machine Interface in its own tmux session"
[feature.ros2.tasks.hmi-fg]
cmd = "ros2 launch mobile_manipulator_hmi hmi_launch.py"
description = "Launch the Human-Machine Interface in the foreground (no tmux)"
[feature.ros2.tasks.orchestrator-agent]
cmd = "uv run python rai_app/agents/agent_orchestrator.py"
description = "Launch the agent orchestrator"
# Individual agents — use these instead of 'agents' when debugging a specific one.
[feature.ros2.tasks.nav2-agent]
cmd = "uv run python rai_app/agents/nav2_agent.py"
description = "Launch nav2 agent"
[feature.ros2.tasks.moveit2-agent]
cmd = "uv run python rai_app/agents/moveit2_agent.py"
description = "Launch moveit2 agent"
[feature.ros2.tasks.scene-agent]
cmd = "uv run python rai_app/environment/scene_agent.py"
description = "Launch scene agent"
[feature.ros2.tasks.inspection-agent]
cmd = "uv run python rai_app/agents/inspection_agent.py"
description = "Launch inspection agent"
[feature.ros2.tasks.safety-agent]
cmd = "bash scripts/start_safety_agent.sh"
description = "Launch safety agent (with RAG)"
# ─── Feature: sim ───────────────────────────────────────────────────────────────
[feature.sim.dependencies]
git-lfs = "*"
[feature.sim.tasks.install-o3de]
cmd = "scripts/install_o3de.sh"
outputs = ["/opt/O3DE/26.05/scripts/o3de.sh"]
description = "Install the O3DE engine SDK"
[feature.sim.tasks.clone-gems]
cmd = "vcs import --input gems.repos && git lfs install && bash -c 'for repo in gems/*/; do git -C \"$repo\" lfs pull; done'"
outputs = ["gems/robotec-warehouse-assets"]
description = "Clone local O3DE gems and fetch LFS assets"
[feature.sim.tasks.fetch-gems]
cmd = "scripts/fetch_gems.sh"
outputs = ["external/o3de-extras"]
# clone-gems must run first: fetch_gems.sh validates every external_subdirectory
# in project.json, including the ../gems/* paths that clone-gems provides.
depends-on = ["clone-gems"]
description = "Clone o3de-extras gems locally and validate all gem paths from project.json"
# Runs via scripts/build_sim.sh rather than an inline cmake invocation: pixi
# activates the environment once, at the start of a `pixi run`, so on a clean
# tree the ros2_ws overlay (built by build-ros2 during the same run) is not yet
# sourced. The script sources it at build time so the O3DE SimulationInterfaces
# gem's find_package(simulation_interfaces) resolves on the FIRST run, not only
# the second. (It also pins CMAKE_CXX_STANDARD=20.)
[feature.sim.tasks.build-sim]
# No cwd override: the script path is project-root-relative and the script cd's
# into $DEMO_ROOT/sim itself.
cmd = "bash scripts/build_sim.sh"
inputs = ["scripts/build_sim.sh", "sim/Gem/Source/**", "sim/Gem/Include/**", "sim/Gem/CMakeLists.txt", "sim/Gem/gem.json", "sim/Gem/*.cmake"]
outputs = ["sim/build/linux/bin/profile/MobileManipulatorDemo.GameLauncher"]
# All gems are registered project-locally via external_subdirectories in
# sim/project.json, so the gem source trees must exist before cmake configure.
# fetch-gems (transitively clone-gems) clones them; depend on it so a clean
# checkout — and the Docker o3de build — fetch gems before building.
depends-on = ["fetch-gems"]
description = "Build O3DE GameLauncher and project assets"
[feature.sim.tasks.sim]
cmd = "bash scripts/tmux_run.sh agentic-mobile-manipulator-sim pixi run sim-fg"
description = "Launch O3DE simulation in its own tmux session"
[feature.sim.tasks.sim-fg]
cmd = "$DEMO_ROOT/sim/build/linux/bin/profile/MobileManipulatorDemo.GameLauncher -bg_ConnectToAssetProcessor=0"
description = "Launch O3DE simulation in the foreground (no tmux)"
[feature.sim.tasks.sim-smoke]
cmd = "bash scripts/sim_smoke.sh"
description = "Headless sim smoke test: boot with --rhi=null, pass if /clock ticks (no GPU/display)"
[feature.sim.tasks.editor]
cmd = "$O3DE_ENGINE_PATH/bin/Linux/profile/Default/Editor --project-path $DEMO_ROOT/sim"
description = "Launch O3DE Editor from SDK (project must be built first)"
# ─── Feature: local-inference ───────────────────────────────────────────────────
[feature.local-inference.dependencies]
# Everything needed to BUILD + SERVE local inference, so the lightweight
# `inference` environment (no ROS, no O3DE) is self-sufficient. In the heavier
# `single-pc-gpu`/`hil` envs these merge harmlessly with the default-feature
# toolchain (same conda-forge packages).
python = "*" # runs the stdlib dispatcher (rai_app.inference.serve)
cmake = "*"
ninja = "*" # FastFlowLM's `cmake --preset linux-default` uses Ninja
make = "*" # llama.cpp default (Makefiles) generator
c-compiler = "*"
cxx-compiler = "*"
pkg-config = "*"
wget = "*" # download-models fetches ggufs
# Vulkan SDK pieces llama.cpp's GGML_VULKAN backend needs to BUILD: headers +
# loader for find_package(Vulkan), and glslc (from shaderc) to compile shaders.
# The runtime ICD is the system GPU driver (e.g. RADV for AMD), discovered by
# the loader at run time — not provided here.
libvulkan-headers = "*"
libvulkan-loader = "*"
shaderc = "*" # provides glslc (Vulkan COMPONENTS glslc)
spirv-headers = "*" # find_package(SPIRV-Headers) in ggml-vulkan
# llama.cpp and FastFlowLM are git submodules pinned under inference/ — see
# .gitmodules. Their versions are tracked by commit, so bump them with
# `git submodule update --remote <path>` and commit the new pointer.
[feature.local-inference.tasks.init-submodules]
cmd = "git submodule update --init --recursive --depth 1 inference/llama.cpp inference/FastFlowLM"
outputs = ["inference/llama.cpp/CMakeLists.txt", "inference/FastFlowLM/src/CMakeLists.txt"]
description = "Check out the pinned llama.cpp + FastFlowLM submodules, shallow (required for local inference)"
[feature.local-inference.tasks.build-llama]
# GGML_CCACHE=OFF: the conda env's ccache links against a libfmt ABI it doesn't
# ship (wants libfmt.so.9, env has .so.12), so leaving ccache on breaks every
# compile with Error 127. The build doesn't need ccache.
# Server-only minimal build: LLAMA_BUILD_UI=OFF skips the embedded webui's
# npm/PWA build (server API doesn't need it); tests/examples off too. The
# --target llama-server then builds only that binary + its deps.
cmd = """
cmake -B build -DGGML_VULKAN=1 -DGGML_CCACHE=OFF \
-DLLAMA_BUILD_UI=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF &&
cmake --build build --config Release -j $(nproc) --target llama-server
"""
cwd = "inference/llama.cpp"
depends-on = ["init-submodules"]
outputs = ["inference/llama.cpp/build/bin/llama-server"]
description = "Build llama.cpp (Vulkan), server only — no webui/tests/examples"
# ─── FastFlowLM (AMD Ryzen AI NPU backend) ───────────────────────────────────
# The submodule (RobotecAI/FastFlowLM fork) already includes GBNF grammar-
# constrained sampling, needed for structured agent output on the NPU. Building
# needs the XRT/amdxdna dev headers (no NPU required to compile); only serving
# (`flm serve`) needs the NPU + amdxdna driver loaded. The build is install-free
# — the dispatcher runs the repo binary directly.
[feature.local-inference.tasks.build-fastflowlm]
cmd = "bash scripts/build_fastflowlm.sh"
depends-on = ["init-submodules"]
outputs = ["inference/FastFlowLM/src/build/flm"]
description = "Build FastFlowLM from source, build-only/no install (needs XRT/amdxdna dev headers)"
# ─── SSOT-driven inference (config.toml drives everything below) ─────────────
# rai_app/inference/serve.py reads config.toml's [endpoints.*] and routes each to
# its backend (gpu/cpu→llama.cpp, npu→FastFlowLM). Change a port/model/backend
# in config.toml — these tasks need no edits.
[feature.local-inference.tasks.download-models]
cmd = "python -m rai_app.inference.serve --download"
description = "Download weights for every local endpoint in config.toml (gguf via wget, NPU tags via `flm pull`)"
[feature.local-inference.tasks.inference]
cmd = "python -m rai_app.inference.serve"
description = "Launch every local endpoint from config.toml in a tmux grid (one pane per server)"
# Per-endpoint launchers (used by demo.sh and for debugging a single server).
# Each runs the command config.toml specifies for that endpoint.
[feature.local-inference.tasks.serve-llm]
cmd = "python -m rai_app.inference.serve --only main_llm"
description = "Serve the 'main_llm' endpoint from config.toml"
[feature.local-inference.tasks.serve-vlm-safety]
cmd = "python -m rai_app.inference.serve --only vlm_safety"
description = "Serve the safety agent's VLM from config.toml (npu/FastFlowLM)"
[feature.local-inference.tasks.serve-vlm-inspection]
cmd = "python -m rai_app.inference.serve --only vlm_inspection"
description = "Serve the inspection agent's VLM from config.toml (gpu/llama.cpp, LFM2-VL)"
[feature.local-inference.tasks.serve-embedding]
cmd = "python -m rai_app.inference.serve --only embeddings"
description = "Serve the 'embeddings' endpoint from config.toml"
[feature.local-inference.tasks.serve-reranker]
cmd = "python -m rai_app.inference.serve --only reranker"
description = "Serve the 'reranker' endpoint from config.toml"
[feature.local-inference.tasks.smoke-test]
cmd = "bash scripts/smoke_test.sh"
description = "Smoke-test inference: /health liveness + one real inference request per endpoint (config.toml SSOT)"
# ─── Profile features ───────────────────────────────────────────────────────────
# One profile feature per environment. Each defines a `setup` entry point so
# that `pixi run -e <env> setup` builds exactly the components for that machine.
[feature.profile-sim.tasks.clone]
depends-on = ["clone-gems", "clone-ros2-ws"]
description = "Clone all repositories (gems and ROS 2 workspace)"
[feature.profile-sim.tasks.setup]
depends-on = ["clone", "install-o3de", "fetch-gems", "build-ros2", "build-sim", "sync"]
description = "Setup sim machine (O3DE + ROS 2)"
[feature.profile-hmi.tasks.setup]
depends-on = ["clone-ros2-ws", "build-ros2", "sync"]
description = "Setup HMI machine (ROS 2)"
[feature.profile-hil.tasks.setup]
depends-on = ["clone-ros2-ws", "init-submodules", "build-ros2", "sync", "build-llama"]
description = "Setup HIL compute machine (ROS 2 + inference, GPU+NPU)"
[feature.profile-single-pc.tasks.clone]
depends-on = ["clone-gems", "clone-ros2-ws"]
description = "Clone all repositories (gems and ROS 2 workspace)"
[feature.profile-single-pc.tasks.demo]
cmd = "bash scripts/demo.sh"
description = "Start full demo: sim → stack → inference → agents+orchestrator → hmi (one tmux session each)"
[feature.profile-single-pc.tasks.demo-trace]
cmd = "bash scripts/demo_trace.sh"
description = "Unattended trace run: start demo, send one task, dump the agent conversation to runs/<timestamp>/, then kill everything"
# ─── Single-PC setup variants: GPU (default) vs GPU+NPU ──────────────────────────
# Share clone/demo above; differ only in what `setup` builds and what
# find-runnables waits on. -gpu builds llama.cpp (Vulkan); -npu also builds
# FastFlowLM. Each env includes exactly one variant, so the duplicate
# `setup`/`find-runnables` names never collide.
[feature.profile-single-pc-gpu.tasks.setup]
depends-on = ["clone", "install-o3de", "fetch-gems", "build-ros2", "build-sim", "sync", "build-llama", "find-runnables"]
description = "Single-PC setup: O3DE + ROS 2 + llama.cpp (Vulkan GPU)"
# Runs last (depends on the builds it inventories) so setup ends by listing them.
[feature.profile-single-pc-gpu.tasks.find-runnables]
cmd = "bash scripts/find_runnables.sh"
depends-on = ["build-sim", "build-llama"]
description = "List built runnables (GameLauncher, llama.cpp, ...)"
[feature.profile-single-pc-npu.tasks.setup]
depends-on = ["clone", "install-o3de", "fetch-gems", "build-ros2", "build-sim", "sync", "build-llama", "build-fastflowlm", "find-runnables"]
description = "Single-PC setup: O3DE + ROS 2 + llama.cpp (Vulkan GPU) + FastFlowLM (NPU)"
# Waits on the NPU build too, so FastFlowLM reports as built.
[feature.profile-single-pc-npu.tasks.find-runnables]
cmd = "bash scripts/find_runnables.sh"
depends-on = ["build-sim", "build-llama", "build-fastflowlm"]
description = "List built runnables (GameLauncher, llama.cpp, FastFlowLM, ...)"
# ─── Feature: dev ───────────────────────────────────────────────────────────────
# Lightweight feature for Python tooling (uv, pre-commit, pytest).
# Included in every environment so `pixi run sync/lint/test` works everywhere.
# Use `pixi run -e dev <task>` to avoid installing ROS 2 / compiler packages
# when all you need is linting or tests.
[feature.dev.dependencies]
uv = ">=0.5"
[feature.dev.tasks.kill]
cmd = "bash scripts/kill_sessions.sh"
description = "Kill all project tmux sessions (agentic-mobile-manipulator-*)"
[feature.dev.tasks.sync]
cmd = "uv sync"
description = "Install Python dependencies"
[feature.dev.tasks.pre-commit-install]
cmd = "uv run pre-commit install"
depends-on = ["sync"]
description = "Install pre-commit hooks"
[feature.dev.tasks.lint]
cmd = "uv run pre-commit run --all-files"
depends-on = ["sync"]
description = "Run all linters and formatters"
[feature.dev.tasks.test]
cmd = "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run python -m pytest"
depends-on = ["sync"]
description = "Run test suite"
# ─── Environments ───────────────────────────────────────────────────────────────
# Run `pixi run -e <env> setup` to bootstrap the matching machine type.
# Tasks from features not included in an environment are unavailable in it —
# e.g. `build-sim` cannot be run in the `hil` environment.
[environments]
# `default` mirrors `single-pc-gpu` so a bare `pixi run <task>` (no -e) targets
# the one-PC GPU setup with no environment prompt. pixi always resolves bare tasks
# against the default env, so shared tasks (build-sim, install-o3de, …) stop being
# ambiguous. `single-pc-gpu-and-npu` adds the FastFlowLM NPU build on top.
# TODO: drop the default duplicate if pixi gains a way to alias default to a named env.
default = {features = ["dev", "ros2", "sim", "local-inference", "profile-single-pc", "profile-single-pc-gpu"]}
single-pc-gpu = {features = ["dev", "ros2", "sim", "local-inference", "profile-single-pc", "profile-single-pc-gpu"]} # one PC: llama.cpp Vulkan GPU
single-pc-gpu-and-npu = {features = ["dev", "ros2", "sim", "local-inference", "profile-single-pc", "profile-single-pc-npu"]} # one PC: GPU + FastFlowLM NPU
hil = {features = ["dev", "ros2", "local-inference", "profile-hil"]} # compute: ROS2 + inference (GPU+NPU)
sim = {features = ["dev", "ros2", "sim", "profile-sim"]} # O3DE simulation + ROS2
hmi = {features = ["dev", "ros2", "profile-hmi"]} # operator interface
dev = {features = ["dev"], no-default-feature = true} # lint/test/format
inference = {features = ["dev", "local-inference"], no-default-feature = true} # headless inference host (no ROS2/O3DE)