Class CRoboPeakLidar
Defined in File CRoboPeakLidar.h
Inheritance Relationships
Base Type
public mrpt::hwdrivers::C2DRangeFinderAbstract(Class C2DRangeFinderAbstract)
Class Documentation
-
class CRoboPeakLidar : public mrpt::hwdrivers::C2DRangeFinderAbstract
Interfaces a Robo Peak LIDAR laser scanner.
See the example “samples/RoboPeakLidar_laser_test” and the application “rawlog-grabber” for a ready-to-use application to gather data from the scanner.
PARAMETERS IN THE ".INI"-LIKE CONFIGURATION STRINGS: ------------------------------------------------------- [supplied_section_name] COM_port_WIN = COM3 COM_port_LIN = ttyS0 pose_x=0 // Laser range scaner 3D position in the robot (meters) pose_y=0 pose_z=0 pose_yaw=0 // Angles in degrees pose_pitch=0 pose_roll=0 //preview = true // Enable GUI visualization of captured data // Optional: Exclusion zones to avoid the robot seeing itself: //exclusionZone1_x = 0.20 0.30 0.30 0.20 //exclusionZone1_y = 0.20 0.30 0.30 0.20 // Optional: Exclusion zones to avoid the robot seeing itself: //exclusionAngles1_ini = 20 // Deg //exclusionAngles1_end = 25 // Deg
Note
Class introduced in MRPT 1.2.2
Public Functions
-
CRoboPeakLidar()
Constructor
-
~CRoboPeakLidar() override
Destructor: turns the laser off.
-
virtual void initialize() override
Attempts to connect and turns the laser on. Raises an exception on error.
-
virtual void doProcessSimple(bool &outThereIsObservation, mrpt::obs::CObservation2DRangeScan &outObservation, bool &hardwareError) override
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 MUST BE CALLED in a timely fashion by the user to allow the proccessing of incoming data. It can be run in a different thread safely.
-
void setSerialPort(const std::string &port_name)
If set to non-empty, the serial port will be attempted to be opened automatically when this class is first used to request data from the laser.
-
inline const std::string getSerialPort()
Returns the currently set serial port
See also
-
virtual bool turnOn() override
See base class docs
-
virtual bool turnOff() override
See base class docs
-
bool getDeviceHealth() const
Returns true if the device is connected & operative
-
void disconnect()
Closes the comms with the laser. Shouldn’t have to be directly needed by the user
Protected Functions
-
bool checkCOMMs()
Returns true if communication has been established with the device. If it’s not, try to create a comms channel.
- Returns:
false on error.
-
virtual void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection) override
See the class documentation at the top for expected parameters
-
CRoboPeakLidar()