![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpSickLDMRS.h>
Public Types | |
| enum | MagicWord { MagicWordC2 = 0xAFFEC0C2 } |
| enum | DataType { MeasuredData = 0x2202 } |
Public Member Functions | |
| vpSickLDMRS () | |
| vpSickLDMRS (const vpSickLDMRS &sick) | |
| virtual | ~vpSickLDMRS () VP_OVERRIDE |
| vpSickLDMRS & | operator= (const vpSickLDMRS &sick) |
| bool | setup (const std::string &ip, int port) |
| bool | setup () |
| bool | measure (vpLaserScan laserscan[4]) |
| void | setIpAddress (std::string ip_address) |
| void | setPort (int com_port) |
Protected Attributes | |
| int | socket_fd |
| unsigned char * | body |
| vpColVector | vAngle |
| double | time_offset |
| bool | isFirstMeasure |
| size_t | maxlen_body |
| std::string | ip |
| int | port |
Driver for the Sick LD-MRS laser scanner.
The code below shows how the four laser scan provided by the Sick LD-MRS could be acquired.
Definition at line 106 of file vpSickLDMRS.h.
| Enumerator | |
|---|---|
| MeasuredData | Flag to indicate that the body of a message contains measured data. |
Definition at line 114 of file vpSickLDMRS.h.
| Enumerator | |
|---|---|
| MagicWordC2 | The magic word that allows to identify the messages that are sent by the Sick LD-MRS. |
Definition at line 109 of file vpSickLDMRS.h.
| BEGIN_VISP_NAMESPACE vpSickLDMRS::vpSickLDMRS | ( | ) |
Default constructor that initialize the Ethernet address to "131.254.12.119", set the port to 12002 and allocates memory for the body messages.
Definition at line 67 of file vpSickLDMRS.cpp.
References body, vpLaserScanner::ip, isFirstMeasure, maxlen_body, vpLaserScanner::port, vpMath::rad(), socket_fd, time_offset, and vAngle.
Referenced by operator=(), and vpSickLDMRS().
|
inline |
Copy constructor.
Definition at line 122 of file vpSickLDMRS.h.
References body, isFirstMeasure, maxlen_body, socket_fd, time_offset, vAngle, vpLaserScanner::vpLaserScanner(), and vpSickLDMRS().
|
virtual |
Destructor that deallocate the memory for the body messages.
Definition at line 84 of file vpSickLDMRS.cpp.
References body.
| bool vpSickLDMRS::measure | ( | vpLaserScan | laserscan[4] | ) |
Get the measures of the four scan layers.
Definition at line 160 of file vpSickLDMRS.cpp.
References vpLaserScan::addPoint(), body, vpLaserScan::clear(), vpException::ioError, isFirstMeasure, MagicWordC2, MeasuredData, vpTime::measureTimeSecond(), vpLaserScan::setEndTimestamp(), vpLaserScan::setMeasurementId(), vpLaserScan::setNumPoints(), vpLaserScan::setNumSteps(), vpScanPoint::setPolar(), vpLaserScan::setStartAngle(), vpLaserScan::setStartTimestamp(), vpLaserScan::setStopAngle(), socket_fd, time_offset, and vAngle.
|
inline |
Copy operator.
Definition at line 131 of file vpSickLDMRS.h.
References body, isFirstMeasure, maxlen_body, socket_fd, time_offset, vAngle, and vpSickLDMRS().
|
inlineinherited |
Set the Ethernet address of the laser.
Definition at line 66 of file vpLaserScanner.h.
References ip.
Referenced by vpSickLDMRS::setup().
|
inlineinherited |
Set the communication port.
Definition at line 69 of file vpLaserScanner.h.
References port.
Referenced by vpSickLDMRS::setup().
| bool vpSickLDMRS::setup | ( | ) |
Initialize the connection with the Sick LD-MRS laser scanner.
Definition at line 111 of file vpSickLDMRS.cpp.
References vpLaserScanner::ip, vpLaserScanner::port, and socket_fd.
Referenced by setup().
| bool vpSickLDMRS::setup | ( | const std::string & | ip_address, |
| int | com_port ) |
Initialize the connection with the Sick LD-MRS laser scanner.
| ip_address | : Ethernet address of the laser. |
| com_port | : Ethernet port of the laser. |
Definition at line 99 of file vpSickLDMRS.cpp.
References vpLaserScanner::setIpAddress(), vpLaserScanner::setPort(), and setup().
|
protected |
Definition at line 157 of file vpSickLDMRS.h.
Referenced by measure(), operator=(), vpSickLDMRS(), vpSickLDMRS(), and ~vpSickLDMRS().
|
protectedinherited |
Definition at line 72 of file vpLaserScanner.h.
Referenced by setIpAddress(), vpSickLDMRS::setup(), vpLaserScanner(), vpLaserScanner(), and vpSickLDMRS::vpSickLDMRS().
|
protected |
Definition at line 160 of file vpSickLDMRS.h.
Referenced by measure(), operator=(), vpSickLDMRS(), and vpSickLDMRS().
|
protected |
Definition at line 161 of file vpSickLDMRS.h.
Referenced by operator=(), vpSickLDMRS(), and vpSickLDMRS().
|
protectedinherited |
Definition at line 73 of file vpLaserScanner.h.
Referenced by setPort(), vpSickLDMRS::setup(), vpLaserScanner(), vpLaserScanner(), and vpSickLDMRS::vpSickLDMRS().
|
protected |
Definition at line 155 of file vpSickLDMRS.h.
Referenced by measure(), operator=(), setup(), vpSickLDMRS(), and vpSickLDMRS().
|
protected |
Definition at line 159 of file vpSickLDMRS.h.
Referenced by measure(), operator=(), vpSickLDMRS(), and vpSickLDMRS().
|
protected |
Definition at line 158 of file vpSickLDMRS.h.
Referenced by measure(), operator=(), vpSickLDMRS(), and vpSickLDMRS().