42 return (end + 1) % maxsize == start;
58 end = (end + 1) % maxsize;
62 start = (start + 1) % maxsize;
70 for (
int i = 0; i < size; i++)
72 if (write_elem(elems[i]) ==
false) {
84 }
else if (end == start) {
87 i = maxsize - start + end;
100 start = (start + 1) % maxsize;
106 start = (start + 1) % maxsize;
111 start = (start + size) % maxsize;
116 return elems[(start+offset) % maxsize];
121 for (
int i = 0; i < size; i++)
123 elems[i] = select_elem(i);
129 for (
int i = 0; i < size; i++)
131 if (read_elem(&elems[i]) ==
false) {
230 bool close()
override;
238 bool getLaserMeasurement(std::vector<LaserMeasurementData> &data,
double* timestamp)
override;
259 bool HW_getInfo(std::string& s_info);
define control board standard interfaces
contains the definition of a Vector type
rpLidar: Documentation to be added
void run() override
Loop function.
yarp::sig::Vector laser_data
bool getDistanceRange(double &min, double &max) override
get the device detection range
RpLidar(double period=0.01)
bool getRawData(yarp::sig::Vector &data, double *timestamp) override
Get the device measurements.
bool close() override
Close the DeviceDriver.
bool do_not_clip_infinity_enable
std::vector< Range_t > range_skip_vector
bool threadInit() override
Initialization method.
bool getHorizontalResolution(double &step) override
get the angular step between two measurements.
Device_status device_status
bool getScanRate(double &rate) override
get the scan rate (scans per seconds)
void threadRelease() override
Release method.
bool getDeviceInfo(std::string &device_info) override
get the device hardware characteristics
bool getLaserMeasurement(std::vector< LaserMeasurementData > &data, double *timestamp) override
Get the device measurements.
rpLidarCircularBuffer * buffer
bool setScanRate(double rate) override
set the scan rate (scans per seconds)
bool setScanLimits(double min, double max) override
set the scan angular range.
bool setDistanceRange(double min, double max) override
set the device detection range.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool getScanLimits(double &min, double &max) override
get the scan angular range.
bool getDeviceStatus(Device_status &status) override
get the device status
bool setHorizontalResolution(double step) override
get the angular step between two measurements (if available)
byte select_elem(int offset)
bool read_elem(byte *elem)
bool write_elems(byte *elems, int size)
const byte * getRawData()
void throw_away_elems(int size)
bool write_elem(byte elem)
bool read_elems(byte *elems, int size)
unsigned int getMaxSize()
void select_elems(byte *elems, int size)
Interface implemented by all device drivers.
A generic interface for planar laser range finders.
A generic interface to serial port devices.
A container for a device driver.
An abstraction for a periodic thread.
void step()
Call this to "step" the thread rather than starting it.
A base class for nested structures that can be searched.
#define yCError(component,...)
#define YARP_DECLARE_LOG_COMPONENT(name)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.
const yarp::os::LogComponent & RPLIDAR()