Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support stepper types in the Firmware Updater tool #88

Merged
merged 3 commits into from
Jan 24, 2024

Conversation

hello-binit
Copy link
Contributor

@hello-binit hello-binit commented Jan 24, 2024

This PR introduces the concept of "stepper types" to the Stretch Factory package. In P5 firmware, @vrathiraj-hellorobot introduced the ability for the uC on a stepper PCB to know which kind of stepper it is (i.e. arm, lift, right wheel, left wheel). In this PR, the firmware updater checks if the stepper already knows its stepper type before erasing the flash memory through a new firmware flash. It saves the stepper_type, flashes the new firmware, then writes the stepper_type to flash memory. This PR also introduces the new tool called REx_stepper_type.py tool for Hello Robot support members to be able to assist Stretch users in flashing their stepper_type bits.

There's a couple benefits to each stepper knowing its stepper_type at the firmware level:

  1. The wheels on newer Stretch robots can take advantage of better runstop by actually disconnecting the H bridge from the motor. This makes it easier to backdrive the robot around by tilting the robot and pushing it like a vacuum cleaner.
  2. The system check tool can verify that the UDEV rules for each stepper agree with the stepper_type of the stepper. In case the UDEV rules get corrupted, this provides an additional level of redundancy.

Added condition to read motor.board_info['stepper_type'] from all stepper boards before flashing
this is due to the new additional board_info parameter stepper_type. This allows the storing of the value of the stepper type and re upload that value after firmware flash is completed
…type extraction

added conditions to check to see if the protocol type is >= to p5 this allows to down grade and upgrade fw without any issues
Copy link
Contributor Author

@hello-binit hello-binit left a comment

Choose a reason for hiding this comment

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

Please add the stepper type setting/fetching tool into an REx command line tool in this PR. Done

…writing stepper type to stepper board flash memory
@hello-binit hello-binit merged commit 14e0716 into features/se3_test Jan 24, 2024
@hello-binit hello-binit deleted the features/stepper_type branch January 24, 2024 20:52
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