Emergency Stops, Watchdogs and Failsafes: Designing Safety Into a Field Robot
Tom Cosgrove,

TL;DR: Robot emergency stop failsafe design works in layers, not as a single switch. A hardware E-stop can remove motor power or disable drive torque through a hardwired circuit that is independent of normal control software. A software stop command zeroes velocity but depends on a healthy CPU, OS, and network. Between them sit communication watchdogs, velocity and acceleration limits, and a defined safe-stop behavior. For a field robot like the Leo Rover, the practical rule is simple: every layer must fail toward “stopped,” and no layer should depend on the layer above it to work.
Why does robot emergency stop failsafe design need more than one layer?
A mobile robot operating outdoors fails in ways a fixed industrial arm does not. Wi-Fi drops behind a concrete wall. A ROS 2 node segfaults mid-mission. The onboard computer thermal-throttles in direct sun and may stop publishing commands for hundreds of milliseconds. A connector vibrates loose on gravel. Any one of these can leave a drive motor commanded at the last received velocity.
Single-point safety fails because every mechanism has a failure mode that defeats it. If your only stop is a ROS 2 topic, a kernel panic disables it. If your only stop is a hardware button on the chassis, nobody can reach it when the robot is 40 meters away heading toward a slope. Robot emergency stop failsafe design assumes each layer will fail and asks what catches the robot next.
The layered model used across field robotics looks like this, ordered from the most independent to the most software-dependent:
- Layer 0 – Power isolation: main battery disconnect, protective fuses, and the hardware E-stop contactor or safety relay. Independent of normal control firmware.
- Layer 1 – Motor controller limits: current limits, stall detection, and a controller-level command timeout running in firmware.
- Layer 2 – Communication watchdogs: timeouts on the teleoperation link, the ROS 2 command topic, and heartbeat exchanges between subsystems.
- Layer 3 – Motion envelope: velocity, acceleration, and jerk limits applied before commands reach the drivers.
- Layer 4 – Behavioral safety: geofencing, tilt detection, obstacle-based stops from perception.
Layers 3 and 4 improve safety, but they are not safety functions unless they are designed, implemented, and validated as such. They depend on correct software and sensors. Layers 0 and 1 are what you rely on when normal software control is wrong or unavailable.
How does a hardware E-stop differ from a software stop?
The distinction matters more than most first-time integrators expect, and getting it wrong is a common gap in robot emergency stop failsafe design.
Hardware E-stop
A hardware emergency stop uses a mechanically latching actuator and a hardwired safety circuit to remove energy from the actuators or place them in a safe torque-off or disabled state. Pressing it opens or de-energizes the safety circuit. Normal control software does not participate in the decision. Key properties you should insist on:
- Normally closed contacts. A broken wire or pulled connector opens the circuit and stops the robot. This is the fail-safe wiring convention used in machinery safety generally.
- Mechanical latching. The button stays depressed until deliberately twisted or pulled. It does not reset itself.
- No automatic restart. Releasing or resetting the button must not immediately restart hazardous motion. A separate, deliberate restart action is required.
- Direct action on actuator power or enable. The safety circuit should cut the motor supply, remove drive enable, or invoke a safety-rated torque-off function, not merely signal a GPIO pin that software reads.
On small platforms a common compromise is to cut the motor bus while keeping the onboard computer and radio powered. This is deliberate: it keeps telemetry alive so you can see that the robot is stopped and why. The tradeoff is that you now depend on the contactor and its wiring being correct, because the computer is still running and could, in principle, send commands if motor power were restored.
Software stop
A software stop is a command: a zero geometry_msgs/Twist on /cmd_vel, a lifecycle transition, a service call that disables a controller. It is fast to implement, available remotely, and can be triggered by any logic you write. It is also only as reliable as the CPU, the scheduler, the network, and every node in the chain.
Useful mental model: the software stop is for the cases where the system is healthy and you want the robot to stop cleanly. The hardware E-stop is for cases where the system is not healthy. Designing one to cover both roles is where robot emergency stop failsafe design usually breaks down.
Side-by-side comparison
- Latency: hardware E-stop action includes safety-relay or contactor switching time, followed by motor and vehicle deceleration. Software stop adds network transport, ROS 2 middleware, and node scheduling – often tens of milliseconds on a healthy system, but potentially unbounded on an unhealthy one.
- Coverage: a properly hardwired hardware path can cover CPU hangs, kernel panics, and rogue software. A software stop does not reliably cover these failures.
- Range: hardware requires physical access unless you add a wireless E-stop receiver. Software works from anywhere with a functioning link.
- Stopping quality: hardware may cut torque, so the robot coasts or brakes depending on the motor driver’s behavior. Software can execute a controlled deceleration ramp.
- Diagnostics: software stops can be logged with full context. Hardware stops are often a single state bit unless you instrument the safety circuit or contactor.
Note the stopping-quality tradeoff. Cutting power to a drivetrain on a slope is not always the safest outcome. If the motors free-wheel, the robot may roll. Brushed DC drivers that short the motor terminals when de-energized provide dynamic braking; others go high-impedance. You need to know which behavior your hardware exhibits before you declare the E-stop path safe, and you should verify it on a controlled ramp test, not only in a datasheet.
What should a communication watchdog actually do?
The link-loss watchdog is the layer that most directly protects a teleoperated field robot. Its job is narrow: detect that commands have stopped arriving and put the robot into a defined state before it travels far.
A practical implementation has three timers rather than one, because different failures need different responses:
- Command timeout (short, roughly 100-500 ms): if no /cmd_vel message has arrived within this window, ramp velocity to zero. This is the normal case for a brief Wi-Fi hiccup. Whether motion may resume automatically when commands return must be determined by the risk assessment.
- Link heartbeat timeout (medium, roughly 1-3 s): if the operator station heartbeat is gone, treat the link as lost. Hold zero velocity, raise a diagnostic, optionally trigger a return-to-safe-state behavior if the robot is autonomous.
- Control loop watchdog (short, hardware level): if the microcontroller or motor driver stops receiving setpoints from the main computer within its own timeout, it disables outputs independently. This is the one that survives a frozen CPU.
The third timer is the important one and the one most often missing. If your watchdog runs as a ROS 2 node on the same computer as the rest of the stack, a system-level freeze takes the watchdog down with everything else. A watchdog must run on a different fault domain than the thing it watches. In practice that means firmware on the motor controller or on a dedicated microcontroller, or a hardware watchdog timer that the main computer must periodically kick.
Timeout values are a tradeoff you set deliberately. Too short and normal network jitter causes stutter; the robot becomes unusable over Wi-Fi at range. Too long and the robot keeps driving after a genuine failure. A quick way to size it: multiply your maximum safe velocity by the timeout and ask whether that distance is acceptable. At 0.4 m/s, a 500 ms timeout means roughly 0.2 m of travel plus deceleration distance. At 1.5 m/s, the same timeout means roughly 0.75 m. The faster the platform, the tighter the watchdog must be.
ROS 2 gives you useful tools here. QoS deadline policies on the command topic can notify a subscriber when a publisher misses its expected period. Liveliness policies can help a subscriber detect that a publisher is no longer alive. These are not a substitute for a firmware watchdog, but they can catch problems earlier and with better diagnostics than a hand-rolled timer.
How do speed limits and safe stopping fit into the stack?
Velocity limiting is one of the cheapest safety measures available. Kinetic energy scales with the square of speed. Halving the maximum velocity of a robot cuts its kinetic energy to a quarter. For a field robot working near people, a software-enforced speed cap can substantially reduce risk.
Apply limits at the lowest practical point in the chain. A limit applied in a high-level planner can be bypassed by a teleop node publishing directly to /cmd_vel. A limit applied in the base driver or in the motor controller firmware cannot. The general principle in robot emergency stop failsafe design is that constraints belong as close to the actuator as you can put them.
The limits worth enforcing, with the reasoning for each:
- Maximum linear velocity: caps kinetic energy and bounds watchdog stopping distance.
- Maximum angular velocity and lateral acceleration: helps prevent tip-over on platforms with a high center of mass and limits payload disturbance.
- Maximum acceleration: prevents wheel slip, current spikes, and jerky motion that upsets sensors such as IMUs and lidar.
- Maximum deceleration during a safe stop: counterintuitive, but stopping too hard can tip a tall robot forward or throw a payload. A controlled ramp is often safer than an instant halt.
- Current limit per motor: protects the drivetrain and can help detect a jammed wheel or abnormal load.
What “safe stop” means in practice
Define the target state explicitly rather than assuming “stopped” is self-evident. A useful definition for a wheeled UGV includes all of the following:
- Commanded velocity is zero, and lack of movement is verified where practical using wheel encoders and, when required, an independent measurement.
- Motor drivers are in a defined state – either actively braking or disabled, and you know which.
- Any payload actuators, such as an arm or a mast, are also brought to an appropriate safe state, such as halted, braked, or mechanically secured.
- The robot will not restart hazardous motion without an explicit operator action.
- Status is published and visible to the operator, including the reason for the stop.
That last point matters for field work. A robot that stops silently is indistinguishable from a robot that has lost power. Publishing a structured diagnostic – watchdog timeout, E-stop engaged, overcurrent, tilt threshold exceeded – turns a confusing recovery into a 30-second fix.
When should you look at formal safety standards?
Research and prototyping platforms generally operate under the supervision of a trained operator in a controlled area, which is a different regime from a machine deployed unattended in a workplace. The moment a robot operates near untrained people, carries significant payload, or runs unsupervised, the conversation changes.
The relevant standards to be aware of include ISO 12100 for risk assessment and risk reduction, ISO 13850 for emergency-stop functions, ISO 13849 and its performance level framework for safety-related parts of control systems, IEC 62061 for safety-related control systems, and ISO 3691-4 for driverless industrial trucks. Robot emergency stop failsafe design in a certified context requires documented risk assessment, architecture that meets the applicable target performance level or safety integrity level, and validation evidence. That is a systems engineering effort, not a component purchase.
Fictionlab does not make conformity declarations on behalf of integrators for their specific applications. The platforms are built as open, documented development bases; what safety level a final deployment reaches depends on the integrator’s risk assessment, chosen components, and validation. If you are heading toward a regulated deployment, start the risk assessment before you finalize the mechanical design, because safety architecture is far cheaper to add early than to retrofit.
How do you validate the safety chain before field deployment?
Design is half the work. The other half is proving each layer behaves as intended under the conditions that actually occur in the field.
A minimum test sequence, performed with the robot on blocks first and then on the ground in a controlled test area:
- E-stop under full load. Command maximum velocity, press the E-stop, measure stopping distance. Repeat on the steepest slope the robot is intended to operate on. Confirm that post-stop behavior, including any rolling, is acceptable for the risk assessment.
- Broken-wire test. Disconnect the E-stop loop while driving. The robot must stop. If it does not, investigate the circuit, contact state, and wiring.
- Link loss. Power down the operator station or disable its radio mid-drive. Measure the time and distance to zero velocity.
- Process kill. Terminate the teleop node, then the base driver node, then the entire ROS 2 stack. Each case should produce a stop within the applicable watchdog period.
- CPU freeze simulation. Suspend the main control process with SIGSTOP. This simulates a stalled process without a clean shutdown. An independent firmware or hardware watchdog should catch this condition.
- Restart behavior. After each stop condition clears, verify the robot does not move until an explicit operator command is given.
Record the measured stopping distances. They are the numbers you will need when someone asks how close the robot can safely operate to a person or an obstacle, and they are specific to your payload, tires, and surface. Do not transfer them between configurations.
FAQ
Can a software E-stop replace a hardware E-stop?
No. A software stop cannot reliably act when the computer running it has frozen, crashed, or lost communication with the drive system. It is a useful convenience layer and should be implemented, but it does not cover the failure modes a hardware E-stop exists to cover. The two are complementary, not alternatives.
What is a reasonable watchdog timeout for a teleoperated rover?
It depends on your maximum velocity and your link quality. A common starting point for command timeouts on slow platforms is in the 200-500 ms range, with a firmware-level timeout of similar magnitude. Size it by multiplying maximum velocity by the timeout and checking whether the resulting travel distance is acceptable in your environment, then test it in the actual radio conditions you will operate in.
Should the emergency stop cut power to the onboard computer as well?
Usually not on a development platform. Keeping the computer powered preserves telemetry, logs, and the ability to diagnose why the stop occurred. The tradeoff is that you depend on the motor power path being correctly isolated. If the application requires de-energizing everything, do not delay emergency stopping for a software shutdown; instead, design the power and storage system to tolerate abrupt loss of power.
Where should velocity limits be enforced in a ROS 2 stack?
As close to the hardware as practical, ideally in the base driver or motor controller firmware. Limits in high-level nodes can be bypassed by anything publishing directly to the command topic. Enforcing in firmware means the limit holds even if someone runs an unvetted teleop tool.
Does a wireless emergency stop solve the range problem?
Partly. A wireless E-stop extends operator reach, but it introduces its own failure mode: the radio link. Well-designed wireless E-stop systems use monitored communication so that loss of the link itself triggers the stop, rather than requiring a transmitted stop command to get through. Verify this behavior explicitly before relying on it.
How does robot emergency stop failsafe design change for autonomous operation?
The watchdog layer shifts focus. With no operator continuously issuing commands, you need heartbeats between autonomy subsystems, health monitoring for perception and localization, and a defined behavior when localization confidence drops. The hardware layers stay identical. What changes is that the software must now detect its own degradation rather than relying on an operator noticing.
Can these layers be added to an existing platform after the fact?
Communication watchdogs and velocity limits can usually be retrofitted in software or firmware. Hardware E-stop paths are harder, because they require routing motor power or drive enable through an appropriate safety circuit and integrating a suitable emergency-stop actuator. Plan the power path for it from the start if there is any chance the robot will need it.
Building safety into a custom platform
Safety architecture is easier to get right when it is part of the mechanical and electrical design rather than an addition to a finished robot. If you are adapting the Leo Rover or the larger Raph Rover for a specific application, or specifying a platform from scratch, Fictionlab’s engineering team works through power path isolation, watchdog architecture, and validation testing as part of the build. Start the conversation at Fictionlab custom robotics.