From: Geoffrey B. <geo...@ai...> - 2009-04-01 01:11:06
|
The first thing you should do is add "debug=3" to the list of port options sent to laser->Open(). This will print considerably more output to the terminal, which you can then paste here so we can see what is happening on the port just before it generates the exception. From there we can see what to look for next, or what to fix. Geoff > Hello, > > I'm using gearbox so as to drive an Hokuyo laser URG-04LX on a linux > system (Ubuntu). I succeed in connecting with an USB connection, but now > I have to use the serial connection and it doesn't work anymore.. > > It is what I do in the code : > hokuyo_aist::HokuyoLaser *laser = new hokuyo_aist::HokuyoLaser(); > laser->SetVerbose (true); > laser->Open("type=serial,timeout=1,device=/dev/ttyS0"); > > At the last step, it raises the following exception > "flexiport::PortException" : "SCIP versions 1 and 2 failed". > > The verbose mode shows the following informations in terminal : > > HokuyoLaser::Open() Creating and opening port using options: > type=serial,timeout=1,device=/dev/ttyS0 > HokuyoLaser::Open() Connected using serial connection. > Base status: > Debug level: 0 Timeout: 1.000000 > Will block: 1 Permissions: rw > Serial-specific status: > Device: /dev/ttyS0 > Baud rate: 9600 Data bits: 8 > Stop bits: 1 Parity: None > Hardware flow control: 0 > Port is open > HokuyoLaser::GetAndSetSCIPVersion() Testing SCIP protocol version. > HokuyoLaser::SendCommand() Writing in SCIP1 mode. Command is V, > parameters length is 0 > HokuyoLaser::ReadLine() Reading exactly 2 bytes. > HokuyoLaser::GetAndSetSCIPVersion() Initial SCIP version 1 test failed. > HokuyoLaser::SendCommand() Writing in SCIP2 mode. Command is VV, > parameters length is 0 > HokuyoLaser::ReadLine() Reading exactly 3 bytes. |