9 #ifndef CObservationVelodyneScan_H
10 #define CObservationVelodyneScan_H
20 namespace poses {
class CPose3DInterpolator; }
67 static const int SIZE_BLOCK = 100;
68 static const int RAW_SCAN_SIZE = 3;
69 static const int SCANS_PER_BLOCK = 32;
70 static const int BLOCK_DATA_SIZE = (SCANS_PER_BLOCK * RAW_SCAN_SIZE);
73 static const uint16_t ROTATION_MAX_UNITS = 36000;
82 static const int PACKET_SIZE = 1206;
83 static const int POS_PACKET_SIZE = 512;
84 static const int BLOCKS_PER_PACKET = 12;
85 static const int PACKET_STATUS_SIZE = 4;
86 static const int SCANS_PER_PACKET = (SCANS_PER_BLOCK * BLOCKS_PER_PACKET);
88 static const uint8_t RETMODE_STRONGEST = 0x37;
126 char NMEA_GPRMC[72+234];
168 float ROI_x_min,
ROI_x_max, ROI_y_min, ROI_y_max, ROI_z_min, ROI_z_max;
170 float nROI_x_min,
nROI_x_max, nROI_y_min, nROI_y_max, nROI_z_min, nROI_z_max;
209 void generatePointCloudAlongSE3Trajectory(
211 std::vector<mrpt::math::TPointXYZIu8> & out_points,
219 void getDescriptionAsText(std::ostream &o)
const MRPT_OVERRIDE;
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
#define MRPT_DECLARE_TTYPENAME_PTR_NAMESPACE(_TYPE, __NS)
Declares a class that represents any robot's observation.
A CObservation-derived class for RAW DATA (and optionally, point cloud) of scans from 3D Velodyne LID...
static const float ROTATION_RESOLUTION
degrees
bool has_satellite_timestamp
If true, CObservation::timestamp has been generated from accurate satellite clock....
mrpt::system::TTimeStamp originalReceivedTimestamp
The local computer-based timestamp based on the reception of the message in the computer.
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) MRPT_OVERRIDE
A general method to change the sensor pose on the robot.
static const float DISTANCE_RESOLUTION
meters
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const MRPT_OVERRIDE
A general method to retrieve the sensor pose on the robot.
static const float DISTANCE_MAX
meters
static const float DISTANCE_MAX_UNITS
std::vector< TVelodyneRawPacket > scan_packets
The main content of this object: raw data packet from the LIDAR.
static const TGeneratePointCloudParameters defaultPointCloudParams
mrpt::poses::CPose3D sensorPose
The 6D pose of the sensor on the robot/vehicle frame of reference.
double maxRange
The maximum range allowed by the device, in meters (e.g. 100m). Stored here by the driver while captu...
TPointCloud point_cloud
Optionally, raw data can be converted into a 3D point cloud (local coordinates wrt the sensor,...
mrpt::obs::VelodyneCalibration calibration
The calibration data for the LIDAR device. See mrpt::hwdrivers::CVelodyneScanner and mrpt::obs::Velod...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
This class stores a time-stamped trajectory in SE(3) (CPose3D poses).
GLenum const GLfloat * params
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
This namespace contains representation of robot actions and observations.
void clear()
Clear the contents of this container.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
unsigned __int16 uint16_t
unsigned __int32 uint32_t
bool filterByROI
Enable ROI filter (Default:false): add points inside a given 3D box.
bool generatePerPointTimestamp
(Default:false) If true, populate the vector timestamp
double maxAzimuth_deg
Minimum azimuth, in degrees (Default=360). Points will be generated only the the area of interest [mi...
bool filterBynROI
Enable nROI filter (Default:false): do NOT add points inside a given 3D box.
float isolatedPointsFilterDistance
(Default:2.0 meters) Minimum distance between a point and its two neighbors to be considered an inval...
bool generatePerPointAzimuth
(Default:false) If true, populate the vector azimuth
bool dualKeepLast
(Default:true) In VLP16 dual mode, keep both or just one of the returns.
float maxDistance
Minimum (default=1.0f) and maximum (default: Infinity) distances/ranges for a point to be considered....
double minAzimuth_deg
Minimum azimuth, in degrees (Default=0). Points will be generated only the the area of interest [minA...
bool filterOutIsolatedPoints
(Default:false) Simple filter to remove spurious returns (e.g. Sun reflected on large water extension...
Results for generatePointCloudAlongSE3Trajectory()
size_t num_correctly_inserted_points
Number of points for which a valid interpolated SE(3) pose could be determined.
size_t num_points
Number of points in the observation.
See point_cloud and scan_packets.
std::vector< mrpt::system::TTimeStamp > timestamp
Timestamp for each point (if generatePerPointTimestamp=true in TGeneratePointCloudParameters),...
std::vector< uint8_t > intensity
Color [0,255].
std::vector< float > azimuth
Original azimuth of each point (if generatePerPointAzimuth=true, empty otherwise )
Payload of one POSITION packet.
One unit of data from the scanner (the payload of one UDP DATA packet)
uint8_t laser_return_mode
0x37: strongest, 0x38: last, 0x39: dual return
uint32_t gps_timestamp
us from top of hour
uint8_t velodyne_model_ID
0x21: HDL-32E, 0x22: VLP-16
uint16_t header
Block id: UPPER_BANK or LOWER_BANK.
uint16_t rotation
0-35999, divide by 100 to get degrees
Velodyne calibration data, for usage in mrpt::obs::CObservationVelodyneScan.