Skip to content

fix(pandafsm): reset inferred_rot_force_counter when (+1 more) - #24

Open
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/pandafsm-assorted-04744826
Open

fix(pandafsm): reset inferred_rot_force_counter when (+1 more)#24
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/pandafsm-assorted-04744826

Conversation

@andrewwhitecdw

@andrewwhitecdw andrewwhitecdw commented Jul 27, 2026

Copy link
Copy Markdown

Small fixes in utils/pandafsm.py:

fix: reset inferred_rot_force_counter when reverting saved state

Fix: Replace:

        print(self.env_id, "Reverting back to state", self.saved_fsm_state)
        self.inferred_rot_force_counter
        self.state = self.saved_fsm_state
        self.squeeze_counter = 0

with:

        print(self.env_id, "Reverting back to state", self.saved_fsm_state)
        self.inferred_rot_force_counter = 0
        self.state = self.saved_fsm_state
        self.squeeze_counter = 0

fix: clamp running torque with max instead of min

Fix: Replace:

        self.running_torque[0] = min(min_torque, self.running_torque[0])
        self.running_torque[1] = min(min_torque, self.running_torque[1])

with:

        self.running_torque[0] = max(min_torque, self.running_torque[0])
        self.running_torque[1] = max(min_torque, self.running_torque[1])

Files changed

  • utils/pandafsm.py

@andrewwhitecdw
andrewwhitecdw marked this pull request as ready for review August 3, 2026 22:10
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.

1 participant