# How to start a website using rosbridge?

**URL:** <https://forum.ubiquityrobotics.com/t/how-to-start-a-website-using-rosbridge/1012>\
**Category:** Uncategorized\
**Created:** [September 3, 2022, 4:16pm UTC](https://forum.ubiquityrobotics.com/t/how-to-start-a-website-using-rosbridge/1012 "2022-09-03T16:16:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tiho\_bg](https://forum.ubiquityrobotics.com/letter_avatar_proxy/v4/letter/t/ea666f/32.png) [@tiho\_bg](https://forum.ubiquityrobotics.com/u/tiho_bg)\
**Post date:** [September 3, 2022, 4:16pm UTC](https://forum.ubiquityrobotics.com/t/how-to-start-a-website-using-rosbridge/1012/1 "2022-09-03T16:16:43Z")

</div>

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:

```auto
<!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!

---

<div class="post-metadata">

**Author:** ![mjstn2011](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/mjstn2011/32/30_2.png) [@mjstn2011](https://forum.ubiquityrobotics.com/u/mjstn2011)\
**Post date:** [September 4, 2022, 8:13am UTC](https://forum.ubiquityrobotics.com/t/how-to-start-a-website-using-rosbridge/1012/2 "2022-09-04T08:13:44Z")

</div>

The image has been changing for a very long time now. Some of the changes introduced webpages at specific port numbers. I implemented a webpage with javascript 6 years ago so this may not be helpful any longer. I offer this just in case something in it makes sense to you.

I will put in the code I used but I have lost track of how to get this page to show up. It did use rosbridge. Again, I offer this not as a solution but as what I did 6 years ago so ‘maybe’ something is of value. My webpage on this robot is here: [FiddlerBot A Thinking Bot- Mark-World.com](http://www.mark-toys.com/FiddlerBot.html)  
You can see the page that these code modules implement or perhaps close to it on above link.

Well I have just found that I cannot post it here due to this forum only allows pictures.

Send an email to [support@ubiquityrobotics.com](mailto:support@ubiquityrobotics.com) and in subject say Attention Mark for Webpage

This will allow me to get you these files.

I feel what you really want is how to get your webpage setup since you have your own html and javascript already. This part of it I have long forgotten and don’t have notes.

It is fun having webpage ability so I wish you best of luck in your project  
Mark

---

<div class="post-metadata">

**Author:** ![anfederman](https://forum.ubiquityrobotics.com/user_avatar/forum.ubiquityrobotics.com/anfederman/32/141_2.png) [@anfederman](https://forum.ubiquityrobotics.com/u/anfederman)\
**Post date:** [September 4, 2022, 3:51pm UTC](https://forum.ubiquityrobotics.com/t/how-to-start-a-website-using-rosbridge/1012/3 "2022-09-04T15:51:12Z")

</div>

On our GitHub page we have some old kinetic code for robot commander that might still work. The robot commander android app is still available and should work with a Noetic version of Magni bring up base launch,
