class mrpt::hwdrivers::CIbeoLuxETH

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);

This class was contributed by Adrien Barral - Robopec (France)

And modified by Jan Girlich - University of Hamburg

#include <mrpt/hwdrivers/CIbeoLuxETH.h>

class CIbeoLuxETH: public mrpt::hwdrivers::CGenericSensor
{
public:
    // construction

    CIbeoLuxETH(std::string _ip = std::string("10.152.36.93"), unsigned int _port = 12002);

    //
methods

    virtual void doProcess();
    virtual void initialize();
    void start();
    void makeCommandHeader(unsigned char* buffer);
    void makeStartCommand(unsigned char* buffer);
    void makeStopCommand(unsigned char* buffer);
    void makeTypeCommand(unsigned char* buffer);
};

Inherited Members

public:
    //
methods

    CGenericSensor& operator = (const CGenericSensor&);
    virtual void doProcess() = 0;

Construction

CIbeoLuxETH(
    std::string _ip = std::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.

Methods

virtual void doProcess()

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.

Parameters:

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).

virtual void initialize()

This method can or cannot be implemented in the derived class, depending on the need for it.

Parameters:

This

method must throw an exception with a descriptive message if some critical error is found.