6#define _USE_MATH_DEFINES
24#define DEG2RAD M_PI/180.0
91 std::vector<LaserMeasurementData> scans;
99 if (timestamp !=
nullptr)
108 std::vector<LaserMeasurementData> scans;
117 size_t size = scans.size();
122 return ReturnValue::return_code::return_value_error_method_failed;
125 for (
size_t i = 0; i < size; i++)
130 scans[i].get_polar(
rho, theta);
134 data[i].set_polar(
rho, theta);
137 if (timestamp!=
nullptr)
bool view(T *&x)
Get an interface to the device driver.
virtual ReturnValue getDistanceRange(double &min, double &max)=0
get the device detection range
virtual ReturnValue setDistanceRange(double min, double max)=0
set the device detection range.
virtual ReturnValue getDeviceInfo(std::string &device_info)=0
get the device hardware characteristics
virtual ReturnValue getScanRate(double &rate)=0
get the scan rate (scans per seconds)
virtual ReturnValue setScanLimits(double min, double max)=0
set the scan angular range.
virtual ReturnValue getScanLimits(double &min, double &max)=0
get the scan angular range.
virtual ReturnValue getHorizontalResolution(double &step)=0
get the angular step between two measurements.
virtual ReturnValue getDeviceStatus(Device_status &status)=0
get the device status
virtual ReturnValue getLaserMeasurement(std::vector< yarp::sig::LaserMeasurementData > &data, double *timestamp=nullptr)=0
Get the device measurements.
virtual ReturnValue setHorizontalResolution(double step)=0
get the angular step between two measurements (if available)
virtual ReturnValue setScanRate(double rate)=0
set the scan rate (scans per seconds)
A container for a device driver.
bool isValid() const
Check if device is valid.
A mini-server for performing network communication in the background.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A class for storing options and configuration information.
A base class for nested structures that can be searched.
#define yCInfo(component,...)
#define yCError(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
yarp::sig::Vector dcm2rpy(const yarp::sig::Matrix &R)
Converts a dcm (direction cosine matrix) rotation matrix to roll-pitch-yaw angles (defined in Math....
An interface to the operating system, including Port based communication.