Skip to content

robotd: a mode switch waits for a policy load, and a policy change waits for a shutdown - #228

Open
Nixxx19 wants to merge 4 commits into
pollen-robotics:mainfrom
Nixxx19:a-mode-switch-waits-for-a-policy-load
Open

Nixxx19 wants to merge 4 commits into
pollen-robotics:mainfrom
Nixxx19:a-mode-switch-waits-for-a-policy-load

Conversation

@Nixxx19

@Nixxx19 Nixxx19 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

fixes #227

a policy change is refused while a mode switch is in flight, but not the other way round. accept a switch while a load is still on its thread and the switch goes home, swaps the other mode's bundle in, then the load lands on top and puts the old mode's params and networks back — with robot.mode still reporting the new one.

also refuses a policy change during the shutdown sit, same reason robot.init is already gated there: a change to the driving network takes the home-first path and stands the robot up out of its sit.

two tests. the load one trips on main first try every time.

@Nixxx19 Nixxx19 changed the title robotd: a mode switch waits for a policy load, and a policy change waits for a shutdown robotd: a mode switch waits for a policy load and a shutdown, and a policy change waits too Sep 10, 2026
@Nixxx19 Nixxx19 changed the title robotd: a mode switch waits for a policy load and a shutdown, and a policy change waits too robotd: a mode switch waits for a policy load, and a policy change waits for a shutdown Sep 10, 2026
@Nixxx19

Nixxx19 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor Author

hi @pierre-rouanet, mind taking a look at this one when you get a chance? a mode switch and a policy load can quietly undo each other.

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.

a mode switch accepted while a policy load is in flight is undone when the load lands

1 participant