Add auto-reconnect to ROS for the robot browser #76
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.
Description
This PR depends on our fork of
roslibjs
#1. Although, for backwards compatibility, I have ported that code locally as well.This PR addresses the following related bugs:
/get_joint_states
service before the service is actually ready, which results in it hanging. After that point, no other service invokation or topic publication from the web app will be received by rosbridge, and the only way to resolve it is to runpm2 restart start_robot_browser
This PR addresses them, respectively, by:
Testing procedure
master
.import time; time.sleep(5.0)
toweb_interface.launch.py
before returning the launch description, and re-build the workspace. Run./launch_interface.sh
, load the operator browser, and verify it only shows the loading icon forevor (e.g., even if you refresh after 5 seconds oncerosbridge
has loaded, it still won't load)./launch_interface.sh
and./stop_interface
until you experience the issue on the operator browser. A tell-tale sign of this issue is if the tool-specific features you expect to be enabled (e.g., click-to-pregrasp) are (because that meansrosbridge
did not return the tool parameter). I had to run the interface 7 times before experiencing the issue, but once I did, I verified that no commands from the web app were going through to rosbridge. At that stage, even if you refresh the page, ros commands still don't go through.roslibjs
dependency to point to the branch inroslibjs
#1 (or the same branch if that has been merged in)../launch_interface.sh
. Load the operator interface asap. Verify that it shows the loading icon initially, but after ~5 seconds when rosbridge loads, it loads correctly (without needing you to refresh the page).screen -r web_teleop_ros
) and terminate it (Ctrl-c
). Verify the video streams have stopped updating. Now, launch a new screen session (screen -dm -S "web_teleop_ros" ros2 launch stretch_web_teleop web_interface.launch.py
). Verify that without needing to refresh the operator page, the video streams start back up again and commands start executing again.Before opening a pull request
From the top-level of this repository, run:
pre-commit run --all-files
To merge
Squash & Merge