Add required restart trigger node and wire /phenaix/controller restart button with confirmation#29
Conversation
Agent-Logs-Url: https://github.com/LCAS/ros_three_viewer/sessions/8ab3607c-304a-4070-8225-52fb82747898 Co-authored-by: marc-hanheide <1153084+marc-hanheide@users.noreply.github.com>
/phenaix/controller restart button
| </button> | ||
|
|
||
| <button |
There was a problem hiding this comment.
change the logic for the restart button so that the actual restart needs confirmation by the user. Clicking the main restart button should open a pop up with a question if a restart should really be carried out, and on the button confirming the restart should actually trigger the restart while closing the popup or declining the restart should just close the popup.
There was a problem hiding this comment.
Implemented in commit 3fdc33e. Restart now requires user confirmation: the Restart button opens a confirmation popup (Restart the system now?), and only confirming proceeds with the trigger call; cancel/close dismisses without calling restart. Screenshot: https://github.com/user-attachments/assets/a1abe134-c8d6-4f8f-889c-b507f39fd58b
Agent-Logs-Url: https://github.com/LCAS/ros_three_viewer/sessions/dc0970e0-badd-4b66-b1d9-d1354701f03f Co-authored-by: marc-hanheide <1153084+marc-hanheide@users.noreply.github.com>
/phenaix/controller restart button/phenaix/controller restart button with confirmation
This change adds a controller-side Restart action that cleanly terminates the ROS 2 launch context. It does so by introducing a dedicated trigger-service node and marking it as required in launch so its exit shuts down the full system.
Launch lifecycle integration
restart_service_nodeprocess toviewer.launch.py.on_exit=Shutdown(...)so exiting this node stops the entire launch tree.New restart trigger service node
ros2_web_viewer/restart_service_node.py.std_srvs/Triggerservice at/restart_system.Packaging / executable wiring
setup.py:restart_service_node = ros2_web_viewer.restart_service_node:mainController UI update
web/phenaix/controller.html.data-trigger-service="/restart_system"data-trigger-confirm="Restart the system now?"Frontend trigger handling update
web/app.jsso buttons withdata-trigger-confirmrequire explicit user confirmation before calling/api/trigger.Docs update
/restart_systembehavior and required-node shutdown semantics.