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

Subscribe to the mode topic and change mode accordingly #86

Open
hello-amal opened this issue Jul 27, 2024 · 0 comments
Open

Subscribe to the mode topic and change mode accordingly #86

hello-amal opened this issue Jul 27, 2024 · 0 comments

Comments

@hello-amal
Copy link
Collaborator

The web app maintains an internal variable that tracks the stretch_driver mode based on the last mode change command the web app sent. This only works if external nodes don't change the mode.

To address this, the web app should instead subscribe to the /mode topic, to ensure it knows the actual mode the driver is on. It should then only change the mode when necessary (e.g., change to nav mode when commanding the base if the mode is anything but navigation, change to nav more when commanding the arm if the mode is anything but position or navigation.) The only possible negative change this could cause is some ROS communication issues (since it is another high-Hz subscriber over rosbirdge/roslibjs), but we can test for that.

Note that #78 has a temp fix for this, which is to change the internal mode variable to unknown every time the web app starts an autonomous action; thus, the webapp re-changes the mode back to navigation the first command it sends after an autonomous action. However, this is not the most sustainable fix, because the web app is still vulnerable to some other code (not an autonomous action is calls) changing the mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant