|
INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
urg_nz::urg_laser Class ReferenceURG laser scanner class. More...
Detailed DescriptionURG laser scanner class.Provides an interface for interacting with a Hokuyo URG laser scanner. To use a serial connection, ensure that you do not also have a USB cable connected, as this will force the scanner into USB mode, preventing the serial connection from functioning correctly. All functions may throw instances of urg_nz_exception. Member Function Documentation
Open a laser scanner on the specified port. Supported baud rates for RS232 connections are 19200, 57600 and 115200. Baud rate is not applicable to USB connections.
References ChangeBaud(), Close(), GetSCIPVersion(), PortOpen(), urg_nz::URG_ERR_CONNECT_FAILED, and urg_nz::URG_ERR_OPEN_FAILED.
Check if the port to the laser scanner is open.
Referenced by GetIDInfo(), GetReadings(), Open(), and ~urg_laser().
Change the baud rate of the connection. Supported baud rates are 19200, 57600 and 115200. Not applicable to USB connections. Note: Not tested with SCIP protocol version 2.
References urg_nz::URG_ERR_BADBAUDRATE, and urg_nz::URG_ERR_CHANGEBAUD. Referenced by Open().
Set the time out for reads performed when talking to the laser. A large number of polls are performed while talking to the laser scanner to look for data, for example when getting scan data from it. This sets the timeout, in milliseconds, to use for these polls. Set it to a negative value for no timeout. The default value is -1.
Retrieve a set of range readings from the scanner. Ranges are returned in millimetres. The scan is a series of discrete values. They can be indexed, starting at 0 and going up to MAX_READINGS. A subset of these values only can be returned using min_i and max_i. These are inclusive, e.g. asking for readings from 5 to 10 will return 6 readings. Typically, you will want to at least exclude the readings the scanner can't actually see, as given by GetSensorConfig.
References urg_nz::MAX_READINGS, PortOpen(), urg_nz::urg_nz_laser_readings::Readings, urg_nz::URG_ERR_LASERERROR, urg_nz::URG_ERR_NODESTINATION, urg_nz::URG_ERR_NOPORT, and urg_nz::URG_ERR_PROTOCOL.
Get the laser scanner identification information.
References PortOpen(), urg_nz::URG_ERR_LASERERROR, urg_nz::URG_ERR_NOPORT, and urg_nz::URG_ERR_PROTOCOL.
Get the laser scanner configuration (resolution, scan angles, etc.).
References urg_nz::urg_nz_laser_config::max_angle, urg_nz::urg_nz_laser_config::max_range, urg_nz::MAX_READINGS, urg_nz::urg_nz_laser_config::min_angle, urg_nz::urg_nz_laser_config::resolution, urg_nz::URG_ERR_BADFIRMWARE, urg_nz::URG_ERR_PROTOCOL, and urg_nz::URG_ERR_READ.
Get the protocol version used by the connected laser scanner. Old firmware revisions support protocol SCIP1.0, and a max range of 4 meters. Since firmware revision 3.0.00, it's called SCIP2.0, and the max range is 5.6 meters.
References urg_nz::URG_ERR_PROTOCOL, and urg_nz::URG_ERR_SCIPVERSION. Referenced by Open().
Turns on and off printing of information to the console. Default is off.
The documentation for this class was generated from the following files:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.4.5