Alina Lozovskaya
commited on
Commit
·
ad7e095
1
Parent(s):
59577a2
Add use --gradio flag when running in simulation mode
Browse files
src/reachy_mini_conversation_demo/main.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
"""Entrypoint for the Reachy Mini conversation demo."""
|
| 2 |
|
| 3 |
import os
|
|
|
|
| 4 |
|
| 5 |
import gradio as gr
|
| 6 |
from fastapi import FastAPI
|
|
@@ -36,6 +37,12 @@ def main():
|
|
| 36 |
logger.warning("Head tracking is not activated due to --no-camera.")
|
| 37 |
|
| 38 |
robot = ReachyMini()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
camera_worker, _, vision_manager = handle_vision_stuff(args, robot)
|
| 41 |
|
|
|
|
| 1 |
"""Entrypoint for the Reachy Mini conversation demo."""
|
| 2 |
|
| 3 |
import os
|
| 4 |
+
import sys
|
| 5 |
|
| 6 |
import gradio as gr
|
| 7 |
from fastapi import FastAPI
|
|
|
|
| 37 |
logger.warning("Head tracking is not activated due to --no-camera.")
|
| 38 |
|
| 39 |
robot = ReachyMini()
|
| 40 |
+
|
| 41 |
+
# Check if running in simulation mode without --gradio
|
| 42 |
+
if robot.client.get_status()["simulation_enabled"] and not args.gradio:
|
| 43 |
+
logger.error("Simulation mode requires Gradio interface. Please use --gradio flag when running in simulation mode.")
|
| 44 |
+
robot.client.disconnect()
|
| 45 |
+
sys.exit(1)
|
| 46 |
|
| 47 |
camera_worker, _, vision_manager = handle_vision_stuff(args, robot)
|
| 48 |
|