9 #ifndef CObservationVelodyneScan_H 10 #define CObservationVelodyneScan_H 23 class CPose3DInterpolator;
117 #pragma pack(push, 1) 186 std::vector<float>
x,
y,
z;
197 inline size_t size()
const {
return x.size(); }
302 std::vector<mrpt::math::TPointXYZIu8>& out_points,
317 std::ostream& o)
const override;
Results for generatePointCloudAlongSE3Trajectory()
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
static const int SIZE_BLOCK
size_t num_points
Number of points in the observation.
float ROI_x_min
The limits of the 3D box (default=infinity) in sensor (not vehicle) local coordinates for the ROI fil...
Velodyne calibration data, for usage in mrpt::obs::CObservationVelodyneScan.
A CObservation-derived class for RAW DATA (and optionally, point cloud) of scans from 3D Velodyne LID...
unsigned __int16 uint16_t
raw_block_t blocks[BLOCKS_PER_PACKET]
CObservationVelodyneScan()
bool filterOutIsolatedPoints
(Default:false) Simple filter to remove spurious returns (e.g.
uint32_t gps_timestamp
us from top of hour
std::vector< mrpt::system::TTimeStamp > timestamp
Timestamp for each point (if generatePerPointTimestamp=true in TGeneratePointCloudParameters), or empty vector if not populated (default).
std::vector< float > azimuth
Original azimuth of each point (if generatePerPointAzimuth=true, empty otherwise ) ...
static const uint16_t LOWER_BANK
Blocks 32-63.
mrpt::system::TTimeStamp originalReceivedTimestamp
The local computer-based timestamp based on the reception of the message in the computer.
static const uint8_t RETMODE_LAST
bool generatePerPointAzimuth
(Default:false) If true, populate the vector azimuth
static const float DISTANCE_MAX_UNITS
mrpt::obs::VelodyneCalibration calibration
The calibration data for the LIDAR device.
void clear_deep()
Like clear(), but also enforcing freeing memory.
bool has_satellite_timestamp
If true, CObservation::timestamp has been generated from accurate satellite clock.
static const uint8_t RETMODE_DUAL
bool filterByROI
Enable ROI filter (Default:false): add points inside a given 3D box.
mrpt::poses::CPose3D sensorPose
The 6D pose of the sensor on the robot/vehicle frame of reference.
char NMEA_GPRMC[72+234]
the full $GPRMC message, as received by Velodyne, terminated with "\r\n\0"
static const uint16_t ROTATION_MAX_UNITS
hundredths of degrees
void getDescriptionAsText(std::ostream &o) const override
Build a detailed, multi-line textual description of the observation contents and dump it to the outpu...
double minAzimuth_deg
Minimum azimuth, in degrees (Default=0).
double maxAzimuth_deg
Minimum azimuth, in degrees (Default=360).
void generatePointCloudAlongSE3Trajectory(const mrpt::poses::CPose3DInterpolator &vehicle_path, std::vector< mrpt::math::TPointXYZIu8 > &out_points, TGeneratePointCloudSE3Results &results_stats, const TGeneratePointCloudParameters ¶ms=defaultPointCloudParams)
An alternative to generatePointCloud() for cases where the motion of the sensor as it grabs one scan ...
TPointCloud point_cloud
Optionally, raw data can be converted into a 3D point cloud (local coordinates wrt the sensor...
double minRange
The maximum range allowed by the device, in meters (e.g.
mrpt::system::TTimeStamp getOriginalReceivedTimeStamp() const override
By default, returns CObservation::timestamp but in sensors capable of satellite (or otherwise) accura...
static const int POS_PACKET_SIZE
float isolatedPointsFilterDistance
(Default:2.0 meters) Minimum distance between a point and its two neighbors to be considered an inval...
static const int SCANS_PER_PACKET
float minDistance
Minimum (default=1.0f) and maximum (default: Infinity) distances/ranges for a point to be considered...
void generatePointCloud(const TGeneratePointCloudParameters ¶ms=defaultPointCloudParams)
Generates the point cloud into the point cloud data fields in CObservationVelodyneScan::point_cloud w...
This namespace contains representation of robot actions and observations.
size_t num_correctly_inserted_points
Number of points for which a valid interpolated SE(3) pose could be determined.
TGeneratePointCloudSE3Results()
uint16_t header
Block id: UPPER_BANK or LOWER_BANK.
Payload of one POSITION packet.
See point_cloud and scan_packets.
TGeneratePointCloudParameters()
bool generatePerPointTimestamp
(Default:false) If true, populate the vector timestamp
#define MRPT_DECLARE_TTYPENAME_PTR_NAMESPACE(_TYPE, __NS)
static const int BLOCKS_PER_PACKET
static const int PACKET_SIZE
std::vector< uint8_t > intensity
Color [0,255].
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
laser_return_t laser_returns[SCANS_PER_BLOCK]
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
One unit of data from the scanner (the payload of one UDP DATA packet)
Declares a class that represents any robot's observation.
uint8_t velodyne_model_ID
0x21: HDL-32E, 0x22: VLP-16
static const uint16_t UPPER_BANK
Blocks 0-31.
void getSensorPose(mrpt::poses::CPose3D &out_sensorPose) const override
A general method to retrieve the sensor pose on the robot.
uint8_t laser_return_mode
0x37: strongest, 0x38: last, 0x39: dual return
static const float DISTANCE_RESOLUTION
meters
static const TGeneratePointCloudParameters defaultPointCloudParams
void clear()
Sets all vectors to zero length.
void setSensorPose(const mrpt::poses::CPose3D &newSensorPose) override
A general method to change the sensor pose on the robot.
This class stores a time-stamped trajectory in SE(3) (CPose3D poses).
static const int RAW_SCAN_SIZE
uint16_t rotation
0-35999, divide by 100 to get degrees
std::vector< TVelodyneRawPacket > scan_packets
The main content of this object: raw data packet from the LIDAR.
bool dualKeepStrongest
(Default:true) In VLP16 dual mode, keep both or just one of the returns.
float nROI_x_min
The limits of the 3D box (default=0) in sensor (not vehicle) local coordinates for the nROI filter...
unsigned __int32 uint32_t
static const int BLOCK_DATA_SIZE
GLenum const GLfloat * params
static const float DISTANCE_MAX
meters
static const float ROTATION_RESOLUTION
degrees
static const int SCANS_PER_BLOCK
virtual ~CObservationVelodyneScan()
static const int PACKET_STATUS_SIZE
static const uint8_t RETMODE_STRONGEST
bool filterBynROI
Enable nROI filter (Default:false): do NOT add points inside a given 3D box.