This PR improves the launch/stop scripts in this repo, including:
launch_interface.sh
start_ros2.sh
start_web_server_and_robot_browser.sh
stop_interface.sh
With launch_interface.sh it ensures the user always gets either SUCCESS or FAILURE messages, so it's clear whether web teleop succeeded in starting. Additionally, it logs to Stretch's log directory and creates a zip of the logs that can be shared with support if something goes wrong. Lastly, it shows the right URL to the user depending on whether they're running the local or online version of the interface.
With start_ros2.sh, it ensures all the ENV VARS are configured and calls CLIs using their absolute paths to ensure they're likely to execute correctly. It exits immediately if any command fails to execute. It also redirects verbose output to Stretch's log directory.
With start_web_server_and_robot_browser.sh, it takes in a -f flag and launches either the local or online version of the interface accordingly. It exits immediately if any command fails to execute. It also redirects verbose output to Stretch's log directory.
With stop_interface.sh, it fixes a bug where pkill is never called.
TODO:
[ ] Switch to using "local" vs "online" terminology because it is clearer. Remove mentions of Firebase and rename the "-f" flag.
[ ] Detect is wifi-connect is not installed and act accordingly
Testing procedure
[TODO: describe, in-detail, how you tested this. The procedure must be detailed enough for the reviewer(s) to recreate it.]
Description
This PR improves the launch/stop scripts in this repo, including:
launch_interface.sh
start_ros2.sh
start_web_server_and_robot_browser.sh
stop_interface.sh
With
launch_interface.sh
it ensures the user always gets either SUCCESS or FAILURE messages, so it's clear whether web teleop succeeded in starting. Additionally, it logs to Stretch's log directory and creates a zip of the logs that can be shared with support if something goes wrong. Lastly, it shows the right URL to the user depending on whether they're running the local or online version of the interface.With
start_ros2.sh
, it ensures all the ENV VARS are configured and calls CLIs using their absolute paths to ensure they're likely to execute correctly. It exits immediately if any command fails to execute. It also redirects verbose output to Stretch's log directory.With
start_web_server_and_robot_browser.sh
, it takes in a-f
flag and launches either the local or online version of the interface accordingly. It exits immediately if any command fails to execute. It also redirects verbose output to Stretch's log directory.With
stop_interface.sh
, it fixes a bug wherepkill
is never called.TODO:
wifi-connect
is not installed and act accordinglyTesting procedure
[TODO: describe, in-detail, how you tested this. The procedure must be detailed enough for the reviewer(s) to recreate it.]
Before opening a pull request
From the top-level of this repository, run:
pre-commit run --all-files
To merge
Squash & Merge