Hello
I would like to develop a webpage for control of the robot.
I’ve installed rosbridge
I’ve created one html file. Here is the code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script type="text/javascript" src="http://static.robotwebtools.org/roslibjs/cu>
<script type="text/javascript" type="text/javascript">
var ros = new ROSLIB.Ros({
url : 'ws://192.168.100.34:8080'
});
ros.on('connection', function() {
document.getElementById("status").innerHTML = "Connected";
});
ros.on('error', function(error) {
document.getElementById("status").innerHTML = "Error";
});
ros.on('close', function() {
document.getElementById("status").innerHTML = "Closed";
});
</script>
</head>
<body>
<h1>Simple ROS User Interface</h1>
<p>Connection status: <span id="status"></span></p>
<p>Last /txt_msg received: <span id="msg" ></span></p>
</body>
</html>
The name of the html file is gui.html
I’ve started the rosbridge:
roslaunch rosbridge_server rosbridge_websocket.launch
Then I wanted to check if I can load my webpage
I found the IP address of my raspberry PI where was created my webpage using:
hostname -I
I wanted to load my webpage from my laptop using this line:
ws://192.168.100.34:8080/gui.html
Unfortunately I can’t load the webpage! Could you please help me to resolve this issue? Thank you in advance!