Originally published on the Tars Discovery blog. Cross-posted here with the same text and figures.

Concept illustration of a signal passing between Earth and a receiver.

Docking takes hours. A large space arm can take hours to capture one object. The safe answer to a weak link is slow motion, so the work moves slowly.

Our loop works another way. An operator in a browser moves a preview arm that answers at once. The operator then commits the move, and a robot arm inside a small satellite in low Earth orbit executes it. A custom transport, the Space Link Protocol, carries the commands, the robot state, and the video across the link between ground and orbit.

We measured the loop on an emulated link before we trusted it. On a ground-station pass, our software adds 27 ms at the 95th percentile to the time a goal takes to get an onboard acknowledgement, on top of the link delay itself. On a GEO relay with about 1.2 s round trip, it adds 32 ms. The gate we set was 100 ms. This post explains why we built the transport, what we built, how it works, and what the measurements show.

A small satellite in low Earth orbit does not have one link. It has a choice of carriers, and a mission buys the one it can afford. A direct ground-station pass gives about 10 minutes of contact in a 90-minute orbit. A GEO relay gives continuous contact at low rate. A LEO optical relay gives continuous contact at high rate. The three paths differ in delay, in rate, and in how often they drop.

Three terms carry this post. A Contact Window is a period when the link is up. Round-trip time is the time a message and its answer take to cross the link and return. Loss is the share of datagrams, the small packets the link carries, that never arrive. The worst carrier we design for gives a 64 kbps uplink, up to 1.5 s round-trip time, 5% loss, and outages with no contact at all.

So we set one design rule. The default way to command the robot must work on the worst link. Faster ways to command it may unlock only when a measured link is fast and clean enough. Everything in this post follows from that rule.

The loop in use

The operator works in a browser. The console shows a Ghost Arm, a preview of the robot that moves with the operator input and answers at once, because it runs on the ground. The operator shapes a move on the Ghost Arm first. No command has crossed the link yet.

In Supervised mode, the default, the operator commits the previewed move as a Motion Goal. The flight software checks the goal against joint, workspace, and speed limits. It then executes the goal on its own and reports the result. In Live mode, the console streams Setpoints, one Cartesian target after another at 30 per second, and the robot follows the newest valid one. Live mode is allowed only while round-trip time stays below 250 ms and loss stays below 2%.

The teleoperation loop

Operator console LiveKit on the ground Ground Gateway Space Link Protocol Flight Agent Robot
LiveKit stays on the ground. Only Space Link Protocol datagrams cross the space link.

Two safety rules hold in both modes. An Abort order preempts everything, and the robot stops at once. If Setpoints stop arriving, the robot slows to rest within 200 ms of the last Setpoint deadline. Two supporting systems run under the loop. A time-sync exchange keeps the flight clock within 5 ms of ground time after a warm-up period. Encryption with per-direction keys protects every datagram, and the receiver rejects replayed datagrams.

Why we did not use an off-the-shelf transport

WebRTC assumes the internet. Its connection setup costs several round trips on every reconnect. Its congestion control reacts badly to satellite delay and loss. A reliable data channel blocks behind one lost packet, so one loss delays every message queued behind it. On a link with 1.2 s round trip, each of those costs is large. On a link that drops for minutes, reconnect cost dominates the work.

We tested the alternative instead of arguing about it. We ran LiveKit, the media system we use on the ground, end to end across the emulated space link, with the flight side joining the room directly. It failed the gates on every carrier profile. Control resumed 4 to 67 s after outages, against our 2 s gate, because the server ends a silent participant session and forces a full rejoin. One Setpoint cost 302 to 354 link bytes, so a 30 Hz Live stream filled a 64 kbps uplink. On the GEO relay profile, 21 of 190 goals got an acknowledgement.

So we kept the split. LiveKit runs on the ground, between the browser and our Ground Gateway, where it handles browsers and many viewers well. The Space Link Protocol runs between the Ground Gateway and the Flight Agent, where the link is scheduled, narrow, and lossy. Each system works on the link it was designed for.

