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;
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
yarp::dev::ReturnValue getScanLimits(double &min, double &max) override
get the scan angular range.
RpLidar(double period=0.01)
bool close() override
Close the DeviceDriver.
yarp::dev::ReturnValue setScanLimits(double min, double max) override
set the scan angular range.
bool do_not_clip_infinity_enable
yarp::dev::ReturnValue getDeviceStatus(Device_status &status) override
get the device status
std::vector< Range_t > range_skip_vector
bool threadInit() override
Initialization method.
yarp::dev::ReturnValue getDistanceRange(double &min, double &max) override
get the device detection range
Device_status device_status
void threadRelease() override
Release method.
yarp::dev::ReturnValue getHorizontalResolution(double &step) override
get the angular step between two measurements.
yarp::dev::ReturnValue setHorizontalResolution(double step) override
get the angular step between two measurements (if available)
yarp::dev::ReturnValue setScanRate(double rate) override
set the scan rate (scans per seconds)
rpLidarCircularBuffer * buffer
yarp::dev::ReturnValue setDistanceRange(double min, double max) override
set the device detection range.
yarp::dev::ReturnValue getDeviceInfo(std::string &device_info) override
get the device hardware characteristics
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::dev::ReturnValue getScanRate(double &rate) override
get the scan rate (scans per seconds)
yarp::dev::ReturnValue getRawData(yarp::sig::Vector &data, double *timestamp) override
Get the device measurements.
yarp::dev::ReturnValue getLaserMeasurement(std::vector< yarp::sig::LaserMeasurementData > &data, double *timestamp) override
Get the device measurements.
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.
A mini-server for performing network communication in the background.
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()