Skip to content

Commit 69ddb37

Browse files
committed
feat: adds Session Setup. Updates other data. Needst to be verified
1 parent 140ce53 commit 69ddb37

1 file changed

Lines changed: 90 additions & 43 deletions

File tree

Setup/README.md

Lines changed: 90 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ This guide covers installation of the full system. The system has two components
77

88
## System Overview
99

10-
| Component | Machine | OS |
11-
|---|---|---|
12-
| Frontend | Operator machine | Windows 11 |
13-
| Backend — Windows installer | Any Windows machine | Windows 11 |
14-
| Backend — Franka Emika | Dedicated Linux PC | Ubuntu 20.04 (RT kernel) |
10+
| Component | Machine | OS |
11+
|-----------------------------|---------------------|--------------------------|
12+
| Frontend | Operator machine | Windows 11 |
13+
| Backend — Windows installer | Any Windows machine | Windows 11 |
14+
| Backend — Franka Emika | Dedicated Linux PC | Ubuntu 20.04 (RT kernel) |
1515

1616
The Windows backend installer supports all adapters that do not require a Linux environment — currently Mock and Universal Robots. The Franka adapter requires a dedicated Linux setup described in Part 3.
1717

@@ -37,21 +37,21 @@ Open PowerShell as Administrator (right-click → *Run as Administrator*) and ru
3737
irm https://raw.githubusercontent.com/Meisdy/Speech-to-Code-Generation-for-Collaborative-Robots/main/Setup/setup_frontend.ps1 | iex
3838
```
3939

40-
The script installs `ffmpeg` and `uv` via winget if not present, downloads the frontend to `C:\Program Files\Speech-to-Cobot`, creates a Desktop shortcut, and pre-downloads the Whisper base model (~140 MB).
40+
The script installs `ffmpeg` and `uv` via winget if not present, downloads the frontend to `C:\Program Files\Speech-to-Cobot`, creates a Desktop shortcut, and pre-downloads the Whisper small model (~466 MB).
4141

4242
### Launch
4343

4444
Double-click **Speech-to-Cobot** on the Desktop.
4545

4646
### Uninstall
4747

48-
Run the following in Administrator PowerShell, or run `uninstall_frontend.ps1` directly from the install directory if internet is not available:
48+
Run the following in Administrator PowerShell, or run `uninstall_frontend.ps1` directly from the installation directory if internet is not available:
4949

5050
```powershell
5151
irm https://raw.githubusercontent.com/Meisdy/Speech-to-Code-Generation-for-Collaborative-Robots/main/Setup/uninstall_frontend.ps1 | iex
5252
```
5353

54-
Removes the install directory, Desktop shortcut, and Whisper model cache. Optionally removes `ffmpeg` and `uv` — you will be prompted for each. LM Studio must be removed manually via **Settings → Apps**.
54+
Removes the installation directory, Desktop shortcut, and Whisper model cache. Optionally removes `ffmpeg` and `uv` — you will be prompted for each. LM Studio must be removed manually via **Settings → Apps**.
5555

5656
---
5757

@@ -78,13 +78,13 @@ Double-click **Speech-to-Cobot Backend** on the Desktop. A terminal window opens
7878
Before running with a real UR robot, verify the following in `Backend\config_backend.py`:
7979

8080
- `BINDING_ADDRESS` — ZeroMQ binding address (default: `tcp://*:5555`)
81-
- `PC_IP` — IP address of the backend machine as seen by the UR robot (required for motion callback)
81+
- `PC_IP` — IP address of the backend machine as seen by the UR robot (required for motion callback — not used for Franka)
8282

8383
The robot IP is configured in the UR controller at `Backend\robot_controllers\ur_controller.py` (`DEFAULT_ROBOT_IP`).
8484

8585
### Uninstall
8686

87-
Run the following in Administrator PowerShell, or run `uninstall_backend.ps1` directly from the install directory if internet is not available:
87+
Run the following in Administrator PowerShell, or run `uninstall_backend.ps1` directly from the installation directory if internet is not available:
8888

8989
```powershell
9090
irm https://raw.githubusercontent.com/Meisdy/Speech-to-Code-Generation-for-Collaborative-Robots/main/Setup/uninstall_backend.ps1 | iex
@@ -113,27 +113,69 @@ Refer to the official documentation for each:
113113

114114
### Backend installation
115115

116-
Once the ROS stack is confirmed working, install the backend Python dependencies into the ROS Python environment:
116+
Once the ROS stack is confirmed working, install the backend Python dependencies into the ROS Python environment.
117117

118-
```bash
119-
pip install pyzmq numpy scipy
120-
```
118+
### Launch
121119

122-
Download or clone the repository and navigate to the repo root:
120+
Start the backend server (from the right directory):
123121

124122
```bash
125-
cd ~/path/to/repo
123+
python -m Backend.main
126124
```
127125

128-
### Launch
126+
The backend connects to the robot at `192.168.1.100` by default. Verify the robot IP in `Backend/robot_controllers/franka_controller.py` (`ROBOT_IP`).
129127

130-
Start the backend server:
128+
---
131129

132-
```bash
133-
python -m Backend.main
134-
```
130+
## Part 4 — Robot Preparation (Per-Session)
131+
132+
These steps are required before each evaluation or usage session.
133+
They cover physical robot preparation and are distinct from the software
134+
installation steps in Parts 1–3.
135135

136-
The backend connects to the robot at `192.168.1.100` by default. Verify the robot IP in `Backend/robot_controllers/franka_controller.py` (`ROBOT_IP`) and the backend machine IP in `Backend/config_backend.py` (`PC_IP`).
136+
---
137+
138+
### UR10e
139+
140+
1. Power on the UR10e via the Start Button on the Teach Pendant
141+
2. After Startup, On the UR pendant, set the robot mode to **Remote Mode** (top right corner)
142+
3. *(First-time only)* Verify the robot's IP address:
143+
`Menu → About → IP address`. Robot IPs are typically pre-configured
144+
to a consistent address (and can be modified) — confirm it matches `DEFAULT_ROBOT_IP` in
145+
`Backend/robot_controllers/ur_controller.py`.
146+
4. Plug the robot Ethernet cable into the robot and the backend machine.
147+
5. *(First-time only)* Configure the laptop Ethernet adapter with a static
148+
IP on the same subnet as the robot
149+
6. Launch the frontend and the backend server on the machine. When all IPs are correct and the network connection is working, the frontend's **Ping Backend** button will show a green indicator and the system is ready.
150+
151+
> **Note:** Always set Remote Mode before a session. If the robot is left in Local Mode, motion commands will silently fail — the backend sends the command, the robot acknowledges it, but does not move. Gripper and save-position commands continue to work normally in Local Mode, which can make the root cause hard to identify. Always confirm Remote Mode is active before proceeding.
152+
153+
---
154+
155+
### Franka Emika Panda
156+
157+
1. Power on the Franka controller using the controller switch
158+
2. Start the Linux PC (running the real-time kernel)
159+
3. Connect the robot controller to the Linux PC via Ethernet
160+
4. *(First-time only)* Configure the Linux PC Ethernet adapter with a static IP
161+
on the same subnet as the robot
162+
5. Connect the frontend machine to the Linux PC via Ethernet
163+
6. *(First-time only)* Configure both Ethernet adapters (Linux PC and operator machine)
164+
with static IPs on the same subnet. Update `BACKEND_IPS` in `Frontend/config_frontend.py`
165+
with the resulting addresses
166+
7. Open a browser and navigate to `https://<franka-robot-ip>`. Accept the certificate
167+
warning — Desk uses a self-signed certificate
168+
8. Unlock the joints using the Desk interface
169+
9. Engage the latching button (connected to X4 on the Arm base) once — the robot
170+
indicator changes from purple *(after startup only)* to white (hand-guide mode)
171+
10. Release the latching button to exit hand-guide mode — the indicator turns blue (Ready)
172+
11. In Desk, click **Activate FCI** — the indicator stays blue, FCI window appears
173+
12. Start the backend on the Linux PC
174+
13. Start the frontend on the operator machine. When all IPs are correct and the backend
175+
is reachable, the **Ping Backend** button shows a green indicator and the system is ready
176+
177+
> **Note:** The Franka must be in Ready (blue) state for motion commands to execute.
178+
> If left in hand-guide mode (white), the robot accepts commands but will not execute them.
137179
138180
---
139181

@@ -143,27 +185,32 @@ Both components have a single configuration file that covers all runtime paramet
143185

144186
**Frontend — `Frontend/config_frontend.py`**
145187

