Execute Pepper webpage on computer

534 views Asked by At

So I want to use the console of Mozilla in my computer to see what errors have the page that is normally executed by Pepper robot in his tablet, because console.log() is not displayed on Choregraphe log.

I have tried to call the robot qimessaging.js library from computer but it throws an error:

SyntaxError: The URI is malformed. qimessaging.js:12

The html is there:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>Video</title>
    <script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
    <script type = "text/javascript" src="http://nao:[email protected]/libs/qimessaging/1.0/qimessaging.js"></script>
    <script type="text/javascript" src="js/video.js"></script>
  </head>
  <body>
    <canvas width = "320px" height = "240px"></canvas>
    <p id="log">log</p>
  </body>
</html>

Is there a way to call the qimessaging.js without errors to test the web in my computer?

2

There are 2 answers

2
stefan.stt On BEST ANSWER

Instead of console.log() you can use alert().

Also you can connect with your PC browser with this link robot_ip/apps/your_app_name/index.html', but your index.html must be in sub folder named html.

0
JLS On

You can also test from your computer if you import the script from the robot directly:

<script src="http://12.34.56.78/libs/qi/2/qi.js"></script>

Then when you open a session, add the robot url as a third argument of the QiSession:

QiSession( onSuccess, onError, "12.34.56.78:80" );

Then your browser will connect to your remote robot.