Skip to main content

pamoja_safety_gate_new

Function pamoja_safety_gate_new 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_safety_gate_new( limits: *const PamojaLimits, watchdog_timeout: f32, ) -> *mut PamojaSafetyGate
Expand description

Creates a safety gate from limits and a watchdog timeout.

§Arguments

  • limits - the limits for normal motion, copied as they stand; the handle stays the caller’s.
  • watchdog_timeout - the silence after which the gate stops the robot.

§Returns

A cleared, freshly fed gate the caller must release with pamoja_safety_gate_free, or null if limits is null.

§Safety

limits must be a live handle from pamoja_limits_new, or null. A returned handle must be freed exactly once.