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

Add ability to restart Thunderloop from Thunderscope #3334

Open
1 task
itsarune opened this issue Oct 3, 2024 · 1 comment · May be fixed by #3368
Open
1 task

Add ability to restart Thunderloop from Thunderscope #3334

itsarune opened this issue Oct 3, 2024 · 1 comment · May be fixed by #3368
Assignees
Labels
Difficulty - 13 Require a good understanding of relevant systems and tools, and may require some pathfinding Robot Software

Comments

@itsarune
Copy link
Contributor

itsarune commented Oct 3, 2024

Description of the task

When a robot isn't moving, we often SSH into the robot and restart Thunderloop using the following command sudo systemctl restart thunderloop.service. This is often quite annoying to do.

We should add a new button to the RobotInfo widget called "Restart Thunderloop" to restart that robot's Thunderloop service.

Possible implementation (likely we will need to touch both Thunderscope and the robot):
Thunderscope:

  1. Add a new button called "Restart Thunderloop" to the RobotInfo widget.
  2. Create a new Proto that gets sent to the robots ("RequestRestartThunderloop"). This proto needs to contain the robot_id that we are requesting to restart.

Thunderloop:

  1. Create a Python script that receives "RequestRestartThunderloop" and executes "sudo systemctl restart thunderloop.service" if the robot id matches the robot's current ip address.
  2. Deploy this Python scripts through an Ansible playbook (deploy_robot_software.pb)
  3. Add this python script as a systemd service

If you want to test Thunderscope changes without robots (for GUI layout), run the following command:
./tbots run thunderscope_main --run_blue --disable_communication --interface lo

Acceptance criteria

  • Manually test with actual robots

Blocked By

@itsarune itsarune added Difficulty - 13 Require a good understanding of relevant systems and tools, and may require some pathfinding Robot Software labels Oct 3, 2024
@williamckha
Copy link
Contributor

Alternate implementation:

No need for an additional systemd service. Instead, have the "Restart Thunderloop" button call ansible_runner from run_ansible.py to ssh into the robot and run an ansible script that restarts Thunderloop. Thunderscope should pop up with a dialog asking for the SSH password the first time the "Restart Thunderloop" button is pressed. The SSH password should then be saved so that we don't have to type in the password everytime.

@williamckha williamckha self-assigned this Oct 12, 2024
@williamckha williamckha linked a pull request Oct 19, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty - 13 Require a good understanding of relevant systems and tools, and may require some pathfinding Robot Software
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants