CARLA
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Attributes | List of all members
carla::sensor::data::ObstacleDetectionEvent Class Reference

A registered detection. More...

#include <ObstacleDetectionEvent.h>

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

Public Member Functions

SharedPtr< client::ActorGetActor () const
 Get "self" actor. Actor that measured the collision. More...
 
float GetDistance () const
 Get obstacle distance. More...
 
SharedPtr< client::ActorGetOtherActor () const
 Get the actor to which we collided. More...
 
- Public Member Functions inherited from carla::sensor::SensorData
size_t GetFrame () const
 Frame count when the data was generated. More...
 
const rpc::TransformGetSensorTransform () const
 Sensor's transform when the data was generated. More...
 
double GetTimestamp () const
 Simulation-time when the data was generated. More...
 
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 (size_t frame, double timestamp, const rpc::Transform &sensor_transform)
 
 SensorData (const RawData &data)
 

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

Definition at line 24 of file ObstacleDetectionEvent.h.

◆ Super

Definition at line 21 of file ObstacleDetectionEvent.h.

Constructor & Destructor Documentation

◆ ObstacleDetectionEvent()

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

Definition at line 28 of file ObstacleDetectionEvent.h.

References _distance, _other_actor, _self_actor, and carla::sensor::s11n::ObstacleDetectionEventSerializer::DeserializeRawData().

+ Here is the call graph for this function:

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().

+ Here is the call graph for this function:

◆ 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().

+ Here is the call graph for this function:

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

Definition at line 26 of file ObstacleDetectionEvent.h.


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