pepperhacking / robot-jumpstarter

robot-jumpstarter
Other
38 stars 18 forks source link

Not able to open the ShowWebView() by using the template #4

Open soumenms2015 opened 5 years ago

soumenms2015 commented 5 years ago

Hi,

I am trying to use the pythonapp template in order to run my existing choregraphe project by running main.py script remotely. I have placed all files of choregraphe project inside the app folder. I also mentioned the main.py inside the manifest.xml. tried to add the below lines but none of these works.

I have got to know that there are two ways to run webview on tablet.

method 1: by using

loadApplication uid = self.packageUid() self.session().service('ALTabletService').loadApplication(uid)

method2: by using loadUrl

ip = self.session().service('ALTabletService').getRobotIp() url = 'http://' + ip + '/apps/' + uid + '/index.html' self.session().service('ALTabletService').loadUrl(url)

self.session().service('ALTabletService').showWebview()

I have wrote this under on_start(self) function inside main.py but it doesnt work. Do you know how I can do it as running the project from choregraphe it takes a lot of time and also every time reloading the project inside robot by pressing hand on it's head.

Thank you very much for assistance.