#include <mrpt/hwdrivers/CSickLaserUSB.h>
Public Member Functions | |
CSickLaserUSB () | |
Constructor. | |
virtual | ~CSickLaserUSB () |
Destructor. | |
void | setDeviceSerialNumber (const std::string &deviceSerialNumber) |
Changes the serial number of the device to open (call prior to 'doProcess'). | |
void | doProcessSimple (bool &outThereIsObservation, mrpt::slam::CObservation2DRangeScan &outObservation, bool &hardwareError) |
Specific laser scanner "software drivers" must process here new data from the I/O stream, and, if a whole scan has arrived, return it. | |
void | loadConfig (const mrpt::utils::CConfigFileBase &configSource, const std::string &iniSection) |
Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes) See hwdrivers::CSickLaserUSB for the possible parameters. | |
bool | turnOn () |
Enables the scanning mode (in this class this has no effect). | |
bool | turnOff () |
Disables the scanning mode (in this class this has no effect). | |
Private Member Functions | |
bool | checkControllerIsConnected () |
bool | waitContinuousSampleFrame (vector_float &ranges, unsigned char &LMS_status, uint32_t &out_board_timestamp, bool &is_mm_mode) |
uint16_t | computeCRC (unsigned char *data, unsigned long len) |
Private Attributes | |
CInterfaceFTDI * | m_usbConnection |
std::string | m_serialNumber |
std::string | m_sensorLabel |
uint32_t | m_timeStartUI |
Time of the first data packet, for synchronization purposes. | |
mrpt::system::TTimeStamp | m_timeStartTT |
poses::CPose3D | m_sensorPose |
The sensor 6D pose:. | |
Static Private Attributes | |
static int | CRC16_GEN_POL |
This class does not need to be bind, i.e. you do not need to call C2DRangeFinderAbstract::bindIO. However, calling it will have not effect. In this class the "bind" is ignored since it is designed for USB connections only, thus it internally generate the required object for simplicity of use. The serial number of the USB device is used to open it on the first call to "doProcess", thus you must call "loadConfig" before this, or manually call "setDeviceSerialNumber". The default serial number is "LASER001"
Warning: Avoid defining an object of this class in a global scope if you want to catch all potential exceptions during the constructors (like USB interface DLL not found, etc...)
PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS:
-------------------------------------------------------
[supplied_section_name]
SICKUSB_serialNumber=LASER001
pose_x=0.21 ; Laser range scaner 3D position in the robot (meters)
pose_y=0
pose_z=0.34
pose_yaw=0 ; Angles in degrees
pose_pitch=0
pose_roll=0
Definition at line 62 of file CSickLaserUSB.h.
mrpt::hwdrivers::CSickLaserUSB::CSickLaserUSB | ( | ) |
Constructor.
virtual mrpt::hwdrivers::CSickLaserUSB::~CSickLaserUSB | ( | ) | [virtual] |
Destructor.
bool mrpt::hwdrivers::CSickLaserUSB::checkControllerIsConnected | ( | ) | [private] |
uint16_t mrpt::hwdrivers::CSickLaserUSB::computeCRC | ( | unsigned char * | data, | |
unsigned long | len | |||
) | [private] |
void mrpt::hwdrivers::CSickLaserUSB::doProcessSimple | ( | bool & | outThereIsObservation, | |
mrpt::slam::CObservation2DRangeScan & | outObservation, | |||
bool & | hardwareError | |||
) | [virtual] |
Specific laser scanner "software drivers" must process here new data from the I/O stream, and, if a whole scan has arrived, return it.
This method will be typically called in a different thread than other methods, and will be called in a timely fashion.
Implements mrpt::hwdrivers::C2DRangeFinderAbstract.
void mrpt::hwdrivers::CSickLaserUSB::loadConfig | ( | const mrpt::utils::CConfigFileBase & | configSource, | |
const std::string & | iniSection | |||
) | [virtual] |
Loads specific configuration for the device from a given source of configuration parameters, for example, an ".ini" file, loading from the section "[iniSection]" (see utils::CConfigFileBase and derived classes) See hwdrivers::CSickLaserUSB for the possible parameters.
Implements mrpt::hwdrivers::CGenericSensor.
void mrpt::hwdrivers::CSickLaserUSB::setDeviceSerialNumber | ( | const std::string & | deviceSerialNumber | ) | [inline] |
Changes the serial number of the device to open (call prior to 'doProcess').
Definition at line 96 of file CSickLaserUSB.h.
bool mrpt::hwdrivers::CSickLaserUSB::turnOff | ( | ) | [virtual] |
Disables the scanning mode (in this class this has no effect).
Implements mrpt::hwdrivers::C2DRangeFinderAbstract.
bool mrpt::hwdrivers::CSickLaserUSB::turnOn | ( | ) | [virtual] |
Enables the scanning mode (in this class this has no effect).
Implements mrpt::hwdrivers::C2DRangeFinderAbstract.
bool mrpt::hwdrivers::CSickLaserUSB::waitContinuousSampleFrame | ( | vector_float & | ranges, | |
unsigned char & | LMS_status, | |||
uint32_t & | out_board_timestamp, | |||
bool & | is_mm_mode | |||
) | [private] |
int mrpt::hwdrivers::CSickLaserUSB::CRC16_GEN_POL [static, private] |
Definition at line 78 of file CSickLaserUSB.h.
std::string mrpt::hwdrivers::CSickLaserUSB::m_sensorLabel [private] |
Definition at line 69 of file CSickLaserUSB.h.
std::string mrpt::hwdrivers::CSickLaserUSB::m_serialNumber [private] |
Definition at line 68 of file CSickLaserUSB.h.
Definition at line 72 of file CSickLaserUSB.h.
uint32_t mrpt::hwdrivers::CSickLaserUSB::m_timeStartUI [private] |
Time of the first data packet, for synchronization purposes.
Definition at line 71 of file CSickLaserUSB.h.
Definition at line 67 of file CSickLaserUSB.h.
Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN:exported at Mon Jan 12 13:00:16 UTC 2009 |