Skip to content

Namespace nebula::drivers

Namespace List > nebula > drivers

Namespaces

Type Name
namespace connections
namespace io
namespace loggers
namespace point_filters
namespace scan_cutter

Classes

Type Name
struct AnglePair <typename T, typename AngleUnit>
struct AngleRange <typename T, typename AngleUnit>
A range defined by a start and end angle. Crossing the 0/circle_modulus boundary (end < start) is allowed.
struct CANSensorConfigurationBase
Base struct for CAN-based Sensor configuration.
struct CalibrationConfigurationBase
Base struct for Calibration configuration (Requires extensions in child struct)
struct CorrectedAzimuths <NChannels, typename AngleT>
struct EthernetSensorConfigurationBase
Base struct for Ethernet-based Sensor configuration.
struct FieldOfView <typename T, typename AngleUnit>
class FsmCutAtFovEnd
FSM for scan cutting when the cut angle is at the FoV end (limited FoV mode). This is a 6-state FSM that tracks both buffer and FoV state.
class FsmCutInFov
FSM for scan cutting when the cut angle is within the field of view (360° FoV or cut inside limited FoV). This is the simpler 4-state FSM.
struct IsPointType <typename T, typename>
struct IsPointType< T, std::void_t< decltype(std::declval< T >().fields())> > <typename T>
struct LidarConfigurationBase
Base struct for Lidar configuration.
class NebulaDriverBase
Base class for each sensor driver.
class NebulaHwInterfaceBase
Base class for hardware interface of each LiDAR.
class PointCloud <typename T>
struct PointField
struct PointXYZ
struct PointXYZIR
struct PointXYZIRADT
struct PointXYZIRCAEDT
struct Radians
struct ScaledDegrees <Subdivisions>
class ScanCutter <NChannels, typename AngleT>
struct SensorConfigurationBase
Base struct for Sensor configuration.

Public Types

Type Name
typedef ScaledDegrees< 100 > CentiDegrees
typedef ScaledDegrees< 10 > DeciDegrees
typedef ScaledDegrees< 1 > Degrees
typedef ScaledDegrees< 1000 > MilliDegrees
typedef PointXYZIRCAEDT NebulaPoint
typedef PointCloud< NebulaPoint > NebulaPointCloud
typedef std::shared_ptr< NebulaPointCloud > NebulaPointCloudPtr
enum uint8_t PtpProfile
enum uint8_t PtpSwitchType
enum uint8_t PtpTransportType
enum uint8_t ReturnMode
Return mode of each LiDAR.
enum uint8_t ReturnType
Return type of each scan.
enum uint8_t SensorModel
Type of sensor.
typedef boost::crc_ccitt_false_t crc16_ccit_false_t
CRC-16/CCITT-FALSE algorithm.
typedef boost::crc_optimal< 8, 0x2F, 0xFF, 0xFF, false, false > crc8h2f_t
AUTOSAR CRC8H2F routine.

Public Functions

Type Name
bool angle_is_between (T start_angle, T end_angle, T angle, bool start_inclusive=true, bool end_inclusive=true)
Tests if angle is in the angular sector defined bystart_angle andend_angle .
PointCloud< PointXYZ > convert_point_xyzircaedt_to_point_xyz (const PointCloud< PointXYZIRCAEDT > & input_pointcloud)
PointCloud< PointXYZIR > convert_point_xyzircaedt_to_point_xyzir (const PointCloud< PointXYZIRCAEDT > & input_pointcloud)
PointCloud< PointXYZIRADT > convert_point_xyzircaedt_to_point_xyziradt (const PointCloud< PointXYZIRCAEDT > & input_pointcloud, double stamp)
crc_type::value_type crc (const T * begin, const U * end)
Given a memory range, calculates the CRC over its bytes.
T normalize_angle (T angle, U max_angle)
Normalizes an angle to the interval [0; max_angle). This function is unit-independent. max_angle is 360 for degrees, 2 * M_PI for radians, and the corresponding scaled value for scaled units such as centi-degrees (36000).
std::ostream & operator<< (std::ostream & os, nebula::drivers::ReturnType const & arg)
Convert ReturnType enum to string (Overloading the << operator)
std::ostream & operator<< (std::ostream & os, nebula::drivers::ReturnMode const & arg)
Convert ReturnMode enum to string (Overloading the << operator)
std::ostream & operator<< (std::ostream & os, nebula::drivers::SensorModel const & arg)
Convert SensorModel enum to string (Overloading the << operator)
std::ostream & operator<< (std::ostream & os, SensorConfigurationBase const & arg)
Convert SensorConfigurationBase to string (Overloading the << operator)
std::ostream & operator<< (std::ostream & os, EthernetSensorConfigurationBase const & arg)
Convert EthernetSensorConfigurationBase to string (Overloading the << operator)
std::ostream & operator<< (std::ostream & os, CANSensorConfigurationBase const & arg)
Convert CANSensorConfigurationBase to string (Overloading the << operator)
std::ostream & operator<< (std::ostream & os, nebula::drivers::LidarConfigurationBase const & arg)
Convert LidarConfigurationBase to string (Overloading the << operator)
ReturnMode return_mode_from_string (const std::string & return_mode)
Convert return mode name to ReturnMode enum.
SensorModel sensor_model_from_string (const std::string & sensor_model)
Convert sensor name to SensorModel enum (Upper and lower case letters must match)
std::string sensor_model_to_string (const SensorModel & sensor_model)

