rosbridge connection closed
I have already rosrun rosbridge rosbridge.py
And then when I run a test html file in browser "connection closed" has been showed...why it can`t connect to rosbridge?
html file:
<html>
<head>
<script type="text/javascript" src="http://brown-ros-pkg.googlecode.com/svn/tags/brown-ros-pkg/rosbridge/ros.js">
</script>
<script type="text/javascript">
function main() {
var connection = new ros.Connection("ws://hostname:9090");
connection.setOnClose(function (e) {
document.write('connection closed');
});
connection.setOnError(function (e) {
document.write('error!');
});
connection.setOnOpen(function (e) {
document.write('connected to ROS');
});
}
</script>
</head>
<body onload="main()">
</body>
</html>
You have no tags on your question, it is unlikely to be found by people who know about these things