146-
| Parameter | Description |
147-
|---|---|
148-
149-
| `ASR_MODEL_SIZE` | Whisper model size: `tiny`, `base`, `small`, `medium`, `large` |
150-
| `LLM_API_BASE` | LM Studio server URL (default: `http://localhost:1234/v1`) |
151-
| `LLM_MODEL_NAME` | Model name as shown in LM Studio |
152-
| `BACKEND_IPS` | ZeroMQ addresses for each robot backend |
153-
| `LOGGING_LEVEL` | Console log verbosity: `DEBUG`, `INFO`, `WARNING`, `ERROR` |
154-
| `LOGGING_SAVE_AUDIO` | Save microphone input as `.wav` for debugging |
155-
| `LOGGING_SAVE_PARSE` | Save LLM output as `.json` for debugging |
188+
| Parameter | Description |
189+
|----------------------------|----------------------------------------------------------------|
190+
| `ASR_MODEL_SIZE` | Whisper model size: `tiny`, `base`, `small`, `medium`, `large` |
191+
| `LLM_API_BASE` | LM Studio server URL (default: `http://localhost:1234/v1`) |
192+
| `LLM_MODEL_NAME` | Model name as shown in LM Studio |
193+
| `BACKEND_IPS` | ZeroMQ addresses for each robot backend |
194+
| `ROBOT_TYPE_KEYS` | Maps GUI display names to backend robot types |
195+
| `MAX_ATTEMPTS` | Retry attempts when backend is unreachable (default: 2) |
196+
| `ASR_LANGUAGE` | ISO language code for ASR (default: `en`) |
197+
| `ASR_SAMPLE_RATE` | Audio sample rate in Hz — Whisper expects 16000 |
198+
| `ASR_CONFIDENCE_THRESHOLD` | Warn on transcripts below this threshold (0.0–1.0) |
199+
| `LOGGING_LEVEL` | Console log verbosity: `DEBUG`, `INFO`, `WARNING`, `ERROR` |
200+
| `LOGGING_LEVEL_FILE` | File log verbosity (can be more verbose than console) |
201+
| `LOGGING_SAVE_AUDIO` | Save microphone input as `.wav` for debugging |
202+
| `LOGGING_SAVE_PARSE` | Save parsed JSON for parser debugging |
156203

157204
**Backend — `Backend/config_backend.py`**
158205

159-
| Parameter | Description |
160-
|---|---|
161-
| `BINDING_ADDRESS` | ZeroMQ binding address (default: `tcp://*:5555`) |
162-
| `AVAILABLE_ROBOTS` | List of adapters to load: `mock`, `ur`, `franka` |
163-
| `PC_IP` | IP of the backend machine as seen by the UR robot (required for motion callback) |
164-
| `LOGGING_LEVEL` | Console log verbosity |
165-
166-
206+
| Parameter | Description |
207+
|----------------------|------------------------------------------------------------------------------------------|
208+
| `BINDING_ADDRESS` | ZeroMQ binding address (default: `tcp://*:5555`) |
209+
| `ZMQ_TIMEOUT_MS` | ZeroMQ socket timeout in milliseconds (default: 1000) |
210+
| `AVAILABLE_ROBOTS` | List of adapters to load: `mock`, `ur`, `franka` |
211+
| `PC_IP` | IP of the backend machine as seen by the UR robot (required for UR motion callback only) |
212+
| `LOGGING_LEVEL` | Console log verbosity |
213+
| `LOGGING_LEVEL_FILE` | File log verbosity |
167214

168215
The frontend connects to the backend via ZeroMQ on port `5555`. How you configure the network depends on your physical setup.
169216

@@ -175,10 +222,10 @@ Once the network is configured, update `Frontend/config_frontend.py` with the co
175222

176223
```python
177224
BACKEND_IPS = {
178-
"franka": "tcp://<franka-pc-ip>:5555",
179-
"ur": "tcp://<ur-backend-ip>:5555",
225+
"franka": "tcp://192.168.2.20:5555", # Linux PC running Franka backend
226+
"ur": "tcp://localhost:5555", # UR backend runs on operator machine
180227
"mock": "tcp://localhost:5555",
181228
}
182229
```
183230

184-
Use the **Ping Backend** button in the frontend GUI to verify the connection before issuing commands. A green indicator confirms the backend is reachable. If it stays red, check that the backend is running, the IPs are correct, and port `5555` is not blocked by the firewall.
231+
Use the **Ping Backend** button in the frontend GUI to verify the connection before issuing commands. A green indicator confirms the backend is reachable. If it stays red, check that the backend is running, the IPs are correct, and port `5555` is not blocked by the firewall.

0 commit comments

Comments
 (0)