Safety¶
The software E-stop, per-variable correction limits and the override for calibration work.
Usage¶
# Emergency stop (software-level, NOT safety-rated)
api.safety.stop()
api.safety.is_stopped() # True
# Reset E-stop
api.safety.reset()
# Configure correction limits
api.safety.set_limit("RKorr.X", -50.0, 50.0)
api.safety.set_limit("AKorr.A1", -10.0, 10.0)
# View all limits
limits = api.safety.get_limits()
for var, (lo, hi) in limits.items():
print(f"{var}: [{lo}, {hi}]")
# Full status
status = api.safety.status()
# {"emergency_stop": False, "safety_override": False, "limits": {...}}
# Override limits (use with extreme caution)
api.safety.override(True)
# ... calibration work ...
api.safety.override(False)
Reference¶
SafetyAPI
¶
Safety management interface for KUKA RSI robot control.
Provides emergency stop control, limit configuration, and safety status monitoring. Limits are enforced at two points: write-time validation in this process (raises on violation) and send-time clamping in the network process (clamps values that reach receive_variables by any other route).
Initialize SafetyAPI namespace.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client
|
RSIClient
|
RSIClient instance for accessing safety manager |
required |
stop
¶
Trigger emergency stop.
Activates the safety manager's E-stop flag, blocking all motion commands until reset() is called. This is a software-level safety mechanism.
Note
This is NOT a hardware E-stop and should not be relied upon for safety-critical applications. Always use proper hardware E-stops.
reset
¶
Reset emergency stop and resume normal operation.
Clears the E-stop flag, allowing motion commands to proceed again. Use with caution after ensuring the robot workspace is safe.
status
¶
Get comprehensive safety status information.
Returns:
| Type | Description |
|---|---|
Dictionary containing
|
|
Example
status = api.safety.status()
print(status['emergency_stop'])Falseprint(status['limits']['RKorr.X'])(-100.0, 100.0)
set_limit
¶
Set or update safety limit bounds for a specific variable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
variable
|
str
|
Variable path (e.g., 'RKorr.X', 'AKorr.A1') |
required |
lower
|
float
|
Minimum allowed value |
required |
upper
|
float
|
Maximum allowed value |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
If lower >= upper |
Example
api.safety.set_limit('RKorr.X', -50.0, 50.0) api.safety.set_limit('AKorr.A1', -10.0, 10.0)
get_limits
¶
Get all configured safety limits.
Returns:
| Type | Description |
|---|---|
Dict[str, tuple[float, float]]
|
Dictionary mapping variable paths to (lower, upper) limit tuples |
Example
limits = api.safety.get_limits() for var, (lower, upper) in limits.items(): ... print(f"{var}: [{lower}, {upper}]")
override
¶
Enable or disable safety limit override.
WARNING: Use with EXTREME CAUTION. When enabled, all safety limit validation is bypassed, allowing potentially dangerous motion commands.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
enable
|
bool
|
True to bypass safety checks, False to re-enable |
required |
is_stopped
¶
Check if emergency stop is currently active.
Returns:
| Type | Description |
|---|---|
bool
|
True if E-stop is active, blocking all motion |
is_overridden
¶
Check if safety limit validation is currently bypassed.
Returns:
| Type | Description |
|---|---|
bool
|
True if safety checks are disabled |