Public Static Functions

Type Name
std::enable_if_t< std::is_floating_point_v< T >, T > deg2rad (T degrees)
Converts degrees to radians.
std::enable_if_t< std::is_integral_v< T >, double > deg2rad (T degrees)
std::enable_if_t< std::is_floating_point_v< T >, T > rad2deg (T radians)
Converts radians to degrees.
double rpm2hz (double rpm)
Converts RPM to Hertz.

Public Types Documentation

typedef CentiDegrees

using nebula::drivers::CentiDegrees = typedef ScaledDegrees<100>;

typedef DeciDegrees

using nebula::drivers::DeciDegrees = typedef ScaledDegrees<10>;

typedef Degrees

using nebula::drivers::Degrees = typedef ScaledDegrees<1>;

typedef MilliDegrees

using nebula::drivers::MilliDegrees = typedef ScaledDegrees<1000>;

typedef NebulaPoint

using nebula::drivers::NebulaPoint = typedef PointXYZIRCAEDT;

typedef NebulaPointCloud

using nebula::drivers::NebulaPointCloud = typedef PointCloud<NebulaPoint>;

typedef NebulaPointCloudPtr

using nebula::drivers::NebulaPointCloudPtr = typedef std::shared_ptr<NebulaPointCloud>;

enum PtpProfile

enum nebula::drivers::PtpProfile {
    IEEE_1588v2 = 0,
    IEEE_802_1AS,
    IEEE_802_1AS_AUTO,
    UNKNOWN_PROFILE
};

enum PtpSwitchType

enum nebula::drivers::PtpSwitchType {
    NON_TSN = 0,
    TSN,
    UNKNOWN_SWITCH
};

enum PtpTransportType

enum nebula::drivers::PtpTransportType {
    UDP_IP = 0,
    L2,
    UNKNOWN_TRANSPORT
};

enum ReturnMode

Return mode of each LiDAR.

enum nebula::drivers::ReturnMode {
    UNKNOWN = 0,
    SINGLE_STRONGEST,
    SINGLE_LAST,
    DUAL_FIRST,
    DUAL_LAST,
    DUAL_ONLY,
    SINGLE_FIRST,
    DUAL_STRONGEST_FIRST,
    DUAL_STRONGEST_LAST,
    DUAL_WEAK_FIRST,
    DUAL_WEAK_LAST,
    TRIPLE,
    LAST,
    STRONGEST,
    DUAL_LAST_STRONGEST,
    FIRST,
    DUAL_LAST_FIRST,
    DUAL_FIRST_STRONGEST,
    DUAL
};


enum ReturnType

Return type of each scan.

enum nebula::drivers::ReturnType {
    UNKNOWN = 0,
    LAST,
    FIRST,
    STRONGEST,
    FIRST_WEAK,
    LAST_WEAK,
    IDENTICAL,
    SECOND,
    SECONDSTRONGEST,
    FIRST_STRONGEST,
    LAST_STRONGEST
};


enum SensorModel

