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

A registered detection. More...

#include <ObstacleDetectionEvent.h>

Inheritance diagram for carla::sensor::data::ObstacleDetectionEvent:

Public Member Functions

SharedPtr< client::Actor > GetActor () const
 Get "self" actor. Actor that measured the collision.
float GetDistance () const
 Get obstacle distance.
SharedPtr< client::Actor > GetOtherActor () const
 Get the actor to which we collided.
Public Member Functions inherited from carla::sensor::SensorData
size_t GetFrame () const
 Frame count when the data was generated.
const rpc::Transform & GetSensorTransform () const
 Sensor's transform when the data was generated.
double GetTimestamp () const
 Simulation-time when the data was generated.
virtual ~SensorData ()=default

Protected Types

using Serializer = s11n::ObstacleDetectionEventSerializer

Protected Member Functions

 ObstacleDetectionEvent (const RawData &data)
Protected Member Functions inherited from carla::sensor::SensorData
const auto & GetEpisode () const
 SensorData (const RawData &data)
 SensorData (size_t frame, double timestamp, const rpc::Transform &sensor_transform)

Protected Attributes

friend Serializer

Private Types

using Super = SensorData

Private Attributes

float _distance
client::detail::ActorVariant _other_actor
client::detail::ActorVariant _self_actor

Detailed Description

A registered detection.

Definition at line 20 of file ObstacleDetectionEvent.h.

Member Typedef Documentation

◆ Serializer

◆ Super

Constructor & Destructor Documentation

◆ ObstacleDetectionEvent()

carla::sensor::data::ObstacleDetectionEvent::ObstacleDetectionEvent ( const RawData & data)
inlineexplicitprotected

Member Function Documentation

◆ GetActor()

SharedPtr< client::Actor > carla::sensor::data::ObstacleDetectionEvent::GetActor ( ) const
inline

Get "self" actor. Actor that measured the collision.

Definition at line 41 of file ObstacleDetectionEvent.h.

References _self_actor, carla::client::detail::ActorVariant::Get(), and carla::sensor::SensorData::GetEpisode().

◆ GetDistance()

float carla::sensor::data::ObstacleDetectionEvent::GetDistance ( ) const
inline

Get obstacle distance.

Definition at line 51 of file ObstacleDetectionEvent.h.

References _distance.

◆ GetOtherActor()

SharedPtr< client::Actor > carla::sensor::data::ObstacleDetectionEvent::GetOtherActor ( ) const
inline

Get the actor to which we collided.

Definition at line 46 of file ObstacleDetectionEvent.h.

References _other_actor, carla::client::detail::ActorVariant::Get(), and carla::sensor::SensorData::GetEpisode().

Member Data Documentation

◆ _distance

float carla::sensor::data::ObstacleDetectionEvent::_distance
private

Definition at line 61 of file ObstacleDetectionEvent.h.

Referenced by GetDistance(), and ObstacleDetectionEvent().

◆ _other_actor

client::detail::ActorVariant carla::sensor::data::ObstacleDetectionEvent::_other_actor
private

Definition at line 59 of file ObstacleDetectionEvent.h.

Referenced by GetOtherActor(), and ObstacleDetectionEvent().

◆ _self_actor

client::detail::ActorVariant carla::sensor::data::ObstacleDetectionEvent::_self_actor
private

Definition at line 57 of file ObstacleDetectionEvent.h.

Referenced by GetActor(), and ObstacleDetectionEvent().

◆ Serializer


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