Skip to content

robotd: drop non-finite command targets instead of poisoning the command filters - #238

Merged
pierre-rouanet merged 1 commit into
pollen-robotics:mainfrom
hadelan:fix/nonfinite-command-targets
Sep 9, 2026
Merged

pierre-rouanet merged 1 commit into
pollen-robotics:mainfrom
hadelan:fix/nonfinite-command-targets

Conversation

@hadelan

@hadelan hadelan commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Split out from #199.
JSON parses 1e400 as infinity, so a client can put one on the wire. Folded into the twist/head/body EMAs it is permanent (ema += α·(inf − ema) is inf on every later tick), and since the safety layer refuses non-finite joint targets rather than clamping them, a single bad robot.move froze the robot on its hold pose until reboot. The filters now drop non-finite targets.

Comes with a regression test. cargo test -p robotd and cargo fmt --check are green.

…and filters

JSON parses 1e400 as infinity, so a client can put one on the wire. Folded
into the twist/head/body EMAs it is permanent — ema += α·(inf − ema) is
inf on that tick and every tick after — and the safety layer refuses
non-finite joint targets rather than clamping them, so a single bad
robot.move froze the robot on its hold pose until reboot.

@pierre-rouanet pierre-rouanet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hadelan !

@pierre-rouanet
pierre-rouanet merged commit 30d7d09 into pollen-robotics:main Sep 9, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants