Skip to content

Allow SafetyHardware to run without bumpers or e-stops#39

Open
pascalzauberzeug wants to merge 1 commit intomainfrom
safety_without_bumpers
Open

Allow SafetyHardware to run without bumpers or e-stops#39
pascalzauberzeug wants to merge 1 commit intomainfrom
safety_without_bumpers

Conversation

@pascalzauberzeug
Copy link
Copy Markdown
Contributor

@pascalzauberzeug pascalzauberzeug commented Apr 29, 2026

Motivation

The hardware safety module hard-required both EStopHardware and BumperHardware instances via assert isinstance(...) in _generate_lizard_code().
This blocked simpler robot variants that legitimately ship without bumpers and/or without e-stops (e.g. small devkit configurations) from using the same SafetyHardware class.

Implementation

_generate_lizard_code() drops the e-stop and bumper isinstance assertions and emits the pin-watching when blocks only when the matching hardware is present and exposes pins.
estop_active and bumper_active are always declared, so the enable/disable transitions stay a single pair of rules regardless of which inputs exist.

Progress

  • I chose a meaningful title that completes the sentence: "If applied, this PR will..."
  • I chose meaningful labels (if GitHub allows me to so).
  • I documented breaking changes and set the 'breaking change' label if needed
  • The implementation is complete.
  • Tests with a real hardware have been successful (or are not necessary).
  • Pytests have been added (or are not necessary).
  • Documentation has been added (or is not necessary).

@pascalzauberzeug pascalzauberzeug added this to the 0.2.0 milestone Apr 29, 2026
@pascalzauberzeug pascalzauberzeug added the bug Something isn't working label Apr 29, 2026
@pascalzauberzeug pascalzauberzeug marked this pull request as ready for review April 29, 2026 22:10
@pascalzauberzeug pascalzauberzeug changed the title allow safety without bumpers or estops Allow SafetyHardware to run without bumpers or e-stops Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant