|
From: <wgh...@us...> - 2009-08-25 21:44:23
|
Revision: 22895
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=22895&view=rev
Author: wghassan
Date: 2009-08-25 21:44:13 +0000 (Tue, 25 Aug 2009)
Log Message:
-----------
delay pump by 500ms
Modified Paths:
--------------
pkg/trunk/sandbox/web/launchman/src/launchman.py
pkg/trunk/sandbox/web/rosweb2/src/rosweb.py
pkg/trunk/sandbox/web/webui/src/webui/mod/webui/jslib/ros.js
pkg/trunk/sandbox/web/webui/src/webui/mod/webui/templates/apps.cs
Modified: pkg/trunk/sandbox/web/launchman/src/launchman.py
===================================================================
--- pkg/trunk/sandbox/web/launchman/src/launchman.py 2009-08-25 21:24:29 UTC (rev 22894)
+++ pkg/trunk/sandbox/web/launchman/src/launchman.py 2009-08-25 21:44:13 UTC (rev 22895)
@@ -92,7 +92,9 @@
self.runner.launch()
def stop(self):
- if not self.runner: return
+ if not self.runner:
+ print "no runner", self
+ return
self.runner.stop()
self.runner = None
@@ -158,7 +160,6 @@
runner.launch()
- time.sleep(1)
runner.task.status = "running"
self.app_update.publish(runner.task)
self._send_status()
@@ -178,7 +179,6 @@
self._stopTask(cgroup)
runner.stop()
- time.sleep(1)
runner.task.status = "stopped"
self.app_update.publish(runner.task)
Modified: pkg/trunk/sandbox/web/rosweb2/src/rosweb.py
===================================================================
--- pkg/trunk/sandbox/web/rosweb2/src/rosweb.py 2009-08-25 21:24:29 UTC (rev 22894)
+++ pkg/trunk/sandbox/web/rosweb2/src/rosweb.py 2009-08-25 21:44:13 UTC (rev 22895)
@@ -159,7 +159,12 @@
msg_class = roslib.scriptutil.get_message_class(topic_type)
- self.sub = rospy.Subscriber(self.topic, msg_class, self.topic_callback)
+ #print "RosWebtopic", self.topic, msg_class
+ try:
+ self.sub = rospy.Subscriber(self.topic, msg_class, self.topic_callback)
+ except:
+ print self.topic, msg_class
+ raise
self.initialized = True
except ROSWebException:
raise
@@ -178,6 +183,7 @@
def topic_callback(self, data):
try:
self.factory.cond.acquire()
+
self.messages.append((self.factory.counter, data))
self.factory.counter = self.factory.counter + 1
self.messages = self.messages[-20:]
@@ -236,6 +242,7 @@
def callback(self, data):
try:
self.factory.cond.acquire()
+
self.messages.append((self.factory.counter, data))
self.factory.counter = self.factory.counter + 1
self.messages = self.messages[-3:]
@@ -311,7 +318,7 @@
lastSince = max(t, lastSince)
finally:
self.server.factory.cond.release()
-
+
buf = cStringIO.StringIO()
buf.write("{")
buf.write('"since": %s,' % lastSince)
Modified: pkg/trunk/sandbox/web/webui/src/webui/mod/webui/jslib/ros.js
===================================================================
--- pkg/trunk/sandbox/web/webui/src/webui/mod/webui/jslib/ros.js 2009-08-25 21:24:29 UTC (rev 22894)
+++ pkg/trunk/sandbox/web/webui/src/webui/mod/webui/jslib/ros.js 2009-08-25 21:44:13 UTC (rev 22895)
@@ -73,7 +73,7 @@
} catch (e) {
ros_debug("Error with evalMessages.");
}
- this.pump();
+ setTimeout("gPump.pump();", 500);
},
evalMessages: function(json_result) {
@@ -208,7 +208,7 @@
this.domobj.setAttribute("class", "buttonOff");
}
- this.pump.service_call("status_update", []);
+ //this.pump.service_call("status_update", []);
},
receive: function(msg) {
@@ -430,7 +430,7 @@
initialize: function(domobj) {
this.pump = null;
this.domobj = domobj;
- this.topics = ['/rosout_agg'];
+ this.topics = ['/rosout'];
this.maxlines = parseInt(domobj.getAttribute("maxlines", "100"));
this.tbl = null;
@@ -454,7 +454,7 @@
var c, tn;
c = row.insertCell(0);
c.className = "rosout";
- c.style.width = "2%";
+ c.style.width = "5%";
var level = "";
if(msg.level == "16") level="Fatal";
if(msg.level == "8") level="Error";
@@ -466,16 +466,16 @@
c = row.insertCell(1);
c.className = "rosout";
- c.style.width = "90%";
+ c.style.width = "80%";
tn = document.createTextNode(msg.msg);
c.appendChild(tn);
- // c = row.insertCell(2);
- // c.style.width = "10%";
- // c.className = "rosout";
- // tn = document.createTextNode(msg.name);
- // c.appendChild(tn);
+ c = row.insertCell(2);
+ c.style.width = "15%";
+ c.className = "rosout";
+ tn = document.createTextNode(msg.name);
+ c.appendChild(tn);
// c = row.insertCell(3);
// c.style.width = "5%";
Modified: pkg/trunk/sandbox/web/webui/src/webui/mod/webui/templates/apps.cs
===================================================================
--- pkg/trunk/sandbox/web/webui/src/webui/mod/webui/templates/apps.cs 2009-08-25 21:24:29 UTC (rev 22894)
+++ pkg/trunk/sandbox/web/webui/src/webui/mod/webui/templates/apps.cs 2009-08-25 21:44:13 UTC (rev 22895)
@@ -21,8 +21,9 @@
<tr>
<td width=100%>
<table class=rosout><tr>
-<td class=rosoutHeading style="width: 1%;">Severity</td>
-<td class=rosoutHeading style="width: 90%;">Message</td>
+<td class=rosoutHeading style="width: 5%;">Severity</td>
+<td class=rosoutHeading style="width: 80%;">Message</td>
+<td class=rosoutHeading style="width: 15%;">Node</td>
</table>
<div style="border: 2px solid white; height: 30em; width: 80%;" objtype=RosOut_Widget></div><br>
</td>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|