From: <ale...@mo...> - 2006-03-30 15:12:55
|
Here's some extra information. I've now managed to get readings from the laser, but there's still something funny going on. This is a transcript of the server when using the 'rate 38400' option and highest level of verbosity (I've had to remove the client side timeout): Listening on ports: 6665 accepted client 0 on port 6665, fd 5 Laser initialising (/dev/ttyS2) Wait for laser ended connecting at 38400 sending configuration mode request to laser waiting for acknowledge warning : timeout sending configuration mode request to laser waiting for acknowledge warning : timeout sending configuration mode request to laser waiting for acknowledge warning : timeout sending configuration mode request to laser waiting for acknowledge warning : timeout sending configuration mode request to laser waiting for acknowledge warning : timeout sending configuration mode request to laser waiting for acknowledge warning : timeout connecting at 9600 sending configuration mode request to laser waiting for acknowledge laser operating at 9600; changing to 38400 SICK laser type [LMS200;301063;V02.18 ] at [/dev/ttyS2:38400] laser ready receiving data At this point I start getting proper data in the client. My understanding from these logs is that connection is attempted several times at 38400 bauds. When this fails, an attempt is made at 9600, it goes ok and the rate is raised as requested in the config file. However, if I run the server with the 'rate 9600' option, this is what happens: Listening on ports: 6665 accepted client 0 on port 6665, fd 5 Laser initialising (/dev/ttyS2) Wait for laser ended connecting at 9600 sending configuration mode request to laser waiting for acknowledge error : timeout on read (4) warning : timeout error : timeout on read (4) warning : timeout error : timeout on read (4) warning : timeout and it doesn't work at all. ?? I don't know if I'm alone on this (I guess so or someone else would have noticed already), but if my understanding is correct, it seems the rate parameter may require to be split in two: the rate for the initial connection and the desired rate of operation. Otherwise, the startup time is really bad: the laser heat-up 35 seconds, the six timeouts (around 5s each) and finally the proper initialization. Álex R. Mosteo wrote: > Hello, > > I'm trying to connect to a sick lms 200 laser. My attemps have been as > follows (using 2.0.1 release): > > First, since the laser is for a p3dx and the laser powerup starts when > the serial is open, I've changed the CLIENT_TIMEOUT in > libplayerc/client.c to 60.0, since I have to use the 'delay 35' option > in the laser configuration. Otherwise the client times out before the > server has had any chance to give data and queues fill up in the server > side. > > After doing that, the only message I get in the server console is > > warning : timeout > > four times. However the laser works fine with the Aria libraries and > another demo program I've found in the net. So it looks like there's > some problem in the player driver. |