pepperhacking / robot-jumpstarter

robot-jumpstarter
Other
38 stars 18 forks source link

I cannot make it work #2

Open PunkHaz4rd opened 7 years ago

PunkHaz4rd commented 7 years ago

After successfully launching python serve.py, giving my robot IP Adresse, the application have errors that shouldn't happen:

GET file:///C:/libs/qimessaging/2/qimessaging.js net::ERR_FILE_NOT_FOUND

So basically, what's the advantage in using the python server and not just using either:

EmileKroeger commented 7 years ago

Hi PunkHaz4rd,

I agree this isn't explained well in the doc, sorry about that.

1) on the FILE NOT FOUND

you should have ?robot=<your robot's IP address> at the end of your URL, so he will know where to fetch the qimessaging.js file (if he doesn't have that, he assumes he's running on the robot and gets it locally, hence your error). Normally with serve.py after giving your robot's IP address you get to a page where that is already filled in.

2) on the advantage compared to directly opening the file on the robot: well, you this way you don't have to copy your package to the robot each time you want to test it, you can directly edit the live files and just reload the page. But other than that what you describe works fine

3) on the advantage compared to directly opening the file: most of the time, there isn't any, and you can totally do that! The serve.py thing serves two purposes:

Does that help?

Emile

PunkHaz4rd commented 7 years ago

Ah ok, I though I could simulate my html running on Pepper's tablet and have access to the console.

I did have ?robot=<your robot's IP address> and I tested with something I know works (Text to Speech service) but it doesn't make a sound when using robot-jumpstart, while it did using:

http://[pepperIP]/apps/.lastUploadedChoregrapheBehavior/

Though with the url, everything works, because it is interpreted by my browser, while it doesn't work on Pepper's tablet.

EmileKroeger commented 7 years ago

You can simulate your html running on Pepper's tablet and have access to the console ! (well, as long as you have an actual Pepper; it won't work as-is with a simulated one in Choregraphe - it could be made to do so tho).

If you have the ?robot=, then the text to speech thing should work (the examples I provide by default do when I use them), and if it fails you should have errors in the console.

Which NAOqi version is your Pepper in by the way? (I don't think it should make a difference tho)

PunkHaz4rd commented 7 years ago

Yes, what you said work, I finally got it to. I think I missunderstood what it does. To clarify: I had a problem on my web app running on Pepper's tablet that didn't show on my browser, whether I used Robot-Jumpstart, the URL to Pepper's last app, or directly opening the index.html.

The tablet isn't connected to the wifi. Is there a way to actually run something (not simulate) on Pepper's tablet and have access to a console ?

I think Pepper's NAOqi is up to date.

EmileKroeger commented 7 years ago

"Is there a way to actually run something (not simulate) on Pepper's tablet and have access to a console ?"

Not an easy one. What I did once upon a time was make a simple javascript logger, which would catch errors and log them somewhere visible.

But I haven't used that in ages (since Pepper's first release actually...) because I usually don't need to; the browser preview is good enough 99% of the time (especially when it's in "mobile mode", pretty convenient on Chrome). There are a few CSS things that may not work on the tablet because it runs an older version of chromium, but most stuff should be pretty similar. Though if your tablet doesn't have wifi (even if Pepper does) that could explain some problems.

EmileKroeger commented 7 years ago

(the "some problems" being if you're hotlinking stuff from the tablet then it won't work until you setup the tablet's wifi)