CARLA
Public Member Functions | Private Member Functions | Private Attributes | List of all members
carla::ros2::CarlaCollisionPublisher Class Reference

#include <CarlaCollisionPublisher.h>

+ Inheritance diagram for carla::ros2::CarlaCollisionPublisher:
+ Collaboration diagram for carla::ros2::CarlaCollisionPublisher:

Public Member Functions

 CarlaCollisionPublisher (const char *ros_name="", const char *parent="")
 
 CarlaCollisionPublisher (const CarlaCollisionPublisher &)
 
 CarlaCollisionPublisher (CarlaCollisionPublisher &&)
 
bool Init ()
 
CarlaCollisionPublisheroperator= (const CarlaCollisionPublisher &)
 
CarlaCollisionPublisheroperator= (CarlaCollisionPublisher &&)
 
bool Publish ()
 
void SetData (int32_t seconds, uint32_t nanoseconds, uint32_t actor_id, float x, float y, float z)
 
const char * type () const override
 
 ~CarlaCollisionPublisher ()
 
- Public Member Functions inherited from carla::ros2::CarlaPublisher
 CarlaPublisher ()=default
 
const std::string & frame_id () const
 
void frame_id (std::string &&frame_id)
 
const std::string & name () const
 
void name (std::string &&name)
 
const std::string & parent () const
 
void parent (std::string &&parent)
 
virtual ~CarlaPublisher ()=default
 

Private Member Functions

void SetData (int32_t seconds, uint32_t nanoseconds, uint32_t actor_id, std::vector< float > &&data)
 

Private Attributes

std::shared_ptr< CarlaCollisionPublisherImpl_impl
 

Additional Inherited Members

- Protected Attributes inherited from carla::ros2::CarlaPublisher
std::string _frame_id = ""
 
std::string _name = ""
 
std::string _parent = ""
 

Detailed Description

Definition at line 18 of file CarlaCollisionPublisher.h.

Constructor & Destructor Documentation

◆ CarlaCollisionPublisher() [1/3]

carla::ros2::CarlaCollisionPublisher::CarlaCollisionPublisher ( const char *  ros_name = "",
const char *  parent = "" 
)

Definition at line 176 of file CarlaCollisionPublisher.cpp.

References carla::ros2::CarlaPublisher::_name, carla::ros2::CarlaPublisher::_parent, and carla::ros2::CarlaPublisher::parent().

+ Here is the call graph for this function:

◆ ~CarlaCollisionPublisher()

carla::ros2::CarlaCollisionPublisher::~CarlaCollisionPublisher ( )

Definition at line 182 of file CarlaCollisionPublisher.cpp.

References _impl.

◆ CarlaCollisionPublisher() [2/3]

carla::ros2::CarlaCollisionPublisher::CarlaCollisionPublisher ( const CarlaCollisionPublisher other)

◆ CarlaCollisionPublisher() [3/3]

carla::ros2::CarlaCollisionPublisher::CarlaCollisionPublisher ( CarlaCollisionPublisher &&  other)

Member Function Documentation

◆ Init()

bool carla::ros2::CarlaCollisionPublisher::Init ( )

Definition at line 43 of file CarlaCollisionPublisher.cpp.

◆ operator=() [1/2]

CarlaCollisionPublisher & carla::ros2::CarlaCollisionPublisher::operator= ( const CarlaCollisionPublisher other)

◆ operator=() [2/2]

CarlaCollisionPublisher & carla::ros2::CarlaCollisionPublisher::operator= ( CarlaCollisionPublisher &&  other)

◆ Publish()

bool carla::ros2::CarlaCollisionPublisher::Publish ( )

Definition at line 91 of file CarlaCollisionPublisher.cpp.

◆ SetData() [1/2]

void carla::ros2::CarlaCollisionPublisher::SetData ( int32_t  seconds,
uint32_t  nanoseconds,
uint32_t  actor_id,
float  x,
float  y,
float  z 
)

Definition at line 153 of file CarlaCollisionPublisher.cpp.

Referenced by carla::ros2::ROS2::ProcessDataFromCollisionSensor(), and type().

+ Here is the caller graph for this function:

◆ SetData() [2/2]

void carla::ros2::CarlaCollisionPublisher::SetData ( int32_t  seconds,
uint32_t  nanoseconds,
uint32_t  actor_id,
std::vector< float > &&  data 
)
private

Definition at line 158 of file CarlaCollisionPublisher.cpp.

References std_msgs::msg::Header::frame_id(), builtin_interfaces::msg::Time::nanosec(), builtin_interfaces::msg::Time::sec(), std_msgs::msg::Header::stamp(), geometry_msgs::msg::Vector3::x(), geometry_msgs::msg::Vector3::y(), and geometry_msgs::msg::Vector3::z().

+ Here is the call graph for this function:

◆ type()

const char* carla::ros2::CarlaCollisionPublisher::type ( ) const
inlineoverridevirtual

Implements carla::ros2::CarlaPublisher.

Definition at line 30 of file CarlaCollisionPublisher.h.

References SetData().

+ Here is the call graph for this function:

Member Data Documentation

◆ _impl

std::shared_ptr<CarlaCollisionPublisherImpl> carla::ros2::CarlaCollisionPublisher::_impl
private

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