INTRODUCTION Overview Download and Install Documentation Publications REPOSITORY Libraries DEVELOPER Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
hokuyo_aist::HokuyoLaser Class Reference Hokuyo laser scanner class. More...
Detailed DescriptionHokuyo laser scanner class. Provides an interface for interacting with a Hokuyo laser scanner using SCIP protocol version 1 or 2. The FlexiPort library is used to implement the data communications with the scanner. See its documentation for details on controlling the connection. 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 HokuyoError or its children. Exceptions from FlexiPort may also occur. Member Function Documentation
Get a new scan from the scanner. Unlike GetRanges, which returns the most recent scan the scanner took, this function will request a new scan. This means it will wait while the scanner performs the scan, which means the rate at which scans can be retrieved using this function is less than with GetRanges. Otherwise behaves identicallty to GetRanges. Not available with the SCIP v1 protocol.
References hokuyo_aist::HOKUYO_ERR_NODATA, hokuyo_aist::HOKUYO_ERR_NODESTINATION, hokuyo_aist::HOKUYO_ERR_PROTOCOL, hokuyo_aist::HOKUYO_ERR_SCIPVERSION, and hokuyo_aist::HOKUYO_ERR_UNSUPPORTED. Referenced by GetNewRangesByAngle().
Get a new scan from the scanner with intensity data. Unlike GetRanges, which returns the most recent scan the scanner took, this function will request a new scan. This means it will wait while the scanner performs the scan. Otherwise behaves identicallty to GetRanges. Not available with the SCIP v1 protocol.
References hokuyo_aist::HOKUYO_ERR_NODATA, hokuyo_aist::HOKUYO_ERR_NODESTINATION, hokuyo_aist::HOKUYO_ERR_PROTOCOL, hokuyo_aist::HOKUYO_ERR_SCIPVERSION, and hokuyo_aist::HOKUYO_ERR_UNSUPPORTED. Referenced by GetNewRangesAndIntensitiesByAngle().
Get a new scan from the scanner with intensity data. Not available with the SCIP v1 protocol.
References AngleToStep(), GetNewRangesAndIntensities(), hokuyo_aist::HOKUYO_ERR_BADARG, hokuyo_aist::HOKUYO_ERR_NODESTINATION, and hokuyo_aist::HOKUYO_ERR_UNSUPPORTED.
Get a new scan from the scanner. Not available with the SCIP v1 protocol.
References AngleToStep(), GetNewRanges(), hokuyo_aist::HOKUYO_ERR_BADARG, hokuyo_aist::HOKUYO_ERR_NODESTINATION, and hokuyo_aist::HOKUYO_ERR_UNSUPPORTED.
Get the latest scan data from the scanner. This function requires a pointer to a HokuyoData object. It will allocate space in this object as necessary for storing range data. If the passed-in HokuyoData object already has the correct quantity of space to store the range data, it will not be re-allocated. If it does not have any space, it will be allocated. If it has space, but it is the wrong size, it will be re-allocated. This means you can repeatedly send the same HokuyoData object without having to worry about allocating its data, whether it will change or not, while also avoiding excessive allocations.
References hokuyo_aist::HOKUYO_ERR_NODATA, hokuyo_aist::HOKUYO_ERR_NODESTINATION, and hokuyo_aist::HOKUYO_ERR_SCIPVERSION. Referenced by GetRangesByAngle().
Get the latest scan data from the scanner.
References AngleToStep(), GetRanges(), hokuyo_aist::HOKUYO_ERR_BADARG, and hokuyo_aist::HOKUYO_ERR_NODESTINATION.
Get various information about the scanner. Much of the information is not available with the SCIP v1 protocol. References hokuyo_aist::HokuyoSensorInfo::AsString(), hokuyo_aist::HokuyoSensorInfo::firmware, hokuyo_aist::HokuyoSensorInfo::firstStep, hokuyo_aist::HokuyoSensorInfo::frontStep, hokuyo_aist::HOKUYO_ERR_NODESTINATION, hokuyo_aist::HOKUYO_ERR_SCIPVERSION, hokuyo_aist::HokuyoSensorInfo::lastStep, hokuyo_aist::HokuyoSensorInfo::maxAngle, hokuyo_aist::HokuyoSensorInfo::maxRange, hokuyo_aist::HokuyoSensorInfo::minAngle, hokuyo_aist::HokuyoSensorInfo::minRange, hokuyo_aist::HokuyoSensorInfo::product, hokuyo_aist::HokuyoSensorInfo::protocol, hokuyo_aist::HokuyoSensorInfo::resolution, hokuyo_aist::HokuyoSensorInfo::scanableSteps, hokuyo_aist::HokuyoSensorInfo::sensorDiagnostic, hokuyo_aist::HokuyoSensorInfo::serial, hokuyo_aist::HokuyoSensorInfo::speed, and hokuyo_aist::HokuyoSensorInfo::vendor.
Get the current value of the scanner's clock in milliseconds. Not available with the SCIP v1 protocol. References hokuyo_aist::HOKUYO_ERR_SCIPVERSION, and hokuyo_aist::HOKUYO_ERR_UNSUPPORTED.
Open the laser scanner and begin scanning, probing the baud rate as necessary. If the port is a serial connection and communication with the laser fails at the given baud rate, the alternative baud rates supported by the device are tried (see SetBaud for these) in order from fastest to slowest.
References flexiport::CreatePort(), flexiport::Port::Flush(), flexiport::Port::GetPortType(), flexiport::Port::GetStatus(), and flexiport::Port::Open().
Reset the laser scanner to its default settings. Not available with the SCIP v1 protocol. References hokuyo_aist::HOKUYO_ERR_SCIPVERSION, and hokuyo_aist::HOKUYO_ERR_UNSUPPORTED.
Change the baud rate when using a serial connection. Valid rates are 19.2Kbps, 38.4Kbps, 57.6Kbps, 115.2Kbps, 250.0Kbps, 500.0Kbps, 750.0Kbps (dependent on those available in FlexiPort). References flexiport::Port::GetPortType(), hokuyo_aist::HOKUYO_ERR_BADARG, hokuyo_aist::HOKUYO_ERR_NOTSERIAL, and hokuyo_aist::HOKUYO_ERR_SCIPVERSION.
Set the speed at which the scanner's sensor spins. Set the speed to 0 to have it reset to the default value, and 99 to reset it to the initial (startup) value. Values between 1 and 10 specify a ratio of the default speed. The speeds in revolutions per minute that these correspond to will depend on the scanner model. For example, for a URG-04LX, they are (from 1 to 10) 594, 588, 576, 570, 564, 558, 552, 546, and 540 rpm. Not available with the SCIP v1 protocol. References hokuyo_aist::HOKUYO_ERR_BADARG, hokuyo_aist::HOKUYO_ERR_SCIPVERSION, and hokuyo_aist::HOKUYO_ERR_UNSUPPORTED. The documentation for this class was generated from the following files:
|