Type of sensor.

enum nebula::drivers::SensorModel {
    UNKNOWN = 0,
    HESAI_PANDAR64,
    HESAI_PANDAR40P,
    HESAI_PANDAR40M,
    HESAI_PANDARQT64,
    HESAI_PANDARQT128,
    HESAI_PANDARXT16,
    HESAI_PANDARXT32,
    HESAI_PANDARXT32M,
    HESAI_PANDARAT128,
    HESAI_PANDAR128_E3X,
    HESAI_PANDAR128_E4X,
    VELODYNE_VLS128,
    VELODYNE_HDL64,
    VELODYNE_VLP32,
    VELODYNE_VLP32MR,
    VELODYNE_HDL32,
    VELODYNE_VLP16,
    ROBOSENSE_HELIOS,
    ROBOSENSE_BPEARL_V3,
    ROBOSENSE_BPEARL_V4,
    CONTINENTAL_ARS548,
    CONTINENTAL_SRR520
};


typedef crc16_ccit_false_t

CRC-16/CCITT-FALSE algorithm.

using nebula::drivers::crc16_ccit_false_t = typedef boost::crc_ccitt_false_t;


typedef crc8h2f_t

AUTOSAR CRC8H2F routine.

using nebula::drivers::crc8h2f_t = typedef boost::crc_optimal<8, 0x2F, 0xFF, 0xFF, false, false>;

See AUTOSAR Specification of CRC Routines >=3.1.4, sec. 7.2.1.2.

Bit Width Polynomial Initial Value Final XOR Reflect In Reflect Remainder
8 0x2F 0xFF 0xFF false false

Public Functions Documentation

function angle_is_between

Tests if angle is in the angular sector defined bystart_angle andend_angle .

template<typename T>
inline bool nebula::drivers::angle_is_between (
    T start_angle,
    T end_angle,
    T angle,
    bool start_inclusive=true,
    bool end_inclusive=true
) 

Assumes that all three angles are normalized to the interval [0; max_angle) before comparison. This function is unit-independent (max_angle can be 360 for degrees, 2 * M_PI for radians, 36000 for centi-degrees, etc.) as long as the above assumption is fulfilled.

If start_angle equals end_angle, the sector is considered to cover the full circle. In this case, an angle is always considered to be in the sector, except when it coincides with the start_angle/end_angle and both boundaries are exclusive. There is no way to define a zero-width sector.

When start_angle and end_angle differ, angle is considered to be in the sector if * start_angle <= angle <= end_angle, or * end_angle < start_angle and (angle <= end_angle or start_angle <= angle)

Examples:

 ++
assert(angle_is_between(90, 270, 180) == true);
assert(angle_is_between(270, 90, 0) == true);  // wrap-around case
assert(angle_is_between(0, 0, 0) == true);
assert(angle_is_between(0, 0, 0, false, false) == false);


function convert_point_xyzircaedt_to_point_xyz

PointCloud < PointXYZ > nebula::drivers::convert_point_xyzircaedt_to_point_xyz (
    const PointCloud < PointXYZIRCAEDT > & input_pointcloud
) 

function convert_point_xyzircaedt_to_point_xyzir

PointCloud < PointXYZIR > nebula::drivers::convert_point_xyzircaedt_to_point_xyzir (
    const PointCloud < PointXYZIRCAEDT > & input_pointcloud
) 

function convert_point_xyzircaedt_to_point_xyziradt

PointCloud < PointXYZIRADT > nebula::drivers::convert_point_xyzircaedt_to_point_xyziradt (
    const PointCloud < PointXYZIRCAEDT > & input_pointcloud,
    double stamp
) 

function crc

Given a memory range, calculates the CRC over its bytes.

template<typename crc_type, typename T, typename U>
crc_type::value_type nebula::drivers::crc (
    const T * begin,
    const U * end
) 

Both begin and end can be pointers to arbitrary types. They will be cast to void *.

A common example looks like:

 ++
struct MyStruct {
  int a;
  float b;
  uint32_t crc;

  bool is_crc_valid() const {
    return crc<crc8h2f_t>(&a, &crc) == crc;
  }
};

Template parameters:

  • crc_type The type of CRC algorithm to use. Has to be a boost::crc_optimal type.

