Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a75317c
Stop CI failing on shutdown races and float timing
yassinsolim Oct 31, 2026
405300e
Bring up the real arm through the MCP2515 carrier
yassinsolim Oct 31, 2026
7c523b8
Load vcan without linux-modules-extra on new runner kernels
yassinsolim Oct 31, 2026
c475892
Record why gravity compensation needs torque-controlled drives
yassinsolim Oct 31, 2026
10d1743
Keep arrival order when a frame rolls over during a buffer read
yassinsolim Oct 31, 2026
88e264b
Stop a failing frame log from interrupting drive control
yassinsolim Oct 31, 2026
bbee54e
Fix the bench-tool edge cases found in review of the carrier bring-up
yassinsolim Oct 31, 2026
2d8568f
Let teleop leave locked and disabled joints alone
yassinsolim Oct 31, 2026
adfe6ff
Let the drive node switch joints off while the arm is stopped
yassinsolim Oct 31, 2026
9440c7d
Hold the arm when a joint is switched off under teleop
yassinsolim Oct 31, 2026
49c66f0
Add a start-up guide that says what to do next
yassinsolim Oct 31, 2026
a4d11c1
Start the station on a Mac by double-click
yassinsolim Oct 31, 2026
081b851
Commit the launcher bundle that .gitignore hid
yassinsolim Oct 31, 2026
a725a52
Add RViz panels for the start-up steps and for switching joints
yassinsolim Oct 31, 2026
3a9c5db
Document the start-up guide, switching joints off and the app
yassinsolim Oct 31, 2026
e855595
Wait a few seconds before the start-up guide reports a problem
yassinsolim Oct 31, 2026
4043945
Save the new panels in the unified layout's window state
yassinsolim Oct 31, 2026
7abccab
Press Start again in the Cartesian launch test when the drives stop
yassinsolim Oct 31, 2026
90b17d6
Keep the incision group while the tool is through the incision point
yassinsolim Oct 31, 2026
156b04a
Do not offer the zero again once it has succeeded
yassinsolim Oct 31, 2026
c67b86b
End a station that is still starting when the app is quit
yassinsolim Oct 31, 2026
a25c83f
Read a burst of replies in one pass through a relay's socket port
yassinsolim Oct 31, 2026
2fd630a
Fix scripts affecting how files are run
Haroldmin1028 Oct 17, 2026
94616fd
Add short message when port in already in use
Haroldmin1028 Oct 24, 2026
f32335e
Test the simulated carrier through a carrier relay
yassinsolim Oct 31, 2026
e2e3aca
Ship the profile of the arm as built
yassinsolim Oct 31, 2026
571bf57
Start the real arm from Windows with the setup panel
yassinsolim Oct 31, 2026
96e9d77
Look for the carrier's COM port each time the relay opens it
yassinsolim Oct 31, 2026
d439c11
Close the setup panel when the arm is ready and reopen it for a problem
yassinsolim Nov 1, 2026
b2208aa
Keep the right-hand panels inside the screen
yassinsolim Nov 1, 2026
a3800b2
Say what a drive's health check found in the setup guide
yassinsolim Nov 1, 2026
f720fbc
Merge main into the arm start-up and launchers branch
yassinsolim Nov 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ ros2_aruco/
*.exe
*.out
*.app
# The launcher bundle is source, not a build result.
!packaging/macos/*.app
!packaging/macos/*.app/**

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
Expand Down
30 changes: 30 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,33 @@ services:
- joy_source:=udp
- joy_udp_bind:=0.0.0.0
- autoplay:=true

# The real arm from Windows. The carrier relay (waybionic_teleop.carrier_relay) runs on
# Windows and the drive node connects out to it, so the carrier needs no published port.
# arm_profile_bench.yaml says the arm has no tool drive; closing RViz ends the station.
# Launching the arm shouldn't depend on the unit tests passing on this machine, which are
# timing-sensitive, so this image stops at the build stage; CI has run the tests.
wslg-arm:
<<: *wslg
profiles: [wslg-arm]
image: waybionic_ground_station:arm
build:
context: .
dockerfile: docker/Dockerfile
target: build
cache_from:
- ghcr.io/waybionic/waybionic_ground_station:jazzy
ports:
- 127.0.0.1:47300:47300/udp
command:
- ros2
- launch
- waybionic_bringup
- ground_station.launch.py
- teleop:=true
- joy_source:=udp
- joy_udp_bind:=0.0.0.0
- drive_interface:=slcan
- drive_channel:=socket://host.docker.internal:47320
- arm_profile:=/waybionic_ws/install/waybionic_teleop/share/waybionic_teleop/config/arm_profile_bench.yaml
- exit_with_rviz:=true
186 changes: 174 additions & 12 deletions docs/operator_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,12 @@ bridge needs `python3-opencv`.

The controller plugs into the computer, not the Arduino. The computer runs teleop,
the Cartesian moves, the joint limits and collision checks, the RViz twin and the
monitor, then sends MKS frames through the carrier board: a UNO R4 WiFi with a
TJA1051T transceiver running `waybionic_can/arduino/carrier_bridge`. The carrier
only passes frames between USB and the CAN bus, and reports its own status.
monitor, then sends MKS frames through the carrier board: a UNO R4 with an MCP2515 CAN
module running `waybionic_can/arduino/carrier_bridge_mcp2515`. The carrier only passes
frames between USB and the CAN bus, and reports its own status.

```text
controller -> computer (ROS 2) -> USB, 1 Mbaud -> carrier -> CAN, 1 Mbit/s -> 5 MKS drives
controller -> computer (ROS 2) -> USB -> carrier -> CAN, 500 kbit/s -> 5 MKS drives
```

`waybionic_teleop/config/arm_drives.yaml` maps the joints to the drives: CAN IDs 1
Expand All @@ -323,8 +323,9 @@ unloaded, and keep the E-stop within reach.

The computer running ROS needs the carrier or a USB CAN adapter. Docker Desktop on
Windows and macOS can't reach USB devices, so use native ROS on macOS
([RoboStack](../BuildInstructions.md#macos-native-ros-with-robostack)) or Linux, or
Docker on Linux with `--network host` for a SocketCAN adapter.
([RoboStack](../BuildInstructions.md#macos-native-ros-with-robostack)), the
[carrier relay on Windows](#on-windows) or Linux, or Docker on Linux with
`--network host` for a SocketCAN adapter.

### On a Mac

Expand All @@ -344,14 +345,12 @@ then run these from the repository root.
```

2. **Set up each drive once,** alone on the bus: give it its CAN ID (they all ship
as 1), then switch it to 1 Mbit/s. The carrier keeps its first bit rate until it
resets, so replug it, connect every drive, and check they all answer.
as 1). Leave them at the factory 500 kbit/s, the most the arm's MCP2515 carrier
runs. Then connect every drive and check they all answer.

```bash
./scripts/macos.sh drives set-id 1 3 # for example the elbow
./scripts/macos.sh drives set-bitrate 3 1000000
# after every drive is switched: replug the carrier
./scripts/macos.sh drives --bitrate 1000000 scan
./scripts/macos.sh drives scan --ids 1 2 3 4 5
```

3. **Start the ground station.** With `tool` removed from `drives` in
Expand Down Expand Up @@ -380,6 +379,35 @@ then run these from the repository root.
each joint a known angle, such as 10 degrees in RViz, and measure it on the arm; a
different angle means its `gear_ratio` is wrong.

### Starting by double-click (Mac)

After the [macOS setup](../BuildInstructions.md#macos-native-ros-with-robostack), install
the app once from the repository root:

```bash
./scripts/macos.sh app
```

This puts **WayBionic Ground Station** in `~/Applications`; drag it to the Dock. The
copy in `packaging/macos/` also opens in place. Then, to start the arm:

1. Plug in the carrier, the controller (USB or Bluetooth) and power the drives.
2. Double-click the app. The first time, it offers to run the setup in Terminal, which
takes 30 to 60 minutes; open the app again when that finishes.
3. If the carrier is not plugged in, a dialog says so: plug it in and choose *Try again*,
or choose *Without the arm* to run the simulation. With several USB serial devices
connected, it asks which one is the carrier.
4. It then starts the station exactly as `./scripts/macos.sh arm` does (the arm profile
and the saved zero included), with RViz filling the screen. The Arm setup panel there
walks through what is left: the controller, the zero pose, Start.

Closing the RViz window, or quitting the app from the Dock, stops the station the way
Ctrl+C does, so each drive gets its stop first. The station's output goes to
`~/Library/Logs/WayBionic/` (the last 10 sessions are kept), and if it stops unexpectedly
the app offers to open the log. The app is not signed: if you download the repository as
a zip instead of cloning it, macOS asks you to confirm opening it once (right-click, then
Open).

### Remote operator

The controller can stay with an operator on another computer. On the operator's
Expand All @@ -399,6 +427,67 @@ On the Mac, listen on the network:
The receiver takes controller packets from any computer that can reach its port, so
do this only on a private network.

### On Windows

Docker Desktop can't open COM ports, so a small program on Windows, `carrier_relay`,
passes the carrier's port through `127.0.0.1:47320`, and the drive node in the container
connects to it as `socket://host.docker.internal:47320`. Besides
[Docker Desktop with WSLg](../BuildInstructions.md#windows-wslg), as for the other Windows
demos, it needs Python 3 on Windows and pyserial:

```powershell
python -m pip install pyserial
```

Flash the carrier first, as in step 1 of [On a Mac](#on-a-mac) (from a Mac, or with the
Arduino IDE).

**In one step:** plug in only the carrier, connect an Xbox controller and double-click
`scripts\windows-arm.cmd`. It starts Docker Desktop, the carrier bridge and the controller
bridge, then the ground station with `waybionic_teleop/config/arm_profile_bench.yaml`
(J1 to J5 driven, no tool). The first start builds the image, which takes a while. The Arm
setup panel in RViz then walks through what is left: put the arm in its zero pose, press
**Zero the arm**, then press Start on the controller. The zero is not kept between runs on
Windows, so do this every time. Closing RViz, or Ctrl+C in the script's window, stops the
ground station first, so each drive gets its stop, then the bridges.

**Step by step,** from the repository root. The bridge serves one connection at a time, so
let each command finish before the next. If `docker` is not recognized, see
[its troubleshooting](../BuildInstructions.md#docker-is-not-recognized-on-windows).

1. Start the bridge in its own PowerShell window and leave it running. It looks for the
Arduino's COM port each time it opens the carrier, so plugging the carrier in after it
starts, or replugging it under another COM number, is fine; with several Arduinos plugged
in, pass `--port COM5`. Wait for `Carrier open; waiting for the ground station`: the
drive node stops at start-up if nothing is listening.

```powershell
cd waybionic_teleop
python -m waybionic_teleop.carrier_relay
```

2. Scan the drives from a second window:

```powershell
docker compose run --rm --build wslg-arm ros2 run waybionic_teleop mks_setup --channel socket://host.docker.internal:47320 scan --ids 1 2 3 4 5
```

3. Start the controller bridge in a third window, then the ground station:

```powershell
cd waybionic_teleop
python -m waybionic_teleop.xinput_bridge
```

```powershell
docker compose run --rm --build --service-ports wslg-arm
```

Stopping the bridge or unplugging the carrier closes the connection, so the drive node
loses the carrier as it does when the USB cable is pulled on a Mac: every drive stops and
the arm must be zeroed again. The bridge listens only on `127.0.0.1`; keep it local,
because anything that connects to it can drive the arm.

### On Linux

With the carrier, set up the drives as in step 2 above, with `mks_setup`, then
Expand Down Expand Up @@ -431,7 +520,8 @@ and zero as below. CI runs `waybionic_teleop/test/test_can_drives.py` over `vcan

The encoders count from where the drives were powered on, so the host publishes no
joint states and moves nothing until the arm is zeroed. Put the arm in the zero pose
(the pose RViz shows before anything moves), leave teleop disabled, and run:
(the pose RViz shows before anything moves), leave teleop disabled, and press **Zero the
arm** in the Arm setup panel (see [Start-up guide](#start-up-guide)), or run:

```bash
ros2 service call /sim_arm_drives/zero std_srvs/srv/Trigger
Expand Down Expand Up @@ -490,6 +580,78 @@ service waits. A refused stop frame is sent again on every tick, and Start is
refused until it has gone out. After any stop, disable teleop and press Start
again.

### Start-up guide

The **Arm setup** panel (top of RViz's right-hand dock) lists what is left to do before the
arm can be operated, one thing at a time. The `setup_guide` node builds the list from the
same diagnostics the station already publishes, and also says each change in the terminal.

| Step | Done when | If it isn't |
| --- | --- | --- |
| Carrier | the carrier reports on USB and its E-stop is not pressed | plug in its USB-C cable; if it is plugged in but silent, replug it or flash it |
| Drives | every drive that is switched on answers and passes its health check | the panel names the drive and what is wrong: no answer (with its CAN ID, so check its power and wiring, or switch its joint off, below), a failed move, or the health check, such as `following error: 6.3 deg off its target` |
| Controller | `/joy` input is arriving | connect an Xbox controller (USB or Bluetooth) and press a button |
| Zero | every drive that is switched on is zeroed or kept its saved zero | put the arm in its zero pose and press **Zero the arm** (it asks you to confirm) |
| Ready | teleop is enabled | press Start (the Menu button) on the controller |

The controller needs no other step: the guide shows it as connected once input arrives. Once
every step is done, including Start, and the arm has stayed ready for four seconds, the panel
closes so the other panels get its room. It opens again when something needs you: a step
before Ready is to do or blocked, such as the controller dropping out, a drive losing its zero
or the carrier being unplugged, or Ready is blocked because the drives stopped the arm. A step
that is only being checked does not open it, and neither does stopping teleop (B or Start),
which leaves only Start to press. The panel's close button, or Panels > SetupPanel, shows or
hides it by hand, and it is not hidden again until the arm next becomes ready.

If the guide itself is not running, the panel says so. A station started without the arm, such
as the plain `wslg` viewer, has no guide: the arm launchers (`scripts\windows-arm.cmd`,
`./scripts/macos.sh arm`) start it with `teleop:=true`. Nothing in the panel moves the arm.

### Switching joints off

The **Joint control** panel, below Arm setup, has a checkbox for each joint (J1 to J5 and the
tool). Unchecking one switches that joint off:

- The drive stays powered and holds where it is. It is not released, so the joint does not
fall or move by itself.
- The sticks and triggers that were mapped to it do nothing, so the controller no longer
vibrates when you push a stick that needs a joint you don't want. The Cartesian and
incision groups need every joint, so they are left out of the group cycle while any joint
is off or unfitted.
- A drive whose joints are all off may be faulty or missing: it no longer stops the arm,
keeps the zero service from succeeding or keeps the arm from being enabled. The two wrist
drives move both wrist joints together, so switching off only J4 or only J5 still needs both
drives, which then hold that joint; switch off both to ignore a wrist drive.

A change is only taken while teleop is stopped and no joint command has arrived for a second,
as for zeroing. Otherwise the panel shows why, and the box stays as it was. Turning a joint
back on needs its drive answering and zeroed before the arm can be enabled again, so after
fitting or repairing a drive, put the arm in the zero pose and zero it.

The state is not saved: after a restart every fitted joint is on. A joint that has no drive
at all, such as the tool on the bench arm, is shown as *no drive* and cannot be switched
here. It comes from the arm profile (`~/.waybionic/arm_profile.yaml` on a Mac,
`waybionic_teleop/config/arm_profile_bench.yaml` for the Windows launcher):

```yaml
# Bench arm: J1 to J5 have a drive (CAN IDs 1 to 5), and there is no tool.
fitted_drives: [base_yaw, shoulder, elbow, wrist_left, wrist_right]
locked_joints: {tool_grip: 0.0}
```

To fit another drive later, give it its CAN ID (`./scripts/macos.sh drives set-id 1 6` with
only that drive on the bus), add it to `fitted_drives`, delete its joint from
`locked_joints`, restart the station and zero. Its joint then has a checkbox like the
others. A drive that isn't wired is left out of `fitted_drives` and its joints are locked, as
the shoulder's were before it was wired: `locked_joints: {joint_2: 0.0, tool_grip: 0.0}`.

Without the panel, from a terminal:

```bash
ros2 service call /arm/joint_3/set_enabled std_srvs/srv/SetBool "{data: false}"
ros2 topic echo /arm/joint_control
```

### Powered hand-guiding

Powered hand-guiding is not enabled yet. A stopped drive holds position; disabling
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>WayBionic Ground Station</string>
<key>CFBundleDisplayName</key>
<string>WayBionic Ground Station</string>
<key>CFBundleIdentifier</key>
<string>org.waybionic.groundstation</string>
<key>CFBundleExecutable</key>
<string>WayBionicGroundStation</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>13.0</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
Loading