How to add a new app to PR2 web interface

23 views
Skip to first unread message

lizhi...@tum.de

unread,
Nov 20, 2014, 12:02:22 PM11/20/14
to pr2_...@googlegroups.com
Dear all,
      I am working on high-level navigation task design recently. I need design a user interface that can open in web browser on remote computer. Maybe adding a new app to the PR2 web interface is a nice way. Does anyone know how to add a new app to the pr2 web interface ? And any link to the example?

Best wishes,
Lizhi

Devon Ash

unread,
Nov 20, 2014, 12:11:50 PM11/20/14
to lizhi...@tum.de, pr2_...@googlegroups.com
Hi Lizhi,

the basics to make a new web app can be found under the webui package tutorials here http://wiki.ros.org/webui/Tutorials/Web%20Apps

Dash

--
You received this message because you are subscribed to the Google Groups "PR2_Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pr2_users+...@googlegroups.com.
To post to this group, send email to pr2_...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pr2_users/76932e40-f623-4492-a26c-c095b54b5f6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

lizhi...@tum.de

unread,
Nov 20, 2014, 12:28:42 PM11/20/14
to pr2_...@googlegroups.com, lizhi...@tum.de
Hi Dash,
     I have read this webui tutorial, but I can't grab the svn copy of the app sample_application with command: svn co `roslocate svn sample_application` . So I still don't know how to do it.
     Thank you anyway!
Lizhi


Devon Ash

unread,
Nov 20, 2014, 1:06:08 PM11/20/14
to lizhi...@tum.de, pr2_...@googlegroups.com
Lizhi,

the sample_application can be any ROS package. You can create a catkin_package yourself using "catkin_create_pkg". The launch file parameter will direct the webui program to run a launch file inside that package.



lizhi...@tum.de

unread,
Nov 24, 2014, 6:25:03 AM11/24/14
to pr2_...@googlegroups.com, lizhi...@tum.de
Hi Dash,
    I successfully added new apps to the web_interface, but I couldn't start the app. An error occurred:  There was problem starting this app: Exception while trying to launch the rospy_tutorials/listener app: "global name 'os' is not defined"


Best regard,
Lizhi


在 2014年11月20日星期四UTC+1下午7时06分08秒,Devon Ash写道:

Devon Ash

unread,
Nov 24, 2014, 4:03:18 PM11/24/14
to pr2_...@googlegroups.com, lizhi...@tum.de
Is python installed on your system? try sudo apt-get install python. If that doesn't work, I'd open the listener.py file and add the line "import os" where the other imports are.

On Monday, November 24, 2014 6:25:03 AM UTC-5, lizhi...@tum.de wrote:
Hi Dash,

    I successfully added new apps to the web_interface, but I couldn't start the app. An error occurred:  There was problem starting this app: Exception while trying to launch the rospy_tutorials/listener app: "global name 'os' is not defined"
...

lizhi...@tum.de

unread,
Nov 25, 2014, 6:19:26 AM11/25/14
to pr2_...@googlegroups.com, lizhi...@tum.de
Hi Devon,
I tried, but It didn't work, the same error message as before. I tested on PR2, running Ubuntu 12.04 and ROS Fuerte. Other functions in the web user interface work well, also it shows the apps in the app panel, but cannot starts the application.

在 2014年11月24日星期一UTC+1下午10时03分18秒,Devon Ash写道:

lizhi...@tum.de

unread,
Nov 25, 2014, 9:05:57 AM11/25/14
to pr2_...@googlegroups.com, lizhi...@tum.de

Hi Devon,
    The problem is fixed. I add "import os"  into the file src/launchman.py in 'launchman' package. Now I can run the TalkerListenerApp.

name: TalkerListenerApp
package: rospy_tutorials
launch_file: rospy_tutorials/001_talker_listener/talker_listener.launch
description: talker listener demo
icon:
provides: talkerlistener
depends:


Cheers,
Lizhi

在 2014年11月24日星期一UTC+1下午10时03分18秒,Devon Ash写道:
Reply all
Reply to author
Forward
0 new messages