-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
595 lines (578 loc) · 22.4 KB
/
Copy pathdocker-compose.yml
File metadata and controls
595 lines (578 loc) · 22.4 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
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
# Define a reusable block for ROS2 service configuration
x-ros2-service: &ros2-service
image: costnav-ros2-jazzy:${COSTNAV_VERSION:-1.0.0}
volumes:
- ./costnav_isaacsim/nav2_params:/workspace/costnav_isaacsim/nav2_params
- ./fastdds.xml:/workspace/fastdds.xml:ro
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${XAUTHORITY}:/tmp/.Xauthority:ro
working_dir: /workspace
network_mode: host
ipc: host
stdin_open: true
tty: true
services:
# Isaac Sim environment
isaac-sim:
profiles:
["isaac-sim", "nav2", "teleop", "vint", "gnm", "nomad", "navdp", "canvas"]
image: costnav-isaacsim-${ISAAC_SIM_VERSION}:${COSTNAV_VERSION}
container_name: costnav-isaac-sim
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["${GPU_DEVICE_IDS:-0}"]
capabilities: [gpu]
env_file:
- .env
environment:
- ACCEPT_EULA=Y
- PRIVACY_CONSENT=Y
- OMNI_KIT_ACCEPT_EULA=YES
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-all}
- NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:-all}
- DISPLAY=${DISPLAY:-:0}
- XAUTHORITY=${XAUTHORITY:-/tmp/.X11-unix}
- SIM_ROBOT=${SIM_ROBOT:-segway_e1}
- ROBOT_PRIM_PATH=${ROBOT_PRIM_PATH:-}
- ISAAC_PATH=${ISAAC_PATH:-/isaac-sim}
- CARB_APP_PATH=${CARB_APP_PATH:-/isaac-sim/kit}
- EXP_PATH=${EXP_PATH:-/isaac-sim/apps}
- NUM_PEOPLE=${NUM_PEOPLE:-20}
- FOOD=${FOOD:-True}
- TOPOMAP=${TOPOMAP:-False}
- GOAL_IMAGE=${GOAL_IMAGE:-False}
- ALIGN_HEADING=${ALIGN_HEADING:-False}
- CANVAS=${CANVAS:-False}
volumes:
- .:/workspace
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/costnav_topomap:/tmp/costnav_topomap:rw
- /tmp/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw
- /tmp/isaac-sim/cache/ov:/root/.cache/ov:rw
- /tmp/isaac-sim/cache/pip:/root/.cache/pip:rw
- /tmp/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw
- /tmp/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw
- /tmp/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw
- /tmp/isaac-sim/data:/root/.local/share/ov/data:rw
- /tmp/isaac-sim/documents:/root/Documents:rw
- ./third_party/PeopleAPI/exts:/isaac-sim/extsUser:rw
- ./third_party/FoodAssets/exts/worvai.assets.food:/isaac-sim/extsUser/worvai.assets.food:rw
working_dir: /workspace
command:
- "-ic"
- |
set -e
exec /workspace/costnav_isaacsim/costnav_isaacsim/launch.py --people $${NUM_PEOPLE:-20} --robot $${SIM_ROBOT:-segway_e1} --food-enabled $${FOOD:-True} --topomap-enabled $${TOPOMAP:-False} --goal-image-enabled $${GOAL_IMAGE:-False} --align-initial-heading-to-path $${ALIGN_HEADING:-False} --canvas-enabled $${CANVAS:-False}
healthcheck:
test:
[
"CMD",
"bash",
"-c",
"[ -e /tmp/.isaac_sim_running ] || exit 1 && exit 0",
]
interval: 10s
timeout: 5s
retries: 60
start_period: 5s
network_mode: host
ipc: host
stdin_open: true
tty: true
# Isaac Lab environment
isaac-lab:
profiles: ["isaac-lab"]
image: costnav-isaaclab-${ISAAC_SIM_VERSION}-${ISAAC_LAB_VERSION}:${COSTNAV_VERSION}
container_name: ${CONTAINER_NAME:-costnav-isaac-lab}
user: "${ISAAC_UID:-1234}:${ISAAC_GID:-1234}"
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["${GPU_DEVICE_IDS:-0}"]
capabilities: [gpu]
env_file:
- .env
environment:
- ACCEPT_EULA=Y
- PRIVACY_CONSENT=Y
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-all}
- NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:-all}
- DISPLAY=${DISPLAY:-:0}
- XAUTHORITY=${XAUTHORITY:-/tmp/.X11-unix}
- ISAAC_PATH=${ISAAC_PATH:-/isaac-sim}
- CARB_APP_PATH=${CARB_APP_PATH:-/isaac-sim/kit}
- EXP_PATH=${EXP_PATH:-/isaac-sim/apps}
volumes:
- .:/workspace
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/isaac-sim/cache/kit:/isaac-sim/kit/cache:rw
- /tmp/isaac-sim/cache/ov:/root/.cache/ov:rw
- /tmp/isaac-sim/cache/pip:/root/.cache/pip:rw
- /tmp/isaac-sim/cache/glcache:/root/.cache/nvidia/GLCache:rw
- /tmp/isaac-sim/cache/computecache:/root/.nv/ComputeCache:rw
- /tmp/isaac-sim/logs:/root/.nvidia-omniverse/logs:rw
- /tmp/isaac-sim/data:/root/.local/share/ov/data:rw
- /tmp/isaac-sim/documents:/root/Documents:rw
network_mode: host
ipc: host
stdin_open: true
tty: true
# Development environment (minimal dependencies)
dev:
profiles: ["dev"]
build:
context: .
dockerfile: Dockerfile
target: dev
image: costnav-dev:${COSTNAV_VERSION}
container_name: costnav-dev
env_file:
- .env
volumes:
- .:/workspace
network_mode: host
stdin_open: true
tty: true
command: sleep infinity
# ROS2 Jazzy Container for development
ros2:
<<: *ros2-service
profiles: ["ros2"]
container_name: costnav-ros2
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
volumes:
- ./costnav_isaacsim/nav2_params:/workspace/costnav_isaacsim/nav2_params
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ${XAUTHORITY}:/tmp/.Xauthority:ro
- .:/workspace
command: sleep infinity
# ROS2 with Nav2 - waits for Isaac Sim to be healthy before starting
ros2-nav2:
<<: *ros2-service
profiles: ["nav2"]
container_name: costnav-ros2-nav2
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
- SIM_ROBOT=${SIM_ROBOT:-segway_e1}
- TUNED=${TUNED:-False}
depends_on:
isaac-sim:
condition: service_healthy
command: >
bash -c "
if [ \"$${TUNED}\" = \"True\" ]; then
PARAMS_FILE=/workspace/costnav_isaacsim/nav2_params/$${SIM_ROBOT}/navigation_params_tuned_true.yaml
else
PARAMS_FILE=/workspace/costnav_isaacsim/nav2_params/$${SIM_ROBOT}/navigation_params_tuned_false.yaml
fi &&
ros2 launch /workspace/costnav_isaacsim/nav2_params/nav2.launch.py params_file:=$${PARAMS_FILE}
"
# ROS2 with RViz - standalone visualization service that runs alongside Isaac Sim
ros2-rviz-nav2:
<<: *ros2-service
profiles: ["isaac-sim", "nav2", "vint", "gnm", "nomad", "navdp", "canvas"]
container_name: costnav-ros2-rviz-nav2
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
- SIM_ROBOT=${SIM_ROBOT:-segway_e1}
- TUNED=${TUNED:-True}
- AMCL=${AMCL:-False}
depends_on:
isaac-sim:
condition: service_healthy
command: >
bash -c "
if [ \"$${TUNED}\" = \"True\" ]; then
PARAMS_FILE=/workspace/costnav_isaacsim/nav2_params/$${SIM_ROBOT}/navigation_params_tuned_true.yaml
else
PARAMS_FILE=/workspace/costnav_isaacsim/nav2_params/$${SIM_ROBOT}/navigation_params_tuned_false.yaml
fi &&
RVIZ_LAUNCH=/workspace/costnav_isaacsim/nav2_params/rviz.launch.py &&
if [ \"$${AMCL}\" = \"False\" ]; then
RVIZ_LAUNCH=/workspace/costnav_isaacsim/nav2_params/rviz_no_amcl.launch.py
fi &&
ros2 launch $${RVIZ_LAUNCH} rviz_config:=/workspace/costnav_isaacsim/nav2_params/$${SIM_ROBOT}/navigation.rviz map:=/workspace/costnav_isaacsim/nav2_params/maps/sidewalk.yaml params_file:=$${PARAMS_FILE}
"
# ROS2 with RViz (teleop profile) - hides TF/point clouds by default
ros2-rviz-teleop:
<<: *ros2-service
profiles: ["teleop"]
container_name: costnav-ros2-rviz-teleop
depends_on:
isaac-sim:
condition: service_healthy
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
- LIBGL_ALWAYS_SOFTWARE=1
- SIM_ROBOT=${SIM_ROBOT:-segway_e1}
- TUNED=${TUNED:-True}
- AMCL=${AMCL:-False}
command: >
bash -c "
if [ \"$${TUNED}\" = \"True\" ]; then
PARAMS_FILE=/workspace/costnav_isaacsim/nav2_params/$${SIM_ROBOT}/navigation_params_tuned_true.yaml
else
PARAMS_FILE=/workspace/costnav_isaacsim/nav2_params/$${SIM_ROBOT}/navigation_params_tuned_false.yaml
fi &&
RVIZ_LAUNCH=/workspace/costnav_isaacsim/nav2_params/rviz.launch.py &&
if [ \"$${AMCL}\" = \"False\" ]; then
RVIZ_LAUNCH=/workspace/costnav_isaacsim/nav2_params/rviz_no_amcl.launch.py
fi &&
ros2 launch $${RVIZ_LAUNCH} rviz_config:=/workspace/costnav_isaacsim/nav2_params/$${SIM_ROBOT}/navigation_teleop.rviz map:=/workspace/costnav_isaacsim/nav2_params/maps/sidewalk.yaml params_file:=$${PARAMS_FILE}
"
# ROS2 with teleop - waits for Isaac Sim to be healthy before starting
# Runs joy_node in background and teleop_node in foreground so curses UI gets the TTY
ros2-teleop:
<<: *ros2-service
profiles: ["manual"]
container_name: costnav-ros2-teleop
depends_on:
isaac-sim:
condition: service_healthy
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
- SIM_ROBOT=${SIM_ROBOT:-segway_e1} # NOTE: isaac_sim_teleop_ros2 Package requires SIM_ROBOT
devices:
- /dev/input/by-id/usb-Microsoft_Controller_${XBOX_ID:-0}-event-joystick:/dev/input/event0
- /dev/input/by-id/usb-Microsoft_Controller_${XBOX_ID:-0}-joystick:/dev/input/js0
command: >
bash -c "
ros2 run joy joy_node --ros-args -p deadzone:=0.12 -p autorepeat_rate:=0.0 -p device_id:=0 &
JOY_PID=$$! &&
trap 'kill $$JOY_PID 2>/dev/null; wait $$JOY_PID 2>/dev/null' EXIT &&
ros2 run isaac_sim_teleop_ros2 isaac_sim_teleop_node --ros-args -p odom_topic:=/chassis/odom
"
# ROS2 bag recorder - records all ROS messages to a bag file
ros2-bag-recorder:
<<: *ros2-service
profiles: ["rosbag"]
container_name: costnav-ros2-bag-recorder
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
volumes:
- ./rosbags:/workspace/rosbags:rw
command: >
bash -c "
mkdir -p /workspace/rosbags &&
ros2 run image_transport republish --ros-args -p in_transport:=raw -p out_transport:=compressed --remap in:=/front_stereo_camera/left/image_raw --remap out/compressed:=/front_stereo_camera/left/image_raw/compressed &
ros2 bag record -a -o /workspace/rosbags/recording_$$(date +%Y%m%d_%H%M%S) --exclude-topics /front_stereo_camera/left/image_raw
"
# ROS2 with ViNT policy
ros2-vint:
profiles: ["vint"]
image: costnav-ros2-torch:${COSTNAV_VERSION:-1.0.0}
container_name: costnav-ros2-vint
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["${GPU_DEVICE_IDS:-0}"]
capabilities: [gpu]
depends_on:
isaac-sim:
condition: service_healthy
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
- NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-all}
- NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:-all}
- SIM_ROBOT=${SIM_ROBOT:-segway_e1}
- GOAL_TYPE=${GOAL_TYPE:-}
- MODEL_CHECKPOINT=${MODEL_CHECKPOINT:-checkpoints/vint.pth}
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/costnav_topomap:/tmp/costnav_topomap:rw
- .:/workspace
working_dir: /workspace
command: >
bash -c "if [ \"$${SIM_ROBOT}\" = \"nova_carter\" ]; then
ROBOT_CONFIG=/workspace/costnav_isaacsim/il_evaluation/configs/robot_carter.yaml
else
ROBOT_CONFIG=/workspace/costnav_isaacsim/il_evaluation/configs/robot_segway.yaml
fi &&
vint_policy_node --checkpoint $${MODEL_CHECKPOINT} --model_config /workspace/costnav_isaacsim/il_evaluation/configs/vint_eval.yaml --robot_config $${ROBOT_CONFIG} $${GOAL_TYPE:+--goal_type $${GOAL_TYPE}} --topomap_dir /tmp/costnav_topomap"
network_mode: host
ipc: host
stdin_open: true
tty: true
# ROS2 Trajectory Follower - MPC controller for executing IL trajectories
ros2-trajectory-follower:
profiles: ["vint", "gnm", "nomad", "navdp"]
image: costnav-ros2-torch:${COSTNAV_VERSION:-1.0.0}
container_name: costnav-ros2-trajectory-follower
depends_on:
isaac-sim:
condition: service_healthy
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
- SIM_ROBOT=${SIM_ROBOT:-segway_e1}
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- .:/workspace
working_dir: /workspace
command: >
bash -c "if [ \"$${SIM_ROBOT}\" = \"nova_carter\" ]; then
ROBOT_CONFIG=/workspace/costnav_isaacsim/il_evaluation/configs/robot_carter.yaml
else
ROBOT_CONFIG=/workspace/costnav_isaacsim/il_evaluation/configs/robot_segway.yaml
fi &&
trajectory_follower_node --robot_config $${ROBOT_CONFIG}"
network_mode: host
ipc: host
stdin_open: true
tty: true
# ROS2 with NavDP policy (local inference) + trajectory follower
ros2-navdp:
profiles: ["navdp"]
image: costnav-ros2-torch:${COSTNAV_VERSION:-1.0.0}
container_name: costnav-ros2-navdp
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["${GPU_DEVICE_IDS:-0}"]
capabilities: [gpu]
depends_on:
isaac-sim:
condition: service_healthy
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
- NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-all}
- NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:-all}
- SIM_ROBOT=${SIM_ROBOT:-segway_e1}
- GOAL_TYPE=${GOAL_TYPE:-}
- MODEL_CHECKPOINT=${MODEL_CHECKPOINT:-checkpoints/baseline-navdp.ckpt}
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/costnav_topomap:/tmp/costnav_topomap:rw
- .:/workspace
working_dir: /workspace
command: >
bash -c "if [ \"$${SIM_ROBOT}\" = \"nova_carter\" ]; then
ROBOT_CONFIG=/workspace/costnav_isaacsim/il_evaluation/configs/robot_carter.yaml;
else
ROBOT_CONFIG=/workspace/costnav_isaacsim/il_evaluation/configs/robot_segway.yaml;
fi;
navdp_policy_node --checkpoint $${MODEL_CHECKPOINT} --model_config /workspace/costnav_isaacsim/il_evaluation/configs/navdp_eval.yaml --robot_config $${ROBOT_CONFIG} $${GOAL_TYPE:+--goal_type $${GOAL_TYPE}} --topomap_dir /tmp/costnav_topomap"
network_mode: host
ipc: host
stdin_open: true
tty: true
# ROS2 with GNM policy
ros2-gnm:
profiles: ["gnm"]
image: costnav-ros2-torch:${COSTNAV_VERSION:-1.0.0}
container_name: costnav-ros2-gnm
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["${GPU_DEVICE_IDS:-0}"]
capabilities: [gpu]
depends_on:
isaac-sim:
condition: service_healthy
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
- NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-all}
- NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:-all}
- SIM_ROBOT=${SIM_ROBOT:-segway_e1}
- GOAL_TYPE=${GOAL_TYPE:-}
- MODEL_CHECKPOINT=${MODEL_CHECKPOINT:-checkpoints/gnm.pth}
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/costnav_topomap:/tmp/costnav_topomap:rw
- .:/workspace
working_dir: /workspace
command: >
bash -c "if [ \"$${SIM_ROBOT}\" = \"nova_carter\" ]; then
ROBOT_CONFIG=/workspace/costnav_isaacsim/il_evaluation/configs/robot_carter.yaml
else
ROBOT_CONFIG=/workspace/costnav_isaacsim/il_evaluation/configs/robot_segway.yaml
fi &&
gnm_policy_node --checkpoint $${MODEL_CHECKPOINT} --model_config /workspace/costnav_isaacsim/il_evaluation/configs/gnm_eval.yaml --robot_config $${ROBOT_CONFIG} $${GOAL_TYPE:+--goal_type $${GOAL_TYPE}} --topomap_dir /tmp/costnav_topomap"
network_mode: host
ipc: host
stdin_open: true
tty: true
# ROS2 with NoMaD policy
ros2-nomad:
profiles: ["nomad"]
image: costnav-ros2-torch:${COSTNAV_VERSION:-1.0.0}
container_name: costnav-ros2-nomad
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["${GPU_DEVICE_IDS:-0}"]
capabilities: [gpu]
depends_on:
isaac-sim:
condition: service_healthy
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
- NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-all}
- NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:-all}
- SIM_ROBOT=${SIM_ROBOT:-segway_e1}
- GOAL_TYPE=${GOAL_TYPE:-}
- MODEL_CHECKPOINT=${MODEL_CHECKPOINT:-checkpoints/nomad.pth}
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- /tmp/costnav_topomap:/tmp/costnav_topomap:rw
- .:/workspace
working_dir: /workspace
command: >
bash -c "if [ \"$${SIM_ROBOT}\" = \"nova_carter\" ]; then
ROBOT_CONFIG=/workspace/costnav_isaacsim/il_evaluation/configs/robot_carter.yaml
else
ROBOT_CONFIG=/workspace/costnav_isaacsim/il_evaluation/configs/robot_segway.yaml
fi &&
nomad_policy_node --checkpoint $${MODEL_CHECKPOINT} --model_config /workspace/costnav_isaacsim/il_evaluation/configs/nomad_eval.yaml --robot_config $${ROBOT_CONFIG} $${GOAL_TYPE:+--goal_type $${GOAL_TYPE}} --topomap_dir /tmp/costnav_topomap"
network_mode: host
ipc: host
stdin_open: true
tty: true
# Canvas model worker - serves the VLA model via HTTP API
# By default runs on localhost. To use a separate GPU server for better performance,
# set MODEL_WORKER_URI to point to the remote server and disable this service.
canvas-model-worker:
profiles: ["canvas"]
image: canvas:${CANVAS_VERSION:-latest}
container_name: costnav-canvas-model-worker
command: uvicorn main:app --host 0.0.0.0 --port ${MODEL_WORKER_PORT:-8200}
volumes:
- ${MODEL_PATH:-./checkpoints/canvas-costnav}:/app/model
environment:
- MODEL_PATH=/app/model
- LD_LIBRARY_PATH=
- CUDA_VISIBLE_DEVICES=${CUDA_VISIBLE_DEVICES:-0}
working_dir: /workspace/src/canvas/model_worker
ports:
- "${MODEL_WORKER_PORT:-8200}:${MODEL_WORKER_PORT:-8200}"
shm_size: '32gb'
tty: true
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# Canvas neural planner - queries remote model worker, publishes velocity predictions
canvas-neural-planner:
profiles: ["canvas"]
image: canvas:${CANVAS_VERSION:-latest}
container_name: costnav-canvas-neural-planner
environment:
- MODEL_WORKER_URI=${MODEL_WORKER_URI:-http://localhost:8200}
depends_on:
isaac-sim:
condition: service_healthy
volumes:
- ./costnav_isaacsim/canvas/apps/agent/config:/workspace/src/canvas/agent/neural_planner/config
- ./costnav_isaacsim/canvas/apps/agent/maps:/workspace/src/canvas/agent/neural_planner/maps
working_dir: /workspace/src/canvas/agent/neural_planner
command: /bin/bash -c "source /opt/ros/jazzy/setup.bash && python3 neural_planner.py --config config/config.yml"
network_mode: host
ipc: host
tty: true
# Canvas cmd_vel publisher - converts predictions to safe velocity commands
canvas-cmd-vel-publisher:
profiles: ["canvas"]
image: canvas:${CANVAS_VERSION:-latest}
container_name: costnav-canvas-cmd-vel-publisher
depends_on:
isaac-sim:
condition: service_healthy
volumes:
- ./costnav_isaacsim/canvas/apps/agent/config:/workspace/src/canvas/agent/cmd_vel_publisher/config
working_dir: /workspace/src/canvas/agent/cmd_vel_publisher
command: /bin/bash -c "source /opt/ros/jazzy/setup.bash && python3 cmd_vel_publisher.py --config config/segway_e1.yml"
network_mode: host
ipc: host
tty: true
# ROS2 with ViNT policy - for devcontainer development
ros2-vint-dev:
profiles: ["vint-dev"]
image: costnav-ros2-torch:${COSTNAV_VERSION:-1.0.0}
container_name: costnav-ros2-vint-dev
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ["${GPU_DEVICE_IDS:-0}"]
capabilities: [gpu]
environment:
- ROS_DISTRO=jazzy
- RMW_IMPLEMENTATION=rmw_fastrtps_cpp
- FASTRTPS_DEFAULT_PROFILES_FILE=/workspace/fastdds.xml
- ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
- DISPLAY=${DISPLAY:-:0}
- NVIDIA_VISIBLE_DEVICES=${NVIDIA_VISIBLE_DEVICES:-all}
- NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES:-all}
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- .:/workspace
working_dir: /workspace
command: sleep infinity
network_mode: host
ipc: host
stdin_open: true
tty: true