Sorry for the delay, just got a look at your changes. I have added a 'pls_mode' flag to the lms200 driver in player trunk. If you set this to one in your config file then the correct parity settings etc will be used. I did not change all the timeouts yet.
Can you have a look at svn trunk and see if that gets basic communications. There is also a sick driver in the gearbox library that is supported by player, Geoff might be able to say what state this is in and whether it is better to try fix this instead.
I'm trying to use the sicklms200 driver with a Sick PLS 101-312 laser scanner in Player 2.1.2 under CentOS 5, compiling from source. The scanner is running on an iRobot B21r. Out of the box this driver fails to connect to the scanner. With Player 1.6.5 I can connect to it using the sickpls driver with no problems and run at a transfer rate of 38400. Since 1.6.5 sickpls has been replaced with sicklms200, but it seems pretty much untested on pls hardware.
To start with I needed to configure player 2.1.2 with --disable-highspeedsick as my serial card only goes up to 38400. Without this option I got some arcane error messages (which I didn't record, sorry) and no joy. With this option I was able to attempt to connect, but all communications with the scanner timed out with messages like "timeout on select (1)". So, I went in to sicklms200.cc and increased all the timeouts to large numbers, but this just resulted in long pauses before timing out, i.e. there is some underlying connection problem.
To try to get to the bottom of this I compared the 1.6.5 sickpls driver with the 2.1.2 sicklms200 driver. There are a few differences in the connection methods, e.g. the sicklms200 driver doesn't appear to set parity bits for the serial connection (which the working pls driver does) and it uses different arguments to flush commands (which I won't claim to understand). With a little bit of (in)judicious copying and pasting I managed to get the sicklms200 driver to connect to the pls scanner, but only at 9600 for connection and transfer. I've attached the resulting file in case it's of use to anyone. But, this is really not a good solution as I don't really understand why things aren't working with either this version or the vanilla lms200 version, but are working with the 1.6.5 pls version. Currently none of the configuration options work with the PLS scanner (set resolution etc.) or even just changing mode (SetLaserMode()) or transfer rate (if you set transfer_rate to 38400 in the config file the laser just starts timing out in the main loop).
I'd really like to get this driver up and running properly with the PLS, or reinstate the working sickpls driver. Is there someone who can help me do this? I'm willing to run whatever tests are necessary on the scanner, and also code where necessary (although I don't really want to learn about the nuts and bolts of serial comms!).
Dr. Nick Hawes
Lecturer in Intelligent Robotics
School of Computer Science, University of Birmingham
www.cs.bham.ac.uk/~nah || +44 121 414 3739 || skype: nickhawes