Parameters:

  • begin The beginning of the memory range
  • end One (byte) past the end of the memory range

Returns:

crc_type::value_type The computed CRC


function normalize_angle

Normalizes an angle to the interval [0; max_angle). This function is unit-independent. max_angle is 360 for degrees, 2 * M_PI for radians, and the corresponding scaled value for scaled units such as centi-degrees (36000).

template<typename T, typename U>
inline T nebula::drivers::normalize_angle (
    T angle,
    U max_angle
) 

Mathematically, the normalization is a modulo operation, yielding an angle with winding number 0.


function operator<<

Convert ReturnType enum to string (Overloading the << operator)

inline std::ostream & nebula::drivers::operator<< (
    std::ostream & os,
    nebula::drivers::ReturnType const & arg
) 

Parameters:

  • os
  • arg

Returns:

stream


function operator<<

Convert ReturnMode enum to string (Overloading the << operator)

inline std::ostream & nebula::drivers::operator<< (
    std::ostream & os,
    nebula::drivers::ReturnMode const & arg
) 

Parameters:

  • os
  • arg

Returns:

stream


function operator<<

Convert SensorModel enum to string (Overloading the << operator)

inline std::ostream & nebula::drivers::operator<< (
    std::ostream & os,
    nebula::drivers::SensorModel const & arg
) 

Parameters:

  • os
  • arg

Returns:

stream


function operator<<

Convert SensorConfigurationBase to string (Overloading the << operator)

inline std::ostream & nebula::drivers::operator<< (
    std::ostream & os,
    SensorConfigurationBase const & arg
) 

Parameters:

  • os
  • arg

Returns:

stream


function operator<<

Convert EthernetSensorConfigurationBase to string (Overloading the << operator)

inline std::ostream & nebula::drivers::operator<< (
    std::ostream & os,
    EthernetSensorConfigurationBase const & arg
) 

Parameters:

  • os
  • arg

Returns:

stream


function operator<<

Convert CANSensorConfigurationBase to string (Overloading the << operator)

inline std::ostream & nebula::drivers::operator<< (
    std::ostream & os,
    CANSensorConfigurationBase const & arg
) 

Parameters:

  • os
  • arg

Returns:

stream


function operator<<

Convert LidarConfigurationBase to string (Overloading the << operator)

inline std::ostream & nebula::drivers::operator<< (
    std::ostream & os,
    nebula::drivers::LidarConfigurationBase const & arg
) 

Parameters:

  • os
  • arg

Returns:

stream


function return_mode_from_string

Convert return mode name to ReturnMode enum.

inline ReturnMode nebula::drivers::return_mode_from_string (
    const std::string & return_mode
) 

Parameters:

  • return_mode Return mode name (Upper and lower case letters must match)

Returns:

Corresponding ReturnMode


function sensor_model_from_string

Convert sensor name to SensorModel enum (Upper and lower case letters must match)

inline SensorModel nebula::drivers::sensor_model_from_string (
    const std::string & sensor_model
) 

Parameters:

  • sensor_model Sensor name (Upper and lower case letters must match)

Returns:

Corresponding SensorModel


function sensor_model_to_string

inline std::string nebula::drivers::sensor_model_to_string (
    const SensorModel & sensor_model
) 

Public Static Functions Documentation

function deg2rad

Converts degrees to radians.

template<typename T>
static inline std::enable_if_t< std::is_floating_point_v< T >, T > nebula::drivers::deg2rad (
    T degrees
) 

Parameters:

  • radians

Returns:

degrees


function deg2rad

template<typename T>
static inline std::enable_if_t< std::is_integral_v< T >, double > nebula::drivers::deg2rad (
    T degrees
) 

function rad2deg

Converts radians to degrees.

template<typename T>
static inline std::enable_if_t< std::is_floating_point_v< T >, T > nebula::drivers::rad2deg (
    T radians
) 

Parameters:

  • radians

Returns:

degrees


function rpm2hz

Converts RPM to Hertz.

static inline double nebula::drivers::rpm2hz (
    double rpm
) 

Parameters:

  • rpm

Returns:

Hertz



The documentation for this class was generated from the following file src/nebula_core/nebula_core_common/include/nebula_core_common/io/pcd.hpp