CARLA
Loading...
Searching...
No Matches
carla::sensor::data::RadarData Class Reference

#include <RadarData.h>

Public Member Functions

size_t GetDetectionCount () const
 Returns the number of current detections.
const std::vector< RadarDetection > & GetDetections () const
RadarData & operator= (RadarData &&)=default
 RadarData ()=default
void Reset ()
 Deletes the current detections.
void SetResolution (uint32_t resolution)
 Set a new resolution for the RadarData.
void WriteDetection (RadarDetection detection)
 Adds a new detection.

Static Public Attributes

static constexpr auto detection_size = sizeof(RadarDetection)

Private Attributes

std::vector< RadarDetection > _detections

Friends

class carla::ros2::ROS2
class s11n::RadarSerializer

Detailed Description

Definition at line 34 of file RadarData.h.

Constructor & Destructor Documentation

◆ RadarData()

carla::sensor::data::RadarData::RadarData ( )
explicitdefault

Referenced by operator=().

Member Function Documentation

◆ GetDetectionCount()

size_t carla::sensor::data::RadarData::GetDetectionCount ( ) const
inline

Returns the number of current detections.

Definition at line 58 of file RadarData.h.

References _detections.

Referenced by carla::ros2::ROS2::ProcessDataFromRadar().

◆ GetDetections()

const std::vector< RadarDetection > & carla::sensor::data::RadarData::GetDetections ( ) const
inline

Definition at line 73 of file RadarData.h.

References _detections.

Referenced by UJsonFileManagerLibrary::SaveRadarDataToJson().

◆ operator=()

RadarData & carla::sensor::data::RadarData::operator= ( RadarData && )
default

References RadarData().

◆ Reset()

void carla::sensor::data::RadarData::Reset ( )
inline

Deletes the current detections.

It doesn't change the resolution nor the allocated memory.

Definition at line 64 of file RadarData.h.

References _detections.

Referenced by ARadar::PostPhysTick().

◆ SetResolution()

void carla::sensor::data::RadarData::SetResolution ( uint32_t resolution)
inline

Set a new resolution for the RadarData.

Allocates / Deallocates space in memory if needed.

Warning
This is expensive, not to be called each tick!

Definition at line 49 of file RadarData.h.

References _detections.

Referenced by ARadar::SetPointsPerSecond().

◆ WriteDetection()

void carla::sensor::data::RadarData::WriteDetection ( RadarDetection detection)
inline

Adds a new detection.

Definition at line 69 of file RadarData.h.

References _detections.

Referenced by ARadar::SendLineTraces().

◆ carla::ros2::ROS2

friend class carla::ros2::ROS2
friend

Definition at line 81 of file RadarData.h.

◆ s11n::RadarSerializer

friend class s11n::RadarSerializer
friend

Definition at line 80 of file RadarData.h.

Member Data Documentation

◆ _detections

std::vector<RadarDetection> carla::sensor::data::RadarData::_detections
private

◆ detection_size

auto carla::sensor::data::RadarData::detection_size = sizeof(RadarDetection)
staticconstexpr

Definition at line 41 of file RadarData.h.


The documentation for this class was generated from the following file: