Class VelodyneHwInterface
Defined in File velodyne_hw_interface.hpp
Class Documentation
-
class VelodyneHwInterface
Hardware interface of velodyne driver.
Public Functions
Constructor.
-
virtual ~VelodyneHwInterface() = default
-
void receive_sensor_packet_callback(const std::vector<uint8_t> &buffer)
Callback function to receive the Cloud Packet data from the UDP Driver.
- Parameters:
buffer – Buffer containing the data received from the UDP socket
-
Status sensor_interface_start()
Starting the interface that handles UDP streams.
- Returns:
Resulting status
-
Status sensor_interface_stop()
Function for stopping the interface that handles UDP streams.
- Returns:
Resulting status
-
Status get_sensor_configuration(SensorConfigurationBase &sensor_configuration)
Printing sensor configuration.
- Parameters:
sensor_configuration – SensorConfiguration for this interface
- Returns:
Resulting status
-
Status get_calibration_configuration(CalibrationConfigurationBase &calibration_configuration)
Printing calibration configuration.
- Parameters:
calibration_configuration – CalibrationConfiguration for the checking
- Returns:
Resulting status
Initializing sensor configuration.
- Parameters:
sensor_configuration – SensorConfiguration for this interface
- Returns:
Resulting status
Setting sensor configuration with InitializeSensorConfiguration & CheckAndSetConfigBySnapshotAsync.
- Parameters:
sensor_configuration – SensorConfiguration for this interface
- Returns:
Resulting status
-
Status register_scan_callback(std::function<void(const std::vector<uint8_t> &packet)> scan_callback)
Registering callback for PandarScan.
- Parameters:
scan_callback – Callback function
- Returns:
Resulting status
-
boost::property_tree::ptree parse_json(const std::string &str)
Parsing JSON string to property_tree.
- Parameters:
str – JSON string
- Returns:
property_tree
-
VelodyneStatus init_http_client()
Initializing HTTP client (sync)
- Returns:
Resulting status
-
nebula::util::expected<std::string, VelodyneStatus> get_status()
Getting the current operational state and parameters of the sensor (sync)
- Returns:
Resulting JSON string
-
nebula::util::expected<std::string, VelodyneStatus> get_diag()
Getting diagnostic information from the sensor (sync)
- Returns:
Resulting JSON string
-
nebula::util::expected<std::string, VelodyneStatus> get_snapshot()
Getting current sensor configuration and status data (sync)
- Returns:
Resulting JSON string
-
VelodyneStatus set_rpm(uint16_t rpm)
Setting Motor RPM (sync)
- Parameters:
rpm – the RPM of the motor
- Returns:
Resulting status
-
VelodyneStatus set_fov_start(uint16_t fov_start)
Setting Field of View Start (sync)
- Parameters:
fov_start – FOV start
- Returns:
Resulting status
-
VelodyneStatus set_fov_end(uint16_t fov_end)
Setting Field of View End (sync)
- Parameters:
fov_end – FOV end
- Returns:
Resulting status
-
VelodyneStatus set_return_type(ReturnMode return_mode)
Setting Return Type (sync)
- Parameters:
return_mode – ReturnMode
- Returns:
Resulting status
-
VelodyneStatus save_config()
Save Configuration to the LiDAR memory (sync)
- Returns:
Resulting status
-
VelodyneStatus reset_system()
Resets the sensor (sync)
- Returns:
Resulting status
-
VelodyneStatus laser_on()
Turn laser state on (sync)
- Returns:
Resulting status
-
VelodyneStatus laser_off()
Turn laser state off (sync)
- Returns:
Resulting status
-
VelodyneStatus laser_on_off(bool on)
Turn laser state on/off (sync)
- Parameters:
on – is ON
- Returns:
Resulting status
-
VelodyneStatus set_host_addr(std::string addr)
Setting host (destination) IP address (sync)
- Parameters:
addr – destination IP address
- Returns:
Resulting status
-
VelodyneStatus set_host_dport(uint16_t dport)
Setting host (destination) data port (sync)
- Parameters:
dport – destination data port
- Returns:
Resulting status
-
VelodyneStatus set_host_tport(uint16_t tport)
Setting host (destination) telemetry port (sync)
- Parameters:
tport – destination telemetry port
- Returns:
Resulting status
-
VelodyneStatus set_net_addr(std::string addr)
Setting network (sensor) IP address (sync)
- Parameters:
addr – sensor IP address
- Returns:
Resulting status
-
VelodyneStatus set_net_mask(std::string mask)
Setting the network mask of the sensor (sync)
- Parameters:
mask – Network mask
- Returns:
Resulting status
-
VelodyneStatus set_net_gateway(std::string gateway)
Setting the gateway address of the sensor (sync)
- Parameters:
gateway – Gateway address
- Returns:
Resulting status
-
VelodyneStatus set_net_dhcp(bool use_dhcp)
This determines if the sensor is to rely on a DHCP server for its IP address (sync)
- Parameters:
use_dhcp – DHCP on
- Returns:
Resulting status