-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add automatic update checking to command line tools #213
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces automatic checking for software updates to the Stretch Body command line tools. The aim is to enable the
stretch_robot_system_check.py
tool (commonly used by Stretch users) to inform the user when SDK-level updates are available (i.e. updates to the Python or ROS packages). The user doesn't need to do anything special.The changes in this PR are primarily made to the
stretch_robot_system_check.py
andstretch_robot_home.py
tools. Checking for updates requires an internet connection and can be slow. To avoid slowing down the system check, the checking for software updates happens in the background while the robot is homing. When thestretch_robot_home.py
tool is called, a background process begins, checks for an internet connection, looks for updates online, and saves the result to "~/stretch_user/log/updates_logger". This usually takes <10 seconds on a good connection, while a homing procedure takes ~30 seconds. However, if the process takes longer than the homing procedure takes, the process is sent a SIGTERM, the results are not saved, and homing completes normally.When the
stretch_robot_system_check.py
tool is called, it looks in the "~/stretch_user/log/updates_logger" directory for information about these updates and informs the user accordingly. Here's an example output from the tool:The output informs you if your firmware, Python pkgs, or Stretch ROS git repo, are out-of-date.
Testing
Tested on an RE2, running Ubuntu 22.04, and the above SDK configuration.
TODOs
stretch_*.version
instead of usingsh.pip.list
to speed up printing (UPDATE: can't do sincestretch_*.version
wouldn't tell us the editable install location of the repo)