From gmane.20.evilspam at spamgourmet.com Sat Apr 1 15:32:35 2006 From: gmane.20.evilspam at spamgourmet.com (Chris Spencer) Date: Sat Apr 1 16:35:12 2006 Subject: [Pyro-users] Pyro with FC5 Message-ID: I'm about to upgrade my Fedora installation. Has anyone tested the repository with FC5? Should I be aware of any problems? Chris From servando at mac.com Sun Apr 2 19:33:05 2006 From: servando at mac.com (Servando Garcia) Date: Sun Apr 2 19:33:21 2006 Subject: [Pyro-users] size of an object Message-ID: Hello list Is there a way to know the size of an object using sonar().? What I am trying to do how is by using the front sonar sensors and finding the distance from the object calculating the size of the object. For example 2(Distance) * Tan( Abs(Left-front - Right-front) / 2 ) think should give the size of the object. I am still rather new to using pyro so and hints would be great. From dblank at brynmawr.edu Sun Apr 2 20:28:15 2006 From: dblank at brynmawr.edu (dblank@brynmawr.edu) Date: Sun Apr 2 20:28:19 2006 Subject: [Pyro-users] size of an object In-Reply-To: References: Message-ID: <14531.68.34.179.248.1144024095.squirrel@webmail.brynmawr.edu> > Hello list > Is there a way to know the size of an object using sonar().? What I > am trying to do how is by using the front sonar sensors and finding > the distance from the object calculating the size of the object. For > example 2(Distance) * Tan( Abs(Left-front - Right-front) / > 2 ) think should give the size of the object. > I am still rather new to using pyro so and hints would be great. Servando, You can get all of the information needed for such a computation, but you really can't do it automatically. For example, you could start Pyro up like: pyrobot -s PyrobotSimulator -w TutorialWorld.py -r PyrobotRobot60000.py and then enter these two lines at the Pyro command line: sonar = robot.sonar[0] for i in range(16): print i, sonar[i].distance(), sonar[i].angle() and you might get something like: 0 0.394762964263 90.0 1 0.502511060427 65.0 2 0.745252629527 40.0 3 1.59195429007 15.0 4 1.67917976004 -15.0 5 3.65858630292 -40.0 6 6.08728141064 -65.0 7 2.17763241605 -90.0 8 2.17543778176 -90.0 9 2.52043857658 245.0 10 3.63092420178 220.0 11 3.0612569731 195.0 12 2.28184342072 165.0 13 0.768915670189 140.0 14 0.486375888306 115.0 15 0.416754563733 90.0 which is the sonar number, distance (in robot units), and angle (in degrees). You could also do this (all on one line): for i in range(16): print i, sonar[i].distance('m'), sonar[i].angle('radians') to get the readings in meters and radians (where 0 is straight ahead, positive to the left, negative to the right). But you don't know where an object starts and stops. If there was only a single object in the world, then you would be a little better off, but you might still need to know its shape to be able to "see" it and compute its size. In general, that sounds like a hard problem with sonar. Using the camera (click on "View" when your camera[0] device is selected) with sonar might make it a bit easier, but still hard. Hope that helps, -Doug From akfey at bulldog.unca.edu Sun Apr 2 21:47:47 2006 From: akfey at bulldog.unca.edu (Andrea Kirsten Fey) Date: Sun Apr 2 21:47:50 2006 Subject: [Pyro-users] contents of blobfinder filter return Message-ID: <4674435.1144028867725.JavaMail.akfey@bulldog.unca.edu> I am trying to use blobfinder for landmark navigation in the Pyrobot simulator. I can not find any documentation, but I've determined experimentally that blob[0][2] ranges from 0-39 with 20 indicating the blob is centered in the camera view, blob[0][0] is related to the distance from the blob but is not in robot units and is not linear, and blob[0][4] is the mass, perhaps in numbers of pixels in the camera view. Can you tell me more precise information about these return values? I have created a simple world with different colored boxes in each corner, and I'm trying to set the robot's position based on the location of one of the landmarks. I am trying to see if I can get better results than by using dead reckoning. I'd like to be able to calculate the robot's location based on either blob[0] or by utilizing the known mass of the landmark (in which case I'd like to know the height of the boxes) and comparing that to the mass returned. If there is a better way to do this, I am open to suggestions. I know I can use triangulation if the camera can see two landmarks, but I am hoping to avoid that. I am also wondering if there is a way to look for blobs of multiple colors (not a range), or if I have to blobify on each color and call clearFilters(). Also, is there a way to get the world coordinates of the robots from the simulator to test the accuracy of the navigation? Thanks, Andrea From dblank at brynmawr.edu Sun Apr 2 22:38:18 2006 From: dblank at brynmawr.edu (dblank@brynmawr.edu) Date: Sun Apr 2 22:38:20 2006 Subject: [Pyro-users] contents of blobfinder filter return In-Reply-To: <4674435.1144028867725.JavaMail.akfey@bulldog.unca.edu> References: <4674435.1144028867725.JavaMail.akfey@bulldog.unca.edu> Message-ID: <15366.68.34.179.248.1144031898.squirrel@webmail.brynmawr.edu> Andrea said, > I am trying to use blobfinder for landmark navigation in the Pyrobot > simulator. I can not find any documentation, but I've determined > experimentally that blob[0][2] ranges from 0-39 with 20 indicating the > blob is centered in the camera view, blob[0][0] is related to the > distance from the blob but is not in robot units and is not linear, and > blob[0][4] is the mass, perhaps in numbers of pixels in the camera > view. Can you tell me more precise information about these return > values? I assume that you mean that you are using a Blobify filter on the simulated camera, since Pyrobot simulator doesn't support a "blobfinder" interface yet (like the Stage simulator does). There is a little bit of documentation on the Blobify filter at: http://pyrorobotics.org/?page=PyroModuleVisionSystem and http://pyrorobotics.org/?page=PyroVisionSystemFunctions > I have created a simple world with different colored boxes in each > corner, and I'm trying to set the robot's position based on the > location of one of the landmarks. I am trying to see if I can get > better results than by using dead reckoning. I'd like to be able to > calculate the robot's location based on either blob[0] or by utilizing > the known mass of the landmark (in which case I'd like to know the > height of the boxes) and comparing that to the mass returned. If there > is a better way to do this, I am open to suggestions. I know I can use > triangulation if the camera can see two landmarks, but I am hoping to > avoid that. The height of obstacles in the camera view are just based on the distance to it in the Pyrobot simulator (currently, many objects don't even have heights as they are represented as 2D data. We'll correct that when we fully represent objects so that the same descriptions can be used in 3D worlds, too). So, yes, you could look at the image and compute an approximate distance to the obstacle by examining the position of the blob. This would also sorta work in the real world. In the Pyrobot simulator, objects are guaranteed to be on the horizon---half above and half below, as if the camera were in a perfect position. > I am also wondering if there is a way to look for blobs of multiple > colors (not a range), or if I have to blobify on each color and call > clearFilters(). Also, is there a way to get the world coordinates of > the robots from the simulator to test the accuracy of the navigation? You can have at least 3 blobifies going on without bothering each other, and can also do more. First, you can blobify on each of Red, Green, and Blue. If you do that, you may not want to draw a border box (that might interfere): # blobify red, match between 255 and 255, sort on mass, return 1 blob # and don't draw the bounding box: self.robot.camera[0].addFilter("blobify",0,255,255,0,1,0) # blobify green, match between 255 and 255, sort on mass, return 2 blob # and don't draw the bounding box: self.robot.camera[0].addFilter("blobify",1,255,255,0,2,0) BTW, if your boxes aren't Red, Green, or Blue to begin with, you can click on them with the left (Red), middle (Green), or right (Blue) mouse buttons to active the appropriate filters, then blobify. Let us know if that doesn't help, -Doug > Thanks, > Andrea From dblank at brynmawr.edu Sun Apr 2 23:03:31 2006 From: dblank at brynmawr.edu (dblank@brynmawr.edu) Date: Sun Apr 2 23:03:35 2006 Subject: [Pyro-users] contents of blobfinder filter return In-Reply-To: <4674435.1144028867725.JavaMail.akfey@bulldog.unca.edu> References: <4674435.1144028867725.JavaMail.akfey@bulldog.unca.edu> Message-ID: <15604.68.34.179.248.1144033411.squirrel@webmail.brynmawr.edu> Andrea, Also, two other notes. Thanks to Chris, the pyrobot-users and pyrobot-developers mailing lists can now be read via http://gmane.org. See: http://dir.gmane.org/index.php?prefix=gmane.science.robotics.pyro One nice feature there is a search ability. For example, try: http://search.gmane.org/?query=blobify&group=gmane.science.robotics.pyro.user to see a couple of hits, the first with some details about the return format of the blobify filter. Also, there is are a couple of additional "filters" that you might not have noticed. They are on the menu of any camera view: Filter -> Copy -> Backup Filter -> Copy -> Restore These options give you the ability to save the image at a particular point in the image processing (say, at the beginning before any processing) and restore it (say, at the end). In this manner, you can: 1. back a backup 2. apply a bunch of color filters 3. blobify 4. restore 5. apply a bunch of different color filters 6. blobify on those You may not need that much complexity, but it's there if you do. -Doug > I am trying to use blobfinder for landmark navigation in the Pyrobot > simulator. I can not find any documentation, but I've determined > experimentally that blob[0][2] ranges from 0-39 with 20 indicating the > blob is centered in the camera view, blob[0][0] is related to the > distance from the blob but is not in robot units and is not linear, and > blob[0][4] is the mass, perhaps in numbers of pixels in the camera > view. Can you tell me more precise information about these return > values? > > I have created a simple world with different colored boxes in each > corner, and I'm trying to set the robot's position based on the > location of one of the landmarks. I am trying to see if I can get > better results than by using dead reckoning. I'd like to be able to > calculate the robot's location based on either blob[0] or by utilizing > the known mass of the landmark (in which case I'd like to know the > height of the boxes) and comparing that to the mass returned. If there > is a better way to do this, I am open to suggestions. I know I can use > triangulation if the camera can see two landmarks, but I am hoping to > avoid that. > > I am also wondering if there is a way to look for blobs of multiple > colors (not a range), or if I have to blobify on each color and call > clearFilters(). Also, is there a way to get the world coordinates of > the robots from the simulator to test the accuracy of the navigation? > > Thanks, > Andrea From erik at ekhagen.org Mon Apr 3 04:23:55 2006 From: erik at ekhagen.org (Erik Billing) Date: Mon Apr 3 04:23:57 2006 Subject: [Pyro-users] Pyro in Ubuntu Message-ID: <53f8910d0604030123s3545d54em609033afb9c84f9@mail.gmail.com> Hi! I'm running Ubuntu (which uses debians package system). I managed to install Pyrobot from the pyrobot-4.6.1-fc3.i386.rpm using alien. Most maps of thepyrobot server seams to work fine, except the Tutorial world wich renders the folowing error when I try to load thePyrobotRobot60000. Pyrobot Version 4.6.1: Ready... Attempting to import 'PyrobotRobot60000'... Loaded '/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/PyrobotRobot60000.py'! Loading device sonar[0]... Loading device light[0]... Loading device bulb[0]... Camera device creation failed! Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__ return self.func(*args) File "/usr/lib/python2.4/site-packages/pyrobot/gui/TK.py", line 193, in loadRobot gui.loadRobot(self) File "/usr/lib/python2.4/site-packages/pyrobot/gui/__init__.py", line 517, in loadRobot self.engine.loadRobot (f) File "/usr/lib/python2.4/site-packages/pyrobot/engine/__init__.py", line 174, in loadRobot self.robot = system.loadINIT(file) File "/usr/lib/python2.4/site-packages/pyrobot/system/__init__.py", line 96, in loadINIT retval = userspace.INIT() File "/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/PyrobotRobot60000.py", line 4, in INIT robot = TCPRobot("localhost", 60000) File "/usr/lib/python2.4/site-packages/pyrobot/robot/symbolic.py", line 326, in __init__ self.init(startDevices) File "/usr/lib/python2.4/site-packages/pyrobot/robot/symbolic.py", line 217, in init d = self.startDevice(dev) File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", line 245, in startDevice dev = self.startDevices (item, **args) File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", line 271, in startDevices return self.startDevices( deviceList, **args ) # dict of objs File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", line 279, in startDevices if file[-3:] != '.py': TypeError: unsubscriptable object The same error was generated when I tried under Windows XP. What am I doing wrong? Furthermore. I also installed player (from the rpm using alien) and tried to start the Khepera simulator by choosing the Playerserver and the Khepera.cfg. So far so good, but when I load the Khepera robot I get the folowing error: Pyrobot Version 4.6.1: Ready... Attempting to import 'Khepera'... Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__ return self.func(*args) File "/usr/lib/python2.4/site-packages/pyrobot/gui/TK.py", line 193, in loadRobot gui.loadRobot(self) File "/usr/lib/python2.4/site-packages/pyrobot/gui/__init__.py", line 517, in loadRobot self.engine.loadRobot(f) File "/usr/lib/python2.4/site-packages/pyrobot/engine/__init__.py", line 174, in loadRobot self.robot = system.loadINIT(file) File "/usr/lib/python2.4/site-packages/pyrobot/system/__init__.py", line 86, in loadINIT exec("import " + module + " as userspace") File "", line 1, in ? File "/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/Khepera.py", line 3, in ? from pyrobot.robot.khepera import * File "/usr/lib/python2.4/site-packages/pyrobot/robot/khepera.py", line 17, in ? from pyrobot.simulators.khepera.CNTRL import _ksim as ksim ImportError: No module named khepera.CNTRL Any ideas of what might be wrong? Finally, I wonder if Pyrobot also implements an interface to a physical Khepera (or is it only the simulator)? Best regards /Erik -------------- next part -------------- An HTML attachment was scrubbed... URL: http://emergent.brynmawr.edu/pipermail/pyro-users/attachments/20060403/f7587c28/attachment-0001.htm From dblank at brynmawr.edu Mon Apr 3 08:33:01 2006 From: dblank at brynmawr.edu (dblank@brynmawr.edu) Date: Mon Apr 3 08:33:07 2006 Subject: [Pyro-users] Pyro in Ubuntu In-Reply-To: <53f8910d0604030123s3545d54em609033afb9c84f9@mail.gmail.com> References: <53f8910d0604030123s3545d54em609033afb9c84f9@mail.gmail.com> Message-ID: <39189.68.34.179.248.1144067581.squirrel@webmail.brynmawr.edu> Erik, Thanks for the feedback! These are both the same issue: the Pyrobot Tutorial world uses a camera, and all cameras use a C++ layer. Under Debian, you should be able to type "make" in the pyrobot directory, or maybe: cd pyrobot/camera/device; make; cd - cd pyrobot/camera/fake; make; cd - cd vision/cvision/; make; cd - I think that will build the three C++ directories needed for Pyrobot vision. Let us know if you have any errors. Alternatively, you can take out the Camera and PTZ from pyrobot/plugins/worlds/Pyrobot/Tutorial.py. That may be your only option under Windows; if you can get those three files to compile under Windows, please send patches to the makefile or sources. The Khepera error was fixed in the latest version. It only supports real robots. If you send more details on running alien to get Debian-compatible packages, I'll add that to the install webpage. Does Debian have .deb repositories? Thanks again! -Doug > Hi! > > I'm running Ubuntu (which uses debians package system). I managed to > install > Pyrobot from the pyrobot-4.6.1-fc3.i386.rpm using alien. Most maps of > thepyrobot server seams to work fine, except > the Tutorial world wich renders the folowing error when I try to load > thePyrobotRobot60000. > > Pyrobot Version 4.6.1: Ready... > Attempting to import 'PyrobotRobot60000'... > Loaded > '/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/PyrobotRobot60000.py'! > Loading device sonar[0]... > Loading device light[0]... > Loading device bulb[0]... > Camera device creation failed! > Exception in Tkinter callback > Traceback (most recent call last): > File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__ > return self.func(*args) > File "/usr/lib/python2.4/site-packages/pyrobot/gui/TK.py", line 193, in > loadRobot > gui.loadRobot(self) > File "/usr/lib/python2.4/site-packages/pyrobot/gui/__init__.py", line > 517, > in loadRobot > self.engine.loadRobot (f) > File "/usr/lib/python2.4/site-packages/pyrobot/engine/__init__.py", line > 174, in loadRobot > self.robot = system.loadINIT(file) > File "/usr/lib/python2.4/site-packages/pyrobot/system/__init__.py", line > 96, in loadINIT > retval = userspace.INIT() > File > "/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/PyrobotRobot60000.py", > line 4, in INIT > robot = TCPRobot("localhost", 60000) > File "/usr/lib/python2.4/site-packages/pyrobot/robot/symbolic.py", line > 326, in __init__ > self.init(startDevices) > File "/usr/lib/python2.4/site-packages/pyrobot/robot/symbolic.py", line > 217, in init > d = self.startDevice(dev) > File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", line > 245, in startDevice > dev = self.startDevices (item, **args) > File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", line > 271, in startDevices > return self.startDevices( deviceList, **args ) # dict of objs > File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", line > 279, in startDevices > if file[-3:] != '.py': > TypeError: unsubscriptable object > > > The same error was generated when I tried under Windows XP. What am I > doing > wrong? > > Furthermore. I also installed player (from the rpm using alien) and tried > to > start the Khepera simulator by choosing the Playerserver and the > Khepera.cfg. > So far so good, but when I load the Khepera robot I get the folowing > error: > > Pyrobot Version 4.6.1: Ready... > Attempting to import 'Khepera'... > Exception in Tkinter callback > Traceback (most recent call last): > File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__ > return self.func(*args) > File "/usr/lib/python2.4/site-packages/pyrobot/gui/TK.py", line 193, in > loadRobot > gui.loadRobot(self) > File "/usr/lib/python2.4/site-packages/pyrobot/gui/__init__.py", line > 517, > in loadRobot > self.engine.loadRobot(f) > File "/usr/lib/python2.4/site-packages/pyrobot/engine/__init__.py", line > 174, in loadRobot > self.robot = system.loadINIT(file) > File "/usr/lib/python2.4/site-packages/pyrobot/system/__init__.py", line > 86, in loadINIT > exec("import " + module + " as userspace") > File "", line 1, in ? > File > "/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/Khepera.py", > line 3, in ? > from pyrobot.robot.khepera import * > File "/usr/lib/python2.4/site-packages/pyrobot/robot/khepera.py", line > 17, > in ? > from pyrobot.simulators.khepera.CNTRL import _ksim as ksim > ImportError: No module named khepera.CNTRL > > Any ideas of what might be wrong? > > Finally, I wonder if Pyrobot also implements an interface to a physical > Khepera (or is it only the simulator)? > > > Best regards /Erik From dblank at brynmawr.edu Mon Apr 3 13:42:52 2006 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Mon Apr 3 13:43:11 2006 Subject: [Pyro-users] Pyro with FC5 In-Reply-To: References: Message-ID: <1144086172.3360.109.camel@mightymouse.brynmawr.edu> On Sat, 2006-04-01 at 15:32 -0500, Chris Spencer wrote: > I'm about to upgrade my Fedora installation. Has anyone tested the > repository with FC5? Should I be aware of any problems? Chris, I've just done some initial tests under FC5, and there are some issues. All of the C/C++ code looks like it is compiling fine. But there does seem to be an issue when importing shared C++ libraries in Python. As soon as we have this taken care of, and some more tests, I'll let you all know. Also, we'll make a FC5 yum repository as well. -Doug > Chris > > _______________________________________________ > Pyro-users mailing list > Pyro-users@emergent.brynmawr.edu > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users > -- Douglas S. Blank Computer Science Assistant Professor Bryn Mawr College (610)526-6501 http://cs.brynmawr.edu/~dblank From erik at ekhagen.org Tue Apr 4 02:59:36 2006 From: erik at ekhagen.org (Erik Billing) Date: Tue Apr 4 02:59:37 2006 Subject: [Pyro-users] Pyro in Ubuntu In-Reply-To: <39189.68.34.179.248.1144067581.squirrel@webmail.brynmawr.edu> References: <53f8910d0604030123s3545d54em609033afb9c84f9@mail.gmail.com> <39189.68.34.179.248.1144067581.squirrel@webmail.brynmawr.edu> Message-ID: <53f8910d0604032359r92ba400q6e269c51eb4a16f0@mail.gmail.com> Yes, Debian packages are named .deb. Alien simply converts a rpm to a deb-package, so using it is fiarly easy, I just did "alien -d pyrobot-4.6.1-fc3.i386.rpm", folowed by "dpkg -i pyrobot_4.6.1-1_i386.deb". Only problem after that is that the executable python script uses python 2.3, while I only have 2.4 installed, so I just change the first line to #!/usr/bin/python2.4 in /usr/bin/pyrobot as well as moving the pyrobot folder from /usr/lib/python2.3/site-packages/ to /usr/lib/python2.4/site-packages/. When I try to do make on the three folders you specify it says that the is nothing to do for "all". Any ideas? /Erik On 4/3/06, dblank@brynmawr.edu wrote: > > Erik, > > Thanks for the feedback! These are both the same issue: the Pyrobot > Tutorial world uses a camera, and all cameras use a C++ layer. Under > Debian, you should be able to type "make" in the pyrobot directory, or > maybe: > > cd pyrobot/camera/device; make; cd - > cd pyrobot/camera/fake; make; cd - > cd vision/cvision/; make; cd - > > I think that will build the three C++ directories needed for Pyrobot > vision. Let us know if you have any errors. > > Alternatively, you can take out the Camera and PTZ from > pyrobot/plugins/worlds/Pyrobot/Tutorial.py. That may be your only option > under Windows; if you can get those three files to compile under Windows, > please send patches to the makefile or sources. > > The Khepera error was fixed in the latest version. It only supports real > robots. > > If you send more details on running alien to get Debian-compatible > packages, I'll add that to the install webpage. Does Debian have .deb > repositories? Thanks again! > > -Doug > > > Hi! > > > > I'm running Ubuntu (which uses debians package system). I managed to > > install > > Pyrobot from the pyrobot-4.6.1-fc3.i386.rpm using alien. Most maps of > > thepyrobot server seams to work fine, except > > the Tutorial world wich renders the folowing error when I try to load > > thePyrobotRobot60000. > > > > Pyrobot Version 4.6.1: Ready... > > Attempting to import 'PyrobotRobot60000'... > > Loaded > > > '/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/PyrobotRobot60000.py'! > > Loading device sonar[0]... > > Loading device light[0]... > > Loading device bulb[0]... > > Camera device creation failed! > > Exception in Tkinter callback > > Traceback (most recent call last): > > File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__ > > return self.func(*args) > > File "/usr/lib/python2.4/site-packages/pyrobot/gui/TK.py", line 193, > in > > loadRobot > > gui.loadRobot(self) > > File "/usr/lib/python2.4/site-packages/pyrobot/gui/__init__.py", line > > 517, > > in loadRobot > > self.engine.loadRobot (f) > > File "/usr/lib/python2.4/site-packages/pyrobot/engine/__init__.py", > line > > 174, in loadRobot > > self.robot = system.loadINIT(file) > > File "/usr/lib/python2.4/site-packages/pyrobot/system/__init__.py", > line > > 96, in loadINIT > > retval = userspace.INIT() > > File > > > "/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/PyrobotRobot60000.py", > > line 4, in INIT > > robot = TCPRobot("localhost", 60000) > > File "/usr/lib/python2.4/site-packages/pyrobot/robot/symbolic.py", > line > > 326, in __init__ > > self.init(startDevices) > > File "/usr/lib/python2.4/site-packages/pyrobot/robot/symbolic.py", > line > > 217, in init > > d = self.startDevice(dev) > > File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", > line > > 245, in startDevice > > dev = self.startDevices (item, **args) > > File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", > line > > 271, in startDevices > > return self.startDevices( deviceList, **args ) # dict of objs > > File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", > line > > 279, in startDevices > > if file[-3:] != '.py': > > TypeError: unsubscriptable object > > > > > > The same error was generated when I tried under Windows XP. What am I > > doing > > wrong? > > > > Furthermore. I also installed player (from the rpm using alien) and > tried > > to > > start the Khepera simulator by choosing the Playerserver and the > > Khepera.cfg. > > So far so good, but when I load the Khepera robot I get the folowing > > error: > > > > Pyrobot Version 4.6.1: Ready... > > Attempting to import 'Khepera'... > > Exception in Tkinter callback > > Traceback (most recent call last): > > File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__ > > return self.func(*args) > > File "/usr/lib/python2.4/site-packages/pyrobot/gui/TK.py", line 193, > in > > loadRobot > > gui.loadRobot(self) > > File "/usr/lib/python2.4/site-packages/pyrobot/gui/__init__.py", line > > 517, > > in loadRobot > > self.engine.loadRobot(f) > > File "/usr/lib/python2.4/site-packages/pyrobot/engine/__init__.py", > line > > 174, in loadRobot > > self.robot = system.loadINIT(file) > > File "/usr/lib/python2.4/site-packages/pyrobot/system/__init__.py", > line > > 86, in loadINIT > > exec("import " + module + " as userspace") > > File "", line 1, in ? > > File > > "/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/Khepera.py", > > line 3, in ? > > from pyrobot.robot.khepera import * > > File "/usr/lib/python2.4/site-packages/pyrobot/robot/khepera.py", line > > 17, > > in ? > > from pyrobot.simulators.khepera.CNTRL import _ksim as ksim > > ImportError: No module named khepera.CNTRL > > > > Any ideas of what might be wrong? > > > > Finally, I wonder if Pyrobot also implements an interface to a physical > > Khepera (or is it only the simulator)? > > > > > > Best regards /Erik > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://emergent.brynmawr.edu/pipermail/pyro-users/attachments/20060404/b85239c9/attachment.htm From dblank at brynmawr.edu Tue Apr 4 08:27:55 2006 From: dblank at brynmawr.edu (dblank@brynmawr.edu) Date: Tue Apr 4 08:27:58 2006 Subject: [Pyro-users] Pyro in Ubuntu In-Reply-To: <53f8910d0604032359r92ba400q6e269c51eb4a16f0@mail.gmail.com> References: <53f8910d0604030123s3545d54em609033afb9c84f9@mail.gmail.com> <39189.68.34.179.248.1144067581.squirrel@webmail.brynmawr.edu> <53f8910d0604032359r92ba400q6e269c51eb4a16f0@mail.gmail.com> Message-ID: <46191.68.34.179.248.1144153675.squirrel@webmail.brynmawr.edu> > Yes, Debian packages are named .deb. Alien simply converts a rpm to a > deb-package, so using it is fiarly easy, I just did "alien -d > pyrobot-4.6.1-fc3.i386.rpm", folowed by "dpkg -i > pyrobot_4.6.1-1_i386.deb". > Only problem after that is that the executable python script uses python > 2.3, > while I only have 2.4 installed, so I just change the first line to > #!/usr/bin/python2.4 in /usr/bin/pyrobot as well as moving the pyrobot > folder from /usr/lib/python2.3/site-packages/ to > /usr/lib/python2.4/site-packages/. > > When I try to do make on the three folders you specify it says that the is > nothing to do for "all". Any ideas? Erik, Thanks for the Debian details. That RPM is pretty old. The newer FC4 Pyrobot packages build for Python2.4, and fix many issues. Sorry about the make; I forgot to tell you to "make clean" before make. So that should be: cd pyrobot/camera/device; make clean; make; cd - cd pyrobot/camera/fake; make clean; make; cd - cd vision/cvision/; make clean; make; cd - -Doug > /Erik > > On 4/3/06, dblank@brynmawr.edu wrote: >> >> Erik, >> >> Thanks for the feedback! These are both the same issue: the Pyrobot >> Tutorial world uses a camera, and all cameras use a C++ layer. Under >> Debian, you should be able to type "make" in the pyrobot directory, or >> maybe: >> >> cd pyrobot/camera/device; make; cd - >> cd pyrobot/camera/fake; make; cd - >> cd vision/cvision/; make; cd - >> >> I think that will build the three C++ directories needed for Pyrobot >> vision. Let us know if you have any errors. >> >> Alternatively, you can take out the Camera and PTZ from >> pyrobot/plugins/worlds/Pyrobot/Tutorial.py. That may be your only option >> under Windows; if you can get those three files to compile under >> Windows, >> please send patches to the makefile or sources. >> >> The Khepera error was fixed in the latest version. It only supports real >> robots. >> >> If you send more details on running alien to get Debian-compatible >> packages, I'll add that to the install webpage. Does Debian have .deb >> repositories? Thanks again! >> >> -Doug >> >> > Hi! >> > >> > I'm running Ubuntu (which uses debians package system). I managed to >> > install >> > Pyrobot from the pyrobot-4.6.1-fc3.i386.rpm using alien. Most maps of >> > thepyrobot server seams to work fine, except >> > the Tutorial world wich renders the folowing error when I try to load >> > thePyrobotRobot60000. >> > >> > Pyrobot Version 4.6.1: Ready... >> > Attempting to import 'PyrobotRobot60000'... >> > Loaded >> > >> '/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/PyrobotRobot60000.py'! >> > Loading device sonar[0]... >> > Loading device light[0]... >> > Loading device bulb[0]... >> > Camera device creation failed! >> > Exception in Tkinter callback >> > Traceback (most recent call last): >> > File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__ >> > return self.func(*args) >> > File "/usr/lib/python2.4/site-packages/pyrobot/gui/TK.py", line 193, >> in >> > loadRobot >> > gui.loadRobot(self) >> > File "/usr/lib/python2.4/site-packages/pyrobot/gui/__init__.py", >> line >> > 517, >> > in loadRobot >> > self.engine.loadRobot (f) >> > File "/usr/lib/python2.4/site-packages/pyrobot/engine/__init__.py", >> line >> > 174, in loadRobot >> > self.robot = system.loadINIT(file) >> > File "/usr/lib/python2.4/site-packages/pyrobot/system/__init__.py", >> line >> > 96, in loadINIT >> > retval = userspace.INIT() >> > File >> > >> "/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/PyrobotRobot60000.py", >> > line 4, in INIT >> > robot = TCPRobot("localhost", 60000) >> > File "/usr/lib/python2.4/site-packages/pyrobot/robot/symbolic.py", >> line >> > 326, in __init__ >> > self.init(startDevices) >> > File "/usr/lib/python2.4/site-packages/pyrobot/robot/symbolic.py", >> line >> > 217, in init >> > d = self.startDevice(dev) >> > File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", >> line >> > 245, in startDevice >> > dev = self.startDevices (item, **args) >> > File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", >> line >> > 271, in startDevices >> > return self.startDevices( deviceList, **args ) # dict of objs >> > File "/usr/lib/python2.4/site-packages/pyrobot/robot/__init__.py", >> line >> > 279, in startDevices >> > if file[-3:] != '.py': >> > TypeError: unsubscriptable object >> > >> > >> > The same error was generated when I tried under Windows XP. What am I >> > doing >> > wrong? >> > >> > Furthermore. I also installed player (from the rpm using alien) and >> tried >> > to >> > start the Khepera simulator by choosing the Playerserver and the >> > Khepera.cfg. >> > So far so good, but when I load the Khepera robot I get the folowing >> > error: >> > >> > Pyrobot Version 4.6.1: Ready... >> > Attempting to import 'Khepera'... >> > Exception in Tkinter callback >> > Traceback (most recent call last): >> > File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__ >> > return self.func(*args) >> > File "/usr/lib/python2.4/site-packages/pyrobot/gui/TK.py", line 193, >> in >> > loadRobot >> > gui.loadRobot(self) >> > File "/usr/lib/python2.4/site-packages/pyrobot/gui/__init__.py", >> line >> > 517, >> > in loadRobot >> > self.engine.loadRobot(f) >> > File "/usr/lib/python2.4/site-packages/pyrobot/engine/__init__.py", >> line >> > 174, in loadRobot >> > self.robot = system.loadINIT(file) >> > File "/usr/lib/python2.4/site-packages/pyrobot/system/__init__.py", >> line >> > 86, in loadINIT >> > exec("import " + module + " as userspace") >> > File "", line 1, in ? >> > File >> > "/usr/lib/python2.4/site-packages/pyrobot/plugins/robots/Khepera.py", >> > line 3, in ? >> > from pyrobot.robot.khepera import * >> > File "/usr/lib/python2.4/site-packages/pyrobot/robot/khepera.py", >> line >> > 17, >> > in ? >> > from pyrobot.simulators.khepera.CNTRL import _ksim as ksim >> > ImportError: No module named khepera.CNTRL >> > >> > Any ideas of what might be wrong? >> > >> > Finally, I wonder if Pyrobot also implements an interface to a >> physical >> > Khepera (or is it only the simulator)? >> > >> > >> > Best regards /Erik >> >> >> > From servando at mac.com Tue Apr 4 08:33:55 2006 From: servando at mac.com (Servando Garcia) Date: Tue Apr 4 08:34:01 2006 Subject: [Pyro-users] robot.range[].geometry Message-ID: <8799128.1144154035592.JavaMail.servando@mac.com> Would you please give me just a little bit more information about robot.range[].geometry I understand that it returns # returns x, y, z, theta in radians, arc width. Where does theta come from and the arc width. From dblank at brynmawr.edu Tue Apr 4 10:19:51 2006 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Tue Apr 4 10:20:07 2006 Subject: [Pyro-users] robot.range[].geometry In-Reply-To: <8799128.1144154035592.JavaMail.servando@mac.com> References: <8799128.1144154035592.JavaMail.servando@mac.com> Message-ID: <1144160391.23082.47.camel@mightymouse.brynmawr.edu> On Tue, 2006-04-04 at 07:33 -0500, Servando Garcia wrote: > Would you please give me just a little bit more information about > robot.range[].geometry > > I understand that it returns # returns x, y, z, theta in radians, arc > width. Where does theta come from and the arc width. Servando, The theta and arc come from the position and properties of the sensor. The theta is the angle the sensor is pointing. Zero is straight ahead, and positive radians go to the left, negative radians to the right. The arc is an approximation of the width of the sensor sensitivity, in radians. Lasers have a very narrow arc, while sonar and IR have a larger arc. So, >>> robot.range[0].geometry (0.10000000000000001, 0.17499999999999999, 0.029999999999999999, 1.5707963267948966, 0.087266462599716474) this sensor is positioned at: x = 0.10 y = 0.17 z = 0.03 th = 1.57 arc = 0.087 which means that it is pointing 1.57 (90 degrees) to the left, with a .087 (5 degree) arc. -Doug -- Douglas S. Blank Computer Science Assistant Professor Bryn Mawr College (610)526-6501 http://cs.brynmawr.edu/~dblank From crabbe at usna.edu Tue Apr 4 19:02:06 2006 From: crabbe at usna.edu (Prof Ric Crabbe) Date: Tue Apr 4 19:05:53 2006 Subject: [Pyro-users] Khepera & the KNOPPIX CD Message-ID: <17458.64238.477645.447178@crab.cs.usna.edu> Doug et al., The AI Mag article caused me to check out pyro again, and it seems you all have come a long way in the 3 years since the workshop. So far, in fact, I've decided to junk all my software and start up in yours. Since the robot class is going on now, I decided to go with the KNOPPIX CD solution for minimal disruption in the lab, but we're having problems getting pyro to work with the kheperas. In particular, when we try to load khepera.py, an exception is thrown ... "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", line 33, in __init__ self.noise = 0.0 File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", line 197, in _setDisabled raise AttributeError, "This attribute is read-only" AttributeError: This attribute is read-only When we comment out line 33, we can load the code, control the robot with the "joystick", and view the camera input, but then loading a brain causes a crash when it notices that there is no noise variable. This seems like a trivial fix, but I'm not familiar enough with python to make much progress groveling through the code. Could you help me out? Thanks so much. cheers, ric From dblank at brynmawr.edu Tue Apr 4 19:53:46 2006 From: dblank at brynmawr.edu (dblank@brynmawr.edu) Date: Tue Apr 4 19:54:00 2006 Subject: [Pyro-users] Khepera & the KNOPPIX CD In-Reply-To: <17458.64238.477645.447178@crab.cs.usna.edu> References: <17458.64238.477645.447178@crab.cs.usna.edu> Message-ID: <35746.68.34.179.248.1144194826.squirrel@webmail.brynmawr.edu> > Doug et al., > > The AI Mag article caused me to check out pyro again, and it seems you > all have come a long way in the 3 years since the workshop. So far, > in fact, I've decided to junk all my software and start up in yours. Ric, We have come a long way in the last three years... mostly figuring out how to do it right. BTW, enjoyed your article. It might be interesting to develop some Pyro materials to go along with your framework. (For those of you who haven't seen it, check out this quarter's AI Magazine.) > Since the robot class is going on now, I decided to go with the > KNOPPIX CD solution for minimal disruption in the lab, but we're > having problems getting pyro to work with the kheperas. Yes, that is a bug we just fixed a couple of weeks ago. You can see the diff to fix it here: http://compscitest.brynmawr.edu/cgi-bin/viewcvs.cgi/pyrobot/robot/khepera.py.diff?r1=1.99&r2=1.100 Also, I'll try to get a new Live CD out... maybe tomorrow. I'll update the yum repository, too. That should help so you don't have to make these changes every reboot! -Doug > In particular, when we try to load khepera.py, an exception is thrown > ... > "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", line 33, in > __init__ > self.noise = 0.0 > File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", line > 197, in _setDisabled > raise AttributeError, "This attribute is read-only" > AttributeError: This attribute is read-only > > When we comment out line 33, we can load the code, control the robot > with the "joystick", and view the camera input, but then loading a > brain causes a crash when it notices that there is no noise variable. > > This seems like a trivial fix, but I'm not familiar enough with python > to make much progress groveling through the code. Could you help me > out? > > Thanks so much. > > cheers, > ric From dblank at brynmawr.edu Wed Apr 5 12:29:33 2006 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Wed Apr 5 12:30:16 2006 Subject: [Pyro-users] Khepera & the KNOPPIX CD In-Reply-To: <35746.68.34.179.248.1144194826.squirrel@webmail.brynmawr.edu> References: <17458.64238.477645.447178@crab.cs.usna.edu> <35746.68.34.179.248.1144194826.squirrel@webmail.brynmawr.edu> Message-ID: <1144254573.10780.47.camel@mightymouse.brynmawr.edu> Pyro users, There is a new LiveCD with Pyro 4.8.1 available at: http://pyrorobotics.org/?page=PyroLiveCD The what's new page describes what's new: http://pyrorobotics.org/?page=PyroWhatsNew -Doug On Tue, 2006-04-04 at 19:53 -0400, dblank@brynmawr.edu wrote: > > Doug et al., > > > > The AI Mag article caused me to check out pyro again, and it seems you > > all have come a long way in the 3 years since the workshop. So far, > > in fact, I've decided to junk all my software and start up in yours. > > Ric, > > We have come a long way in the last three years... mostly figuring out how > to do it right. BTW, enjoyed your article. It might be interesting to > develop some Pyro materials to go along with your framework. (For those of > you who haven't seen it, check out this quarter's AI Magazine.) > > > Since the robot class is going on now, I decided to go with the > > KNOPPIX CD solution for minimal disruption in the lab, but we're > > having problems getting pyro to work with the kheperas. > > Yes, that is a bug we just fixed a couple of weeks ago. You can see the > diff to fix it here: > > http://compscitest.brynmawr.edu/cgi-bin/viewcvs.cgi/pyrobot/robot/khepera.py.diff?r1=1.99&r2=1.100 > > Also, I'll try to get a new Live CD out... maybe tomorrow. I'll update the > yum repository, too. That should help so you don't have to make these > changes every reboot! > > -Doug > > > In particular, when we try to load khepera.py, an exception is thrown > > ... > > "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", line 33, in > > __init__ > > self.noise = 0.0 > > File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", line > > 197, in _setDisabled > > raise AttributeError, "This attribute is read-only" > > AttributeError: This attribute is read-only > > > > When we comment out line 33, we can load the code, control the robot > > with the "joystick", and view the camera input, but then loading a > > brain causes a crash when it notices that there is no noise variable. > > > > This seems like a trivial fix, but I'm not familiar enough with python > > to make much progress groveling through the code. Could you help me > > out? > > > > Thanks so much. > > > > cheers, > > ric > > > _______________________________________________ > Pyro-users mailing list > Pyro-users@emergent.brynmawr.edu > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users > -- Douglas S. Blank Computer Science Assistant Professor Bryn Mawr College (610)526-6501 http://cs.brynmawr.edu/~dblank From vector180 at aanet.com.au Thu Apr 6 19:14:58 2006 From: vector180 at aanet.com.au (vector) Date: Thu Apr 6 19:20:10 2006 Subject: [Pyro-users] Intro to robotics Message-ID: <4435A0F2.4050204@aanet.com.au> HI all hmm where shall I start. if you want the point then jump down to "my point" Introduction: If I were to put myself on a ladder, indicating my level of robotics compared to you guys I would not be on the bottom rung. I would be under the pavemnet on which the ladder stands. My interest in robotics was triggered after having to fix some rug warriors for a small almost insignificant section of a lab class at the university I work at. so I know electronics yes Im a techie. I fixed the rug warriors yes - but i wasnt impressed with them. Also my son of 5 no doubt like most kids has shown interest in things that move. We often spend time together "playing" with knex. I have never liked leggo i find its interconnections weak and un mechanical. robots looked like the next step. So i went looking for something that: A) simulated on a pc with no hardware required b) worked outa the box c) had an easy language to learn d) was expandable right on into the real world I came across pyrobot. I am a work:winxp home:ubuntu user and I speak a little python.could it be any better? I first watched the videostreams . looked great I then made a pyrobot live cd (as the instructions to get it all to work on Ubuntu looked a little invloved. I am not a computer IT person) "my point": The liveCD worked and I followed the getting started. this is great.... now what do I do? I can see lots of brains and stages and soccer things but have no idea how to "start them" BTW the latest live cd, the curriculum links that bring up the pdfs etc..they dont work. it says file not found or something as such. Id like to show my boy the soccer simulation..(i assume it has one?) maybe follow some course notes if they are available for the next step beyond getting started. Anyway Ill go digging thru the web site today but thought Id drop a note first. you have done an exceptional job from what I can see I cant speak more highly of it. The getting started has me sucked in :) so now what? id like to work mostly on the sim stuff and at bottom rung levels Many many thanks. Griffle From gbisdale at hrl.com Mon Apr 10 16:10:44 2006 From: gbisdale at hrl.com (Jerry Isdale) Date: Mon Apr 10 16:07:08 2006 Subject: [Pyro-users] Symbolic Robot and 3D Simulator Bots Message-ID: <443ABBC4.2040702@hrl.com> I've been working on building a 3D robot with full 6DoF motion, using the Delta3d system as my simulator(aka PiRhoDelta). I got a basic interface hacked up and we did some extensions so we can fly a simple helicopter via pyro w/4 DoF (x,y,z, yaw. no roll/pitch) Next up are changes to provide support for more commands and different sensors/devices. Implementing these requires adding commands to the message protocol, as well somehow enhancing the Robot class (or a derived class) to support the new functions. Digging into this brought up a number of issues. (apologies to pyro-users who don't particularly care about these issues. mostly these are for pyro-developers, but users should have a voice) 1 Minor Issue: Simple Socket Read/Write The currently implemented socket read/write is a simple sendTo and recvFrom call. It expects that the entire message will be sent & received by one call. Sending isnt too much of an issue, but receiving data on sockets is a known issue. When you start a read, all the data may not be in the socket's buffer. This is especially true for larger data xfers, which might get split into multiple packets on the net. Generally Pyro's messages are very small so they would rarely see problems. However, for larger messages (camera images, homogenous (16 float) matrices, etc), it might be. The usual technique is to prepend a header that includes the size in bytes of the message body. Player does this inside it's message packets. Python's logging uses a 4 byte header. The read side first gets the header and then collects bytes until it gets all the message (or timeouts or ...). A more flexible header I've used for multi-language sockets encodes the body size as an ascii encoded integer followed by a space: "235920 ". This can be created/read and understood by C++, Java, Python, etc. Fairly simple limited change. 2 Bigger Issue: Symbolic Robot move() method The Symbolic Robot (aka SimBot, TCPRobot) redefines the basic Robot move(self, translate_velocity, rotate_velocity) method to be a generic send message. It still takes two parameters, but they can be anything. This lets the VacuumCleanerWorld.py and CleanUp.py brain use commands like: robot.move("suck"). I suggest a better technique would be to create a real "send" message that simply takes a single (string) argument and sends it to the simulator. Then the CleanUp.py would use robot.send("suck"), and the SimBot move method wouldnt have to have some odd code to deal with special cases. A variation on send, sendList, could take a list of parameters and send them (pickled or otherwise). As a software engineer, this seems to me to be a cleaner technique. We keep the basic Robot interface (published methods) and extend it for the specialized SimBot case but dont change pre-defined method signatures. Would this change of move -> send impact the users widely and strongly? We could implement it in a backward compatible manner and sometime later remove the odd move(). 3 Even Bigger Issue: Extending SimBot for 6DoF What is the best way to extend the SimBot (or more likely the TCPRobot) class to support a variety of 6DOF attributes? And allow positioning of articulated attachments (eg. a PTZ camera in the nose, or at the end of an arm mounted on the bot). For this, I have no answers yet, but would like to hear from other Pyro developers/users. 4 Related: TCPRobot3D messages Related to the design of the 6DOF bot is the question of what the messages should look like. At present SimBot messages (from Brain's robot via comm to Simulator's robot) are single word strings, with the first character(s) being the message type, followed by parameters delimited with '_' characters. This is pretty general and could be extended. The Player/Gazebo folks are having a discussion about redesigning Gazebo for better rendering and more features. The Player comm system supports a lot more functions that can be used for 6DOF work. It might be possible to use the Player protocol for communication between Pyro and PyroSimulator/PiRhoDelta). We would need to finds some way to accommodate the Symbolic worlds and other extensions. Implementing the receive side would require a fair bit of rework to our Simulators - perhaps implementing a parser for the protocol in Python? (it is basically XDR, which Python can handle.) Having a simple protocol under our control makes it a lot easier - especially if the protocol is implemented in Python rather than by linking in someone else's C++ library. For now I suggest we simply extend the message protocol with new message type tags. Ok, thats too long already so I'll leave it at that. -- Jerry Isdale, Research Staff Scientist Advanced Technology Department, M/S RL96 HRL Laboratories, LLC 3011 Malibu Canyon Road Malibu, Ca, 90265 USA Tel: +11 310-317-5883 Fax: +11 310-317-5695 email: isdale@hrl.com web: http://www.hrl.com personal: http://vr.isdale.com From akfey at bulldog.unca.edu Thu Apr 13 21:50:13 2006 From: akfey at bulldog.unca.edu (Andrea Kirsten Fey) Date: Thu Apr 13 21:50:16 2006 Subject: [Pyro-users] trouble with pyvnc2swf/pyrobot combination Message-ID: <1053511.1144979413816.JavaMail.akfey@bulldog.unca.edu> I am trying to make a video recording a Pyro simulation using pyvnc2swf. It always stalls between the first and second minute, and I get the following trace: Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__ return self.func(*args) File "vnc2swf.py", line 225, in record self.client.close() File "/home/andrea/pyro/pyvnc2swf-0.8.2/rfb.py", line 525, in close RFBProxy.close(self) File "/home/andrea/pyro/pyvnc2swf-0.8.2/rfb.py", line 463, in close self.fb.close() File "/home/andrea/pyro/pyvnc2swf-0.8.2/rfb.py", line 814, in close self.stream.close() File "/home/andrea/pyro/pyvnc2swf-0.8.2/output.py", line 482, in close self.writer.write_file(self.output_frames) File "/home/andrea/pyro/pyvnc2swf-0.8.2/swf.py", line 708, in write_file assert not self.fpstack, 'nonempty fpstack: %r' % self.fpstack AssertionError: nonempty fpstack: [] I can stop recording before this happens and create .swf and html files, although the second time through the loop the graphics don't refresh properly. I can record the session without starting pyro. I thought it might be a permission problem and added full r/w permissions to any file and directory related to my pyro session (did not help), but since I can create the files if they're very short, this should not be related. I'm using the default shape mode to record, and have set up the session exactly as in the instructions. Running pyro with a simple brain, such as the included FSM square traverser, causes failure as well. I ran it with the debug option, but couldn't discern anything from the log files. Has anyone seen this problem? I've searched the pyrobot, python, and pyvnc2swf archives/websites and have had no luck on Google - I'm not really sure what I'm looking for, though. I'm going to drop a line to the pyvnc2swf users as well, but I was not sure where to start. Thanks. Andrea From dblank at brynmawr.edu Fri Apr 14 00:20:07 2006 From: dblank at brynmawr.edu (dblank@brynmawr.edu) Date: Fri Apr 14 00:20:10 2006 Subject: [Pyro-users] trouble with pyvnc2swf/pyrobot combination In-Reply-To: <1053511.1144979413816.JavaMail.akfey@bulldog.unca.edu> References: <1053511.1144979413816.JavaMail.akfey@bulldog.unca.edu> Message-ID: <49624.68.34.179.248.1144988407.squirrel@webmail.brynmawr.edu> Andrea, I just tried this, and it worked for me under Fedora Core 4, pyvnc2swf 0.7.0, with the standard vnc 4.1.1-10.1. I notice that I am using an older pyvnc2swf than you. I'll try the new version and report back if it fails. I followed the directions at (which I assume that you did too): http://pyrorobotics.org/?page=PyroHowtoVideo Here is how I ran vnc2swf: $ python vnc2swf.py Using pygame 1.6.2 Connected: 127.0.0.1:5901, preferred_encoding=(0,) VNC Screen: size=1024x768, name='saliva.brynmawr.edu:1 (dblank)' Output movie size: 1024x768 Creating movie: '/home/dblank/pyvnc2swf-0.7.0/test.swf': version=5, size=1024x768, framerate=12.0, compression=None $ ls -al test.swf -rw-rw-r-- 1 dblank dblank 4876006 Apr 14 00:04 test.swf Do you get this same error if you just record nothing for a few minutes (eg, without running Pyro?) My CPU was pegged at 100% running a simulation with camera, sonar, etc. with a 1024x768 VNC, but it worked. I didn't capture the sound, though. My computer is about 5 years old, so it isn't a very powerful computer, and has a single CPU. I suspect that the error doesn't have anything to do with the Python-based robot software, but I could be wrong. Let us know under what situations it works, and when it doesn't. -Doug > I am trying to make a video recording a Pyro simulation using > pyvnc2swf. It always stalls between the first and second minute, and I > get the following trace: > > Exception in Tkinter callback > Traceback (most recent call last): > File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__ > return self.func(*args) > File "vnc2swf.py", line 225, in record > self.client.close() > File "/home/andrea/pyro/pyvnc2swf-0.8.2/rfb.py", line 525, in close > RFBProxy.close(self) > File "/home/andrea/pyro/pyvnc2swf-0.8.2/rfb.py", line 463, in close > self.fb.close() > File "/home/andrea/pyro/pyvnc2swf-0.8.2/rfb.py", line 814, in close > self.stream.close() > File "/home/andrea/pyro/pyvnc2swf-0.8.2/output.py", line 482, in close > self.writer.write_file(self.output_frames) > File "/home/andrea/pyro/pyvnc2swf-0.8.2/swf.py", line 708, in > write_file > assert not self.fpstack, 'nonempty fpstack: %r' % self.fpstack > AssertionError: nonempty fpstack: [ at 0xb7c732f0>] > > I can stop recording before this happens and create .swf and html > files, although the second time through the loop the graphics don't > refresh properly. I can record the session without starting pyro. I > thought it might be a permission problem and added full r/w permissions > to any file and directory related to my pyro session (did not help), > but since I can create the files if they're very short, this should not > be related. I'm using the default shape mode to record, and have set up > the session exactly as in the instructions. Running pyro with a simple > brain, such as the included FSM square traverser, causes failure as > well. > > I ran it with the debug option, but couldn't discern anything from the > log files. > > Has anyone seen this problem? I've searched the pyrobot, python, and > pyvnc2swf archives/websites and have had no luck on Google - I'm not > really sure what I'm looking for, though. I'm going to drop a line to > the pyvnc2swf users as well, but I was not sure where to start. > > Thanks. > Andrea From deepankar.sharma at gmail.com Wed Apr 19 13:54:14 2006 From: deepankar.sharma at gmail.com (Deepankar Sharma) Date: Wed Apr 19 13:54:15 2006 Subject: [Pyro-users] Problems in USARSim+Pyro with multiple robots. Message-ID: Hello, I have been trying to use USARSim with Pyro for multiple robots. The code I have in pyro, runs fine for a single robot but spits out an error in case of multiple robots. A thing to note, is that the version of pyrobot which works with USARSim is not exactly recent. I think it is a 2.x version (when pyrobot was still called pyro). The error message is : Pyro Version 2.0.4: Ready... Loading C:\Python24\Lib\site-packages\pyro\plugins\robots\USARBot/P2AT.py Loading INIT 'C:\Python24\Lib\site-packages\pyro\plugins\robots\USARBot/P2AT.py'... Loaded P2AT! Creating Robot Loading UT robot interface... Device: utbot connected to 127.0.0.1:3000 P2AT control drivers loaded Loaded C:\Python24\Lib\site-packages\pyro\plugins\robots\USARBot/P2AT.py Loading C:\Python24\Lib\site-packages\pyro\plugins\brains/Avoid.py Loading INIT 'C:\Python24\Lib\site-packages\pyro\plugins\brains/Avoid.py'... Loaded Avoid! need to override LOCALIZE in robot Loaded C:\Python24\Lib\site-packages\pyro\plugins\brains/Avoid.py Running... Exception in thread Thread-1: Traceback (most recent call last): File "c:\Python24\lib\threading.py", line 442, in __bootstrap self.run() File "C:\Python24\Lib\site-packages\pyro\brain\__init__.py", line 78, in run self.step() File "C:\Python24\Lib\site-packages\pyro\plugins\brains\Avoid.py", line 26, in step left = robot.get('range', 'value', 'left-front', 'minval') File "C:\Python24\Lib\site-packages\pyro\robot\__init__.py", line 126, in get for i in self.sensorSet[pos]: KeyError: 'left-front' Loading C:\Python24\Lib\site-packages\pyro\plugins\brains/BBWander.py Loading INIT 'C:\Python24\Lib\site-packages\pyro\plugins\brains/BBWander.py'... Loaded BBWander! need to override LOCALIZE in robot initialized state state1 Loaded C:\Python24\Lib\site-packages\pyro\plugins\brains/BBWander.py Running... Exception in thread Thread-2: Traceback (most recent call last): File "c:\Python24\lib\threading.py", line 442, in __bootstrap self.run() File "C:\Python24\Lib\site-packages\pyro\brain\__init__.py", line 78, in run self.step() File "C:\Python24\Lib\site-packages\pyro\brain\behaviors\__init__.py", line 94, in step self.controls[c](control[c]) File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", line 440, in rotate self.rotateDev(self.dev, rotate_velocity) File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", line 443, in rotateDev self.update() File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", line 505, in update self.updateDev(self.dev) File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", line 509, in updateDev self.dev.update() File "C:\Python24\Lib\site-packages\pyro\robot\driver\utbot.py", line 172, in update msg = utmessage(packet) File "C:\Python24\Lib\site-packages\pyro\robot\driver\utbot.py", line 685, in __init__ self.segs[i][ps[j]]=ps[j+1].split(',') IndexError: list index out of range -------------- next part -------------- An HTML attachment was scrubbed... URL: http://emergent.brynmawr.edu/pipermail/pyro-users/attachments/20060419/fa138943/attachment.htm From dblank at brynmawr.edu Wed Apr 19 14:28:11 2006 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Wed Apr 19 14:28:25 2006 Subject: [Pyro-users] Problems in USARSim+Pyro with multiple robots. In-Reply-To: References: Message-ID: <1145471291.22073.21.camel@mightymouse.brynmawr.edu> Not only is that not very recent code, but the code that is crashing wasn't written by us and we've never seen it. You'll have better luck contacting whomever wrote utbot.py and usarbot/*. If you wanted to port the latest Pyrobot to USARSim, we could probably help, especially if it could be used by everyone. -Doug On Wed, 2006-04-19 at 13:54 -0400, Deepankar Sharma wrote: > Hello, > > I have been trying to use USARSim with Pyro for multiple robots. The > code I have in pyro, runs fine for a single robot but spits out an > error in case of multiple robots. > A thing to note, is that the version of pyrobot which works with > USARSim is not exactly recent. I think it is a 2.x version (when > pyrobot was still called pyro). > > The error message is : > > > Pyro Version 2.0.4: Ready... > Loading C:\Python24\Lib\site-packages > \pyro\plugins\robots\USARBot/P2AT.py > Loading INIT 'C:\Python24\Lib\site-packages\pyro\plugins\robots > \USARBot/P2AT.py'... > Loaded P2AT! > Creating Robot > Loading UT robot interface... > Device: utbot connected to 127.0.0.1:3000 > P2AT control drivers loaded > Loaded C:\Python24\Lib\site-packages\pyro\plugins\robots > \USARBot/P2AT.py > DM-USAR_selfmade_room} {TimeLimit 0}> > 8713,46307,0}> > 8713,46307,0}> > Loading C:\Python24\Lib\site-packages\pyro\plugins\brains/Avoid.py > Loading INIT 'C:\Python24\Lib\site-packages\pyro\plugins > \brains/Avoid.py'... > Loaded Avoid! > need to override LOCALIZE in robot > Loaded C:\Python24\Lib\site-packages\pyro\plugins\brains/Avoid.py > Running... > Exception in thread Thread-1: > Traceback (most recent call last): > File "c:\Python24\lib\threading.py", line 442, in __bootstrap > self.run() > File "C:\Python24\Lib\site-packages\pyro\brain\__init__.py", line > 78, in run > self.step() > File "C:\Python24\Lib\site-packages\pyro\plugins\brains\Avoid.py", > line 26, in step > left = robot.get('range', 'value', 'left-front', 'minval') > File "C:\Python24\Lib\site-packages\pyro\robot\__init__.py", line > 126, in get > for i in self.sensorSet[pos]: > KeyError: 'left-front' > > Loading C:\Python24\Lib\site-packages\pyro\plugins\brains/BBWander.py > Loading INIT 'C:\Python24\Lib\site-packages\pyro\plugins > \brains/BBWander.py'... > Loaded BBWander! > need to override LOCALIZE in robot > initialized state state1 > Loaded C:\Python24\Lib\site-packages\pyro\plugins\brains/BBWander.py > Running... > Exception in thread Thread-2: > Traceback (most recent call last): > File "c:\Python24\lib\threading.py", line 442, in __bootstrap > self.run() > File "C:\Python24\Lib\site-packages\pyro\brain\__init__.py", line > 78, in run > self.step() > File "C:\Python24\Lib\site-packages\pyro\brain\behaviors > \__init__.py", line 94, in step > self.controls[c](control[c]) > File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", > line 440, in rotate > self.rotateDev(self.dev, rotate_velocity) > File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", > line 443, in rotateDev > self.update() > File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", > line 505, in update > self.updateDev(self.dev) > File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", > line 509, in updateDev > self.dev.update() > File "C:\Python24\Lib\site-packages\pyro\robot\driver\utbot.py", > line 172, in update > msg = utmessage(packet) > File "C:\Python24\Lib\site-packages\pyro\robot\driver\utbot.py", > line 685, in __init__ > self.segs[i][ps[j]]=ps[j+1].split(',') > IndexError: list index out of range > _______________________________________________ > Pyro-users mailing list > Pyro-users@emergent.brynmawr.edu > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users -- Douglas S. Blank Computer Science Assistant Professor Bryn Mawr College (610)526-6501 http://cs.brynmawr.edu/~dblank From bob.roos at gmail.com Wed Apr 19 15:17:32 2006 From: bob.roos at gmail.com (Bob Roos) Date: Wed Apr 19 15:17:32 2006 Subject: [Pyro-users] Hemisson sensors Message-ID: I'm trying to get Pyro working with a Hemisson robot on my laptop. I've installed Pyrobot 4.6.1 on my laptop (running Fedora Core 3 2.6.9-1.667). I've uploaded version "f" of the HemiOS (HemiOs-1.50RNf.HEX -- downloaded from the RoadNarrows web site). I've successfully installed the Bluetooth drivers and I can communicate with the "Hemisson.py" robot successfully. However, I tried entering the following command into the "Command:" line and got a stack overflow: robot.range[0].distance() The output from this command reads: ERROR: exceptions.RuntimeError maximum recursion depth exceeded Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/pyrobot/gui/__init__.py", line 306, in processCommand exec exp2 in self.environment File "", line 1, in ? File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", line 324, in __getitem__ return self.getSensorValue(item) File "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", line 63, in getSensorValue noise=self.noise) File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", line 231, in _getNoise return [s.noise for s in self] File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", line 307, in __iter__ yield self.getSensorValue(pos) ... and then it loops for a long time in a cycle of lines khepera/63, device/231, device/307 until it finally terminates with: ... line 307 ... yield self.getSensorValue(pos) File "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", line 58, in getSensorValue (self._ox(pos) / 1000.0, # meters File "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", line 105, in _thr return self._th(pos) * PIOVER180 RuntimeError: maximum recursion depth exceeded exceptions.RuntimeError: in command line Other basic commands seem to work fine (e.g., "robot.range.title" returns "ir[0]", "move", "translate", "rotate"). Am I missing something really basic here? I did make the correction to the "khepera.py" file (commented out the "import" of khepera.CNTRL) as described in Doug Blank's e-mail of Feb. 8). Am I misusing the range variable? Thanks! Bob From deepankar.sharma at gmail.com Wed Apr 19 15:52:47 2006 From: deepankar.sharma at gmail.com (Deepankar Sharma) Date: Wed Apr 19 15:52:47 2006 Subject: [Pyro-users] Problems in USARSim+Pyro with multiple robots. In-Reply-To: <1145471291.22073.21.camel@mightymouse.brynmawr.edu> References: <1145471291.22073.21.camel@mightymouse.brynmawr.edu> Message-ID: Hello, I did contact the authot of utbot.py and usarbot, and have heard back from him what the problem was. So the problem is closed. As for the offer of porting latest Pyrobot to USARSim, I am unable to commit to that in the short term. Regards, Deepankar On 4/19/06, Douglas S. Blank wrote: > > Not only is that not very recent code, but the code that is crashing > wasn't written by us and we've never seen it. You'll have better luck > contacting whomever wrote utbot.py and usarbot/*. > > If you wanted to port the latest Pyrobot to USARSim, we could probably > help, especially if it could be used by everyone. > > -Doug > > On Wed, 2006-04-19 at 13:54 -0400, Deepankar Sharma wrote: > > Hello, > > > > I have been trying to use USARSim with Pyro for multiple robots. The > > code I have in pyro, runs fine for a single robot but spits out an > > error in case of multiple robots. > > A thing to note, is that the version of pyrobot which works with > > USARSim is not exactly recent. I think it is a 2.x version (when > > pyrobot was still called pyro). > > > > The error message is : > > > > > > Pyro Version 2.0.4: Ready... > > Loading C:\Python24\Lib\site-packages > > \pyro\plugins\robots\USARBot/P2AT.py > > Loading INIT 'C:\Python24\Lib\site-packages\pyro\plugins\robots > > \USARBot/P2AT.py'... > > Loaded P2AT! > > Creating Robot > > Loading UT robot interface... > > Device: utbot connected to 127.0.0.1:3000 > > P2AT control drivers loaded > > Loaded C:\Python24\Lib\site-packages\pyro\plugins\robots > > \USARBot/P2AT.py > > > DM-USAR_selfmade_room} {TimeLimit 0}> > > > 8713,46307,0}> > > > 8713,46307,0}> > > Loading C:\Python24\Lib\site-packages\pyro\plugins\brains/Avoid.py > > Loading INIT 'C:\Python24\Lib\site-packages\pyro\plugins > > \brains/Avoid.py'... > > Loaded Avoid! > > need to override LOCALIZE in robot > > Loaded C:\Python24\Lib\site-packages\pyro\plugins\brains/Avoid.py > > Running... > > Exception in thread Thread-1: > > Traceback (most recent call last): > > File "c:\Python24\lib\threading.py", line 442, in __bootstrap > > self.run() > > File "C:\Python24\Lib\site-packages\pyro\brain\__init__.py", line > > 78, in run > > self.step() > > File "C:\Python24\Lib\site-packages\pyro\plugins\brains\Avoid.py", > > line 26, in step > > left = robot.get('range', 'value', 'left-front', 'minval') > > File "C:\Python24\Lib\site-packages\pyro\robot\__init__.py", line > > 126, in get > > for i in self.sensorSet[pos]: > > KeyError: 'left-front' > > > > Loading C:\Python24\Lib\site-packages\pyro\plugins\brains/BBWander.py > > Loading INIT 'C:\Python24\Lib\site-packages\pyro\plugins > > \brains/BBWander.py'... > > Loaded BBWander! > > need to override LOCALIZE in robot > > initialized state state1 > > Loaded C:\Python24\Lib\site-packages\pyro\plugins\brains/BBWander.py > > Running... > > Exception in thread Thread-2: > > Traceback (most recent call last): > > File "c:\Python24\lib\threading.py", line 442, in __bootstrap > > self.run() > > File "C:\Python24\Lib\site-packages\pyro\brain\__init__.py", line > > 78, in run > > self.step() > > File "C:\Python24\Lib\site-packages\pyro\brain\behaviors > > \__init__.py", line 94, in step > > self.controls[c](control[c]) > > File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", > > line 440, in rotate > > self.rotateDev(self.dev, rotate_velocity) > > File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", > > line 443, in rotateDev > > self.update () > > File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", > > line 505, in update > > self.updateDev(self.dev) > > File "C:\Python24\Lib\site-packages\pyro\robot\usarbot\__init__.py", > > line 509, in updateDev > > self.dev.update() > > File "C:\Python24\Lib\site-packages\pyro\robot\driver\utbot.py", > > line 172, in update > > msg = utmessage(packet) > > File "C:\Python24\Lib\site-packages\pyro\robot\driver\utbot.py", > > line 685, in __init__ > > self.segs[i][ps[j]]=ps[j+1].split(',') > > IndexError: list index out of range > > _______________________________________________ > > Pyro-users mailing list > > Pyro-users@emergent.brynmawr.edu > > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users > -- > Douglas S. Blank Computer Science > Assistant Professor Bryn Mawr College > (610)526-6501 http://cs.brynmawr.edu/~dblank > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://emergent.brynmawr.edu/pipermail/pyro-users/attachments/20060419/439bd5ad/attachment-0001.htm From dblank at brynmawr.edu Fri Apr 21 15:17:16 2006 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Fri Apr 21 15:31:03 2006 Subject: [Pyro-users] Re: File transfer with Pyro or Matlab Message-ID: <1145647036.22073.153.camel@mightymouse.brynmawr.edu> > We have a P3-at running on WindowsXP. We are attempting to save > sensor info into a file and then using our wireless connection to > upload it to another computer. Does anyone have any suggestions. Or > if anyone could let us know how to call a Matlab routine or function > from Pyro I could take care of the previous. Any help would be > greatly appreciated. You're wondering how to save data into a file, and then copy it to another machine from either Python or Matlab? That is a bit beyond the scope of this list, but: file = open("output.txt", "w") file.write("%s" % robot.range.distance()) file.close() os.system("scp output.txt othercomputer:other.txt") Of course, there are a million ways to do this, but this is one way. I don't know of what "scp" programs Windows has. -Doug -- Douglas S. Blank Computer Science Assistant Professor Bryn Mawr College (610)526-6501 http://cs.brynmawr.edu/~dblank From dblank at brynmawr.edu Fri Apr 21 15:19:35 2006 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Fri Apr 21 15:40:37 2006 Subject: [Pyro-users] Hemisson sensors In-Reply-To: References: Message-ID: <1145647175.22073.156.camel@mightymouse.brynmawr.edu> On Wed, 2006-04-19 at 15:17 -0400, Bob Roos wrote: > I'm trying to get Pyro working with a Hemisson robot on my laptop. > > I've installed Pyrobot 4.6.1 on my laptop (running Fedora Core 3 > 2.6.9-1.667). I've uploaded version "f" of the HemiOS > (HemiOs-1.50RNf.HEX -- downloaded from the RoadNarrows web site). I've > successfully installed the Bluetooth drivers and I can communicate > with the "Hemisson.py" robot successfully. However, I tried entering > the following command into the "Command:" line and got a stack > overflow: > > robot.range[0].distance() Bob, That should work, so looks like you have found a bug. You can alternative use: robot.range.distance()[0] robot.range[0].value Let us know if either of those work. I'll take a look at that code to see if I can find the bug. Thanks, -Doug > The output from this command reads: > > ERROR: exceptions.RuntimeError maximum recursion depth exceeded > Traceback (most recent call last): > File "/usr/lib/python2.3/site-packages/pyrobot/gui/__init__.py", > line 306, in processCommand > exec exp2 in self.environment > File "", line 1, in ? > File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", > line 324, in __getitem__ > return self.getSensorValue(item) > File "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", > line 63, in getSensorValue > noise=self.noise) > File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", > line 231, in _getNoise > return [s.noise for s in self] > File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", > line 307, in __iter__ > yield self.getSensorValue(pos) > > ... and then it loops for a long time in a cycle of lines khepera/63, > device/231, device/307 > until it finally terminates with: > > ... line 307 ... yield self.getSensorValue(pos) > File "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", > line 58, in getSensorValue > (self._ox(pos) / 1000.0, # meters > File "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", > line 105, in _thr > return self._th(pos) * PIOVER180 > RuntimeError: maximum recursion depth exceeded > exceptions.RuntimeError: in command line > > Other basic commands seem to work fine (e.g., "robot.range.title" > returns "ir[0]", "move", "translate", "rotate"). > > Am I missing something really basic here? I did make the correction to > the "khepera.py" file (commented out the "import" of khepera.CNTRL) as > described in Doug Blank's e-mail of Feb. 8). Am I misusing the range > variable? > > Thanks! > > Bob > > _______________________________________________ > Pyro-users mailing list > Pyro-users@emergent.brynmawr.edu > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users > -- Douglas S. Blank Computer Science Assistant Professor Bryn Mawr College (610)526-6501 http://cs.brynmawr.edu/~dblank From dblank at brynmawr.edu Mon Apr 24 11:51:52 2006 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Mon Apr 24 11:52:05 2006 Subject: [Pyro-users] Hemisson sensors In-Reply-To: References: Message-ID: <1145893912.4597.41.camel@mightymouse.brynmawr.edu> Bob, I've tried to replicate the problem, but it looks like it may have been fixed in a more recent version. Try upgrading your Pyro to version 4.8. The easiest way might be to update from CVS: ------------------ su - cd /usr/lib/python2.3/site-packages/pyrobot cvs -d :pserver:anonymous@compscitest.brynmawr.edu:/cvs login Password: cvs -d :pserver:anonymous@compscitest.brynmawr.edu:/cvs update -d make ------------------ -Doug On Wed, 2006-04-19 at 15:17 -0400, Bob Roos wrote: > I'm trying to get Pyro working with a Hemisson robot on my laptop. > > I've installed Pyrobot 4.6.1 on my laptop (running Fedora Core 3 > 2.6.9-1.667). I've uploaded version "f" of the HemiOS > (HemiOs-1.50RNf.HEX -- downloaded from the RoadNarrows web site). I've > successfully installed the Bluetooth drivers and I can communicate > with the "Hemisson.py" robot successfully. However, I tried entering > the following command into the "Command:" line and got a stack > overflow: > > robot.range[0].distance() > > The output from this command reads: > > ERROR: exceptions.RuntimeError maximum recursion depth exceeded > Traceback (most recent call last): > File "/usr/lib/python2.3/site-packages/pyrobot/gui/__init__.py", > line 306, in processCommand > exec exp2 in self.environment > File "", line 1, in ? > File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", > line 324, in __getitem__ > return self.getSensorValue(item) > File "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", > line 63, in getSensorValue > noise=self.noise) > File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", > line 231, in _getNoise > return [s.noise for s in self] > File "/usr/lib/python2.3/site-packages/pyrobot/robot/device.py", > line 307, in __iter__ > yield self.getSensorValue(pos) > > ... and then it loops for a long time in a cycle of lines khepera/63, > device/231, device/307 > until it finally terminates with: > > ... line 307 ... yield self.getSensorValue(pos) > File "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", > line 58, in getSensorValue > (self._ox(pos) / 1000.0, # meters > File "/usr/lib/python2.3/site-packages/pyrobot/robot/khepera.py", > line 105, in _thr > return self._th(pos) * PIOVER180 > RuntimeError: maximum recursion depth exceeded > exceptions.RuntimeError: in command line > > Other basic commands seem to work fine (e.g., "robot.range.title" > returns "ir[0]", "move", "translate", "rotate"). > > Am I missing something really basic here? I did make the correction to > the "khepera.py" file (commented out the "import" of khepera.CNTRL) as > described in Doug Blank's e-mail of Feb. 8). Am I misusing the range > variable? > > Thanks! > > Bob > > _______________________________________________ > Pyro-users mailing list > Pyro-users@emergent.brynmawr.edu > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users > -- Douglas S. Blank Computer Science Assistant Professor Bryn Mawr College (610)526-6501 http://cs.brynmawr.edu/~dblank From afr981 at yahoo.es Thu Apr 27 07:05:09 2006 From: afr981 at yahoo.es (=?iso-8859-1?q?Alberto=20Fern=E1ndez?=) Date: Thu Apr 27 07:05:14 2006 Subject: [Pyro-users] Develop a filter with Pyro Message-ID: <20060427110509.83953.qmail@web25219.mail.ukl.yahoo.com> Hello, i have been developing a tutorial step by step with instruccions to make a filter. I wrote a document in our project wiki explaining that, and i want to know if there is a better way to aproach to this issue, changing less files, now we change the filter source. The complete instruccions are in: http://abantos.dia.fi.upm.es/robot-wiki/doku.php?id=how_to_create_our_filters Another question is about the module python path in pyro. I set up PYTHONPATH pointing to our working directory but pyro don't find the module. We planning using pyrobot in our classes and it is an important issue. Thanks. --------------------------------- LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y m?viles desde 1 c?ntimo por minuto. http://es.voice.yahoo.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://emergent.brynmawr.edu/pipermail/pyro-users/attachments/20060427/3b7f43a9/attachment.htm From dblank at brynmawr.edu Thu Apr 27 08:59:25 2006 From: dblank at brynmawr.edu (dblank@brynmawr.edu) Date: Thu Apr 27 08:59:29 2006 Subject: [Pyro-users] Develop a filter with Pyro In-Reply-To: <20060427110509.83953.qmail@web25219.mail.ukl.yahoo.com> References: <20060427110509.83953.qmail@web25219.mail.ukl.yahoo.com> Message-ID: <13837.68.34.179.248.1146142765.squirrel@webmail.brynmawr.edu> > Hello, i have been developing a tutorial step by step with instruccions to > make a filter. > > I wrote a document in our project wiki explaining that, and i want to know > if there is a better way to aproach to this issue, changing less files, > now we change the filter source. > > The complete instruccions are in: > > http://abantos.dia.fi.upm.es/robot-wiki/doku.php?id=how_to_create_our_filters > > Another question is about the module python path in pyro. I set up > PYTHONPATH pointing to our working directory but pyro don't find the > module. > > We planning using pyrobot in our classes and it is an important issue. Alberto, Very nice! Would it be ok for us to make a copy of that on our own wiki when you are done? That looks like it is the simpliest explanation possible. I don't see any extra steps. It tooks some work to make it this easy, but it would be nice to make the process even easier for students. For example, I could imagine a GUI window that would allow them to pick what camera, and visionSystem they wanted to use. That way they would have to create those little Python device stubs. If you have any other ideas, we'd love to help streamline that process. I did make one correction on the V4LCamera device; you had the wrong import. Also, students will need to have the environment variable PYROBOT set, if you haven't done that for them. I did a quick test and found that it worked: $ export PYTHONPATH=~dblank/myvision/ $ pyrobot -g tty Using PYROBOT in '/home/dblank/development/pyrobot'... ========================================================= Pyrobot, Python Robotics, (c) 2005, D.S. Blank http://PyroRobotics.org Version 4.8.2 ========================================================= pyrobot> import myvision >>> import myvision Ok So, you shouldn't have any problems. Note that you import "myvision" not "myVision". I just spent a few hours helping debug some student vision code. One quick hint that sped up the process: start pyrobot with everything running: $ pyrobot -r Test -d TutorialCameraFiducials -e "robot.camera[0].addFilter('sobel')" That will start up a test robot, load a (comma-separated) list of devices (no spaces), and eval a list of expressions (semi-colon separated). Combined with printf, that solved the problem. I don't know of better ways of debugging C/C++ code from Python. -Doug > Thanks. > > > > --------------------------------- > > LLama Gratis a cualquier PC del Mundo. > Llamadas a fijos y m?viles desde 1 c?ntimo por minuto. > http://es.voice.yahoo.com_______________________________________________ > Pyro-users mailing list > Pyro-users@emergent.brynmawr.edu > http://emergent.brynmawr.edu/mailman/listinfo/pyro-users > From dblank at brynmawr.edu Thu Apr 27 10:08:34 2006 From: dblank at brynmawr.edu (dblank@brynmawr.edu) Date: Thu Apr 27 10:08:37 2006 Subject: [Pyro-users] Develop a filter with Pyro In-Reply-To: <13837.68.34.179.248.1146142765.squirrel@webmail.brynmawr.edu> References: <20060427110509.83953.qmail@web25219.mail.ukl.yahoo.com> <13837.68.34.179.248.1146142765.squirrel@webmail.brynmawr.edu> Message-ID: <13888.68.34.179.248.1146146914.squirrel@webmail.brynmawr.edu> > pyrobot> import myvision >>>> import myvision > Ok > > So, you shouldn't have any problems. Note that you import "myvision" not > "myVision". Oh, I see that you are trying to import from "pyrobot.vision.alberto", but that would imply that you have write privileges (which the student won't). You probably want to make those: from myvision import myVision and use that instead of VisionDIA. There is no need for: import myvision class VisionDIA(myvision.myVision): def __init__(self): myvision.myVision.__init__(self) so you can remove that layer, and just use myVision directly. So: 1) Change: from pyrobot.vision.alberto import VisionDIA to: from myvision import myVision 2) Remove the VisionDIA section 3) Instead of using VisionDIA use myVision instead. That should do it. -Doug From afr981 at yahoo.es Thu Apr 27 17:42:19 2006 From: afr981 at yahoo.es (Alberto Fernandez Recio) Date: Thu Apr 27 17:42:38 2006 Subject: [Pyro-users] Develop a filter with Pyro In-Reply-To: <13888.68.34.179.248.1146146914.squirrel@webmail.brynmawr.edu> References: <20060427110509.83953.qmail@web25219.mail.ukl.yahoo.com> <13837.68.34.179.248.1146142765.squirrel@webmail.brynmawr.edu> <13888.68.34.179.248.1146146914.squirrel@webmail.brynmawr.edu> Message-ID: <1146174139.24855.22.camel@localhost.localdomain> El jue, 27-04-2006 a las 10:08 -0400, dblank@brynmawr.edu escribi?: > > pyrobot> import myvision > >>>> import myvision > > Ok > > > > So, you shouldn't have any problems. Note that you import "myvision" not > > "myVision". > > Oh, I see that you are trying to import from "pyrobot.vision.alberto", but > that would imply that you have write privileges (which the student won't). > You probably want to make those: > > from myvision import myVision > > and use that instead of VisionDIA. There is no need for: > > import myvision > class VisionDIA(myvision.myVision): > def __init__(self): > myvision.myVision.__init__(self) > > so you can remove that layer, and just use myVision directly. So: > > 1) Change: > > from pyrobot.vision.alberto import VisionDIA > > to: > > from myvision import myVisio > n > > 2) Remove the VisionDIA section > > 3) Instead of using VisionDIA use myVision instead. > > That should do it. > > -Doug > > Hello again, I tested your instruccions and they worked pretty well, it was a problem the needs of privileges. We have updated wiki also. We update the wiki frequently but you feel free to make a copy of that on your wiki. Thanks. ----------------------------------------------------------------- Las puertas de la sabidur?a nunca est?n cerradas. -- Benjamin Franklin. (1706-1790) Estadista y cient?fico estadounidense. Alberto Fern?ndez Recio ----------------------------------------------------------------- ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y m?viles desde 1 c?ntimo por minuto. http://es.voice.yahoo.com From nswoboda at clip.dia.fi.upm.es Fri Apr 28 07:05:34 2006 From: nswoboda at clip.dia.fi.upm.es (nswoboda@clip.dia.fi.upm.es) Date: Fri Apr 28 07:36:49 2006 Subject: [Pyro-users] Develop a filter with Pyro In-Reply-To: <13837.68.34.179.248.1146142765.squirrel@webmail.brynmawr.edu> from "dblank@brynmawr.edu" at Apr 27, 2006 08:59:25 AM Message-ID: <200604281105.k3SB5YXg011830@clip.dia.fi.upm.es> > If you have any other ideas, we'd love to help streamline > that process. Hello. We've been thinking about this and have some questions/observations: Is there a way to move the loading of the vision system to the brain from the device? That would remove one file which requires customization. Also, as the vision system is designed to be independent of the actual camera device this seems to make some sense. We have been thinking about how another layer could be added between the new filter code and the vision system to simplify the new filter code. Doing this would, for example, allow moving some of the required methods out of the customized vision system. The problem seems to be with applyFilter, especially if it is desirable to have multiple filters in separate files which could be loaded separately. One idea would be to have each new filter 'register' a filter name with a reference to something like the appropriate applyFilter function which this layer would use to dispatch filter requests. Have you thought about this? Thanks, Nik ____________________________________________________ Everybody is somebody else's weirdo. -- Dykstra From dblank at brynmawr.edu Fri Apr 28 08:12:29 2006 From: dblank at brynmawr.edu (dblank@brynmawr.edu) Date: Fri Apr 28 08:12:31 2006 Subject: [Pyro-users] Develop a filter with Pyro In-Reply-To: <200604281105.k3SB5YXg011830@clip.dia.fi.upm.es> References: <13837.68.34.179.248.1146142765.squirrel@webmail.brynmawr.edu> from "dblank@brynmawr.edu" at Apr 27, 2006 08:59:25 AM <200604281105.k3SB5YXg011830@clip.dia.fi.upm.es> Message-ID: <36559.68.34.179.248.1146226349.squirrel@webmail.brynmawr.edu> >> If you have any other ideas, we'd love to help streamline >> that process. > > Hello. > > We've been thinking about this and have some questions/observations: > > Is there a way to move the loading of the vision system to the brain > from the device? That would remove one file which requires > customization. Also, as the vision system is designed to be independent > of the actual camera device this seems to make some sense. Nik, That is a good idea. Currently, the so-called "vision system" is created at the same time as the raw camera object is created. Separating these would allow more flexible possibilities. For example, maybe "vision" could be a separate device that requires a "camera" device. (This is similar to some new camera devices that require other camera devices. See pyrobot/camera/stereo and pyrobot/camera/fourway for example). One possible problem with this approach is that vision systems can use the actual camera image as output. That is, there is currently not a copy of the raw image that vision works on, but on a single, shared copy. If you wanted to have two vision devices on a single camera, then it may be better to just make a copy of the camera image and pass that to the vision device. That sounds like a good idea. (I'm planning on breaking up the current-single thread processing model this summer, and this could fit into that rework). > We have been thinking about how another layer could be added between the > new filter code and the vision system to simplify the new filter code. > Doing this would, for example, allow moving some of the required methods > out of the customized vision system. The problem seems to be with > applyFilter, especially if it is desirable to have multiple filters in > separate files which could be loaded separately. One idea would be to > have each new filter 'register' a filter name with a reference to > something like the appropriate applyFilter function which this layer > would use to dispatch filter requests. Have you thought about this? That sounds intriguing. A vision system could take a search path of directories, and dynamically load onto the menu any filter that it finds in that path. Adding a new filter would be as simple as dropping a .so (or .dll) into a directory. You could even do that while the system was running, maybe. Currently, Pyro allows filters to also be written in Python. This isn't practical to do pixel-by-pixel processing, but is handy to do a prototype, or example. One can also handle flow-control of filters, like: def pythonFilter(camera): result = camera.applyFilter("filter1") if result > 100: result = camera.applyFilter("filter2") return result Both of your ideas are good. Patches accepted :) The only other issue I had been thinking about is the way that results are returned from a filter. Currently, results are stored in a list on the camera (robot.camera[0].filterResults). This is not very useful, especially when one adds or subtracts filters. Maybe a better way is to make filterResults a dictionary, and reference them by name. Filters should have unique names, so that shouldn't be a problem. -Doug > Thanks, > > Nik > ____________________________________________________ > > Everybody is somebody else's weirdo. > -- Dykstra >