The protocol gives each message one of three delivery rules. The rule follows what the message means, not how large it is.

  • RELIABLE. The sender retries the message until the receiver acknowledges it, and the receiver delivers it once. An Abort uses this rule. It needs another chance to get through.
  • LATEST. Only the newest copy matters, and the sender never retransmits it. A Setpoint uses this rule. A stale target has no value once a newer one exists.
  • BEST_EFFORT. The sender sends the message once. A video frame uses this rule. A late frame is worth less than the next frame.

Priority enforces the rules when the link congests. The sender holds six priority classes. Abort traffic goes first, then control, then Setpoints, then telemetry, then video, then bulk data such as recorded experiment files. The sender also paces its sends to the link rate, so queues build in the sender, where priority applies, and not inside the link, where no order can change.

The second mechanism is redundancy before retransmission. A RELIABLE message first goes out as back-to-back copies in separate datagrams. The copy count follows the loss the receiver measures. One lost datagram then costs one datagram time, about 12.5 ms for a goal at 64 kbps, and not a round trip. Large video frames and bulk objects carry XOR parity, extra data that lets the receiver rebuild one lost piece per group without asking for it again. Only a message with no acknowledgement after a timeout goes out again, one copy at a time.

We state the cost next to the claim. Copies cost bytes. Depending on the message, a RELIABLE message costs 2.5 to 4.8 times its payload in link bytes. One parity piece per group is a weak code. It holds frame loss at about 5%. A stronger code would hold 1% at higher cost. We also record the failed detour. Our first design waited for acknowledgements and retransmitted on timeout. It missed the GEO gate, because one loss on that profile costs a full 1.2 s round trip. Redundancy is the price of not waiting.

Bulk data uses the capacity the higher priorities leave unused. The receiver checks a hash of the whole object before it accepts the object. It acknowledges the object only after it has stored the object. An outage in the middle of an object resumes where the transfer stopped, not from zero.

Results

We measured with a link emulator. The emulator shapes delay, rate, loss, and Contact Windows for each carrier profile, and it records the true delay of every exchange. Added latency means the measured time minus the link delay for that same exchange. The number therefore reports the time our software adds, and not the time the link itself takes. Each line below had a gate before we ran the test.

Profile Goal ack, added p95 Abort, added p99 Gate
Ground-station pass, 40 ms round trip, 1% loss 27 ms 20 ms Pass
GEO relay, about 1.2 s round trip, 5% loss 32 ms 23 ms Pass
LEO optical relay, 70 ms round trip, 0.5% loss 4 ms 4 ms Pass

Added latency over the link delay for the same exchange. Emulator, seed 1. Gate: goal at the 95th percentile at most 100 ms. Abort at the 99th percentile at most 100 ms.

Delivery held under the same runs. Every RELIABLE message arrived exactly once on all three profiles, in clean runs and in runs with outages. The receiver accepted zero of 10,000 datagrams with flipped bits and zero of 10,000 replayed datagrams. It verified all 8 bulk objects on each profile.

The full loop also ran outside the emulator. We ran direct control from Chicago to New York, a distance of about 715 miles, at about 55 ms round-trip time and about 0.1% loss. The straight-line distance from ground to a low Earth orbit satellite is about 300 miles. The distance run therefore covers more than twice the hop the space link makes, on a real network, with a person at the controls.

When the window closes

The demo follows one session through a loss of contact. The operator commits a goal. The Contact Window closes during the move. The robot finishes the validated goal, because the flight software checked its limits before the window closed, and then it holds still. A goal the operator commits during the outage waits in the ground sender. No stale Setpoint replays when the link returns, because newer state replaces older state in the queue.

One outage, in order

Link upWindow up. Goal commits
Link downWindow closes. Robot finishes the goal, then holds
Link upWindow opens. Queued goals send
ResumedControl resumes within 2 s
A validated goal finishes through the gap. Live Setpoints do not. They expire, and the robot rests.

When the window opens, the sender sends every unacknowledged RELIABLE message once more, and control resumes within 2 s with no operator action. We ran the full loop live with keyboard and mouse, with a gamepad, and with a custom tilt controller. The link router switched carrier paths during a task without dropping the session.