This "software driver" implements the communication protocol for interfacing a Ibeo Lux laser scanners through an ethernet controller.
This class does not need to be bind, i.e. you do not need to call C2DRangeFinderAbstract::bindIO. Connection is established when user call the turnOn() method. You can pass to the class's constructor the Lux's ip address and port. Device will NOT be configured. Configuration has to be done seperately.
To get a laser scan you must proceed like that :
CIbeoLuxETH laser(string("192.168.0.10"), 1234); laser.turnOn(); bool isOutObs, hardwareError; CObservation2DRangeScan outObs; laser.doProcessSimple(isOutObs, outObs, hardwareError);
#include <mrpt/hwdrivers/CIbeoLuxETH.h>

Public Member Functions | |
| CIbeoLuxETH (string _ip=string("10.152.36.93"), unsigned int _port=12002) | |
| Constructor. | |
| virtual | ~CIbeoLuxETH () |
| Destructor. | |
| void | doProcess () |
| This function acquire a laser scan from the device. | |
| void | initialize () |
| This method can or cannot be implemented in the derived class, depending on the need for it. | |
| void | start () |
| void | makeCommandHeader (unsigned char *buffer) |
| void | makeStartCommand (unsigned char *buffer) |
| void | makeStopCommand (unsigned char *buffer) |
| void | makeTypeCommand (unsigned char *buffer) |
Protected Member Functions | |
| void | loadConfig_sensorSpecific (const mrpt::utils::CConfigFileBase &configSource, const std::string &iniSection) |
| Load sensor pose on the robot, or keep the default sensor pose. | |
Private Member Functions | |
| void | dataCollection () |
| float | convertLayerToRad (int scanlayer) |
| float | convertTicksToHRad (int hticks, int hticksPerRotation) |
| CPoint3D | convertToCartesian (float vrad, float hrad, float distance) |
Private Attributes | |
| string | m_ip |
| unsigned int | m_port |
| CClientTCPSocket | m_client |
| unsigned int | m_scanFrequency |
| double | m_angleResolution |
| double | m_startAngle |
| double | m_stopAngle |
| CPose3D | m_sensorPose |
| double | m_maxRange |
| double | m_beamApperture |
| bool | m_run |
| mrpt::system::TThreadHandle | dataCollectionThread |
| float | vwinkel |
| vector< CObservation3DRangeScan > | m_observations |
| bool | m_newObs |
| float | m_vAngle |
| unsigned int | lastScanNumber |
| unsigned int | curScanNumber |
| mrpt::hwdrivers::CIbeoLuxETH::CIbeoLuxETH | ( | string | _ip = string("10.152.36.93"), |
| unsigned int | _port = 12002 |
||
| ) |
Constructor.
Note that there is default arguments, here you can customize IP Adress and TCP Port of your device.
| virtual mrpt::hwdrivers::CIbeoLuxETH::~CIbeoLuxETH | ( | ) | [virtual] |
Destructor.
Close communcation with the device, and free memory.
| float mrpt::hwdrivers::CIbeoLuxETH::convertLayerToRad | ( | int | scanlayer | ) | [private] |
| float mrpt::hwdrivers::CIbeoLuxETH::convertTicksToHRad | ( | int | hticks, |
| int | hticksPerRotation | ||
| ) | [private] |
| CPoint3D mrpt::hwdrivers::CIbeoLuxETH::convertToCartesian | ( | float | vrad, |
| float | hrad, | ||
| float | distance | ||
| ) | [private] |
| void mrpt::hwdrivers::CIbeoLuxETH::dataCollection | ( | ) | [private] |
| void mrpt::hwdrivers::CIbeoLuxETH::doProcess | ( | ) | [virtual] |
This function acquire a laser scan from the device.
If an error occured, hardwareError will be set to true. The new laser scan will be stored in the outObservation argument.
| This | method throw exception if the frame received from the LMS 100 contain the following bad parameters : * Status is not OK * Data in the scan aren't DIST1 (may be RSSIx or DIST2). |
Implements mrpt::hwdrivers::CGenericSensor.
| void mrpt::hwdrivers::CIbeoLuxETH::initialize | ( | ) | [virtual] |
This method can or cannot be implemented in the derived class, depending on the need for it.
| This | method must throw an exception with a descriptive message if some critical error is found. |
Reimplemented from mrpt::hwdrivers::CGenericSensor.
| void mrpt::hwdrivers::CIbeoLuxETH::loadConfig_sensorSpecific | ( | const mrpt::utils::CConfigFileBase & | configSource, |
| const std::string & | iniSection | ||
| ) | [protected, virtual] |
Load sensor pose on the robot, or keep the default sensor pose.
Implements mrpt::hwdrivers::CGenericSensor.
| void mrpt::hwdrivers::CIbeoLuxETH::makeCommandHeader | ( | unsigned char * | buffer | ) |
| void mrpt::hwdrivers::CIbeoLuxETH::makeStartCommand | ( | unsigned char * | buffer | ) |
| void mrpt::hwdrivers::CIbeoLuxETH::makeStopCommand | ( | unsigned char * | buffer | ) |
| void mrpt::hwdrivers::CIbeoLuxETH::makeTypeCommand | ( | unsigned char * | buffer | ) |
| void mrpt::hwdrivers::CIbeoLuxETH::start | ( | ) |
unsigned int mrpt::hwdrivers::CIbeoLuxETH::curScanNumber [private] |
Definition at line 114 of file CIbeoLuxETH.h.
Definition at line 105 of file CIbeoLuxETH.h.
unsigned int mrpt::hwdrivers::CIbeoLuxETH::lastScanNumber [private] |
Definition at line 113 of file CIbeoLuxETH.h.
double mrpt::hwdrivers::CIbeoLuxETH::m_angleResolution [private] |
Definition at line 97 of file CIbeoLuxETH.h.
double mrpt::hwdrivers::CIbeoLuxETH::m_beamApperture [private] |
Definition at line 102 of file CIbeoLuxETH.h.
Definition at line 95 of file CIbeoLuxETH.h.
string mrpt::hwdrivers::CIbeoLuxETH::m_ip [private] |
Definition at line 93 of file CIbeoLuxETH.h.
double mrpt::hwdrivers::CIbeoLuxETH::m_maxRange [private] |
Definition at line 101 of file CIbeoLuxETH.h.
bool mrpt::hwdrivers::CIbeoLuxETH::m_newObs [private] |
Definition at line 111 of file CIbeoLuxETH.h.
Definition at line 110 of file CIbeoLuxETH.h.
unsigned int mrpt::hwdrivers::CIbeoLuxETH::m_port [private] |
Definition at line 94 of file CIbeoLuxETH.h.
bool mrpt::hwdrivers::CIbeoLuxETH::m_run [private] |
Definition at line 103 of file CIbeoLuxETH.h.
unsigned int mrpt::hwdrivers::CIbeoLuxETH::m_scanFrequency [private] |
Definition at line 96 of file CIbeoLuxETH.h.
Definition at line 100 of file CIbeoLuxETH.h.
double mrpt::hwdrivers::CIbeoLuxETH::m_startAngle [private] |
Definition at line 98 of file CIbeoLuxETH.h.
double mrpt::hwdrivers::CIbeoLuxETH::m_stopAngle [private] |
Definition at line 99 of file CIbeoLuxETH.h.
float mrpt::hwdrivers::CIbeoLuxETH::m_vAngle [private] |
Definition at line 112 of file CIbeoLuxETH.h.
float mrpt::hwdrivers::CIbeoLuxETH::vwinkel [private] |
Definition at line 109 of file CIbeoLuxETH.h.
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Sun Oct 16 12:16:33 UTC 2011 |