Class SensorInterface
Defined in File sensor_interface.hpp
Inheritance Relationships
Derived Types
public sensor::Sensor
(Class Sensor)public sensor::SensorTins
(Class SensorTins)
Class Documentation
-
class SensorInterface
An interface for lidars units.
Subclassed by sensor::Sensor, sensor::SensorTins
Public Functions
-
inline SensorInterface()
A sensor interface constructor.
-
virtual ~SensorInterface() = default
A sensor interface destructor.
-
SensorInterface(const SensorInterface&) = delete
-
SensorInterface &operator=(const SensorInterface&) = delete
-
SensorInterface(SensorInterface&&) = default
-
SensorInterface &operator=(SensorInterface&&) = default
Reset lidar sensor.
- Parameters:
configuration – file to use
node – pointer to the driver node, which provides access to ROS params
Configure lidar sensor.
- Parameters:
configuration – file to use
node – pointer to the driver node, which provides access to ROS params
-
virtual ouster::sensor::client_state get() = 0
Ask sensor to get its current state for data collection.
- Returns:
the state enum value
-
virtual bool readLidarPacket(const ouster::sensor::client_state &state, uint8_t *buf) = 0
reading a lidar packet
- Parameters:
state – of the sensor
buf – pointer to a buffer to hold the packet data. Must hold getPacketFormat().lidar_packet_size bytes.
- Returns:
true if a packet was recieved, false otherwise
-
virtual bool readImuPacket(const ouster::sensor::client_state &state, uint8_t *buf) = 0
reading an imu packet
- Parameters:
state – of the sensor
buf – pointer to a buffer to hold the packet data. Must hold getPacketFormat().imu_packet_size bytes.
- Returns:
true if a packet was recieved, false otherwise
-
virtual ros2_ouster::Metadata getMetadata() = 0
Get lidar sensor’s metadata.
- Returns:
sensor metadata struct
-
virtual ouster::sensor::packet_format getPacketFormat() = 0
Get lidar sensor’s packet format.
- Returns:
packet format struct
-
inline SensorInterface()