From: Alberto A. <ame...@IC...> - 2005-12-17 00:58:49
|
Hi Radu, Thanks a lot, now it works. If you have a minute to briefly explain the threading trick, that'd be great. Or maybe you can point me to some doc. A couple of notes: * I had to do the request for the blobfinder interface in mode 'r', mode 'a' causes a segmentation fault, so "BlobFinderInterface bfi = robot.requestInterfaceBlobfinder(0, 'r');" * I have tried to track a particular color, but it didn't work. For example for orange: "bfi.setTrackingColor(255,255,128,128,0,0)" but the blobs are still the same as without that line. I mean that's no big problem, then I just have to go through the blobs and look for the orange one. Probably that line is not enough, because on the client I get a "Need to handle a EAR message", and on the server "PlayerQueue::Push(): trying to push from non-allocated queue". Best, Alberto Radu Bogdan Rusu wrote: > Hello Alberto, > > Sorry for replying so late (hmm, looks like I'm the only one actually > doing that on this mailing list :)). I just uploaded a basic Blobfinder > example to the Javaclient examples web page. Maybe that will help. > > Please modify your source code according to the following guidelines, > and try again: > - before the while (true), add a line like "robot.runThreaded (-1, -1);" > - remove the "bfi.readData();" from the main while loop; > - add a delay such as "try { Thread.sleep (100); } catch (Exception e) { > }" in the main while loop. > > I don't know about Gazebo, but I will have a look. > > Best regards, > Radu. > |