RobotWebTools / ros2-web-bridge

Bridging your browser to the ROS 2.0
Apache License 2.0
203 stars 68 forks source link

rosbridge node can not be terminated from bash #181

Closed newcanopies closed 3 years ago

newcanopies commented 3 years ago

Hello,

thank you for this great package.

is there a reason rosbridge node can not be easily terminated in bash terminal? even after closing the browser window, terminal remains hung-up image

christophebedard commented 3 years ago

I also have this issue. I have to manually kill it (e.g. using htop).

Maybe something like this could be an easy fix: https://stackoverflow.com/a/53535316

newcanopies commented 3 years ago

Maybe something like this could be an easy fix: https://stackoverflow.com/a/53535316

thanks @christophebedard it does free-up that terminal, but the rosbridge node remains running in the background, listening on the PORT EADDRINUSE

christophebedard commented 3 years ago

I assume one of these has to be called inside the signal handling function: shutDown() or closeAllBridges() (in index.js).

newcanopies commented 3 years ago

thank you, this works

ros2-web-bridge/index.js:136

image

minggangw commented 3 years ago

Please checkout the latest v0.3.1 which has this fix, thanks!