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

#include <CarlaOpticalFlowCameraPublisher.h>

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

Public Member Functions

 CarlaOpticalFlowCameraPublisher (const char *ros_name="", const char *parent="")
 
 CarlaOpticalFlowCameraPublisher (const CarlaOpticalFlowCameraPublisher &)
 
 CarlaOpticalFlowCameraPublisher (CarlaOpticalFlowCameraPublisher &&)
 
bool HasBeenInitialized () const
 
bool Init ()
 
void InitInfoData (uint32_t x_offset, uint32_t y_offset, uint32_t height, uint32_t width, float fov, bool do_rectify)
 
CarlaOpticalFlowCameraPublisheroperator= (const CarlaOpticalFlowCameraPublisher &)
 
CarlaOpticalFlowCameraPublisheroperator= (CarlaOpticalFlowCameraPublisher &&)
 
bool Publish ()
 
void SetCameraInfoData (int32_t seconds, uint32_t nanoseconds)
 
void SetImageData (int32_t seconds, uint32_t nanoseconds, size_t height, size_t width, const float *data)
 
const char * type () const override
 
 ~CarlaOpticalFlowCameraPublisher ()
 
- 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

bool InitImage ()
 
bool InitInfo ()
 
bool PublishImage ()
 
bool PublishInfo ()
 
void SetData (int32_t seconds, uint32_t nanoseconds, size_t height, size_t width, std::vector< uint8_t > &&data)
 
void SetInfoRegionOfInterest (uint32_t x_offset, uint32_t y_offset, uint32_t height, uint32_t width, bool do_rectify)
 

Private Attributes

std::shared_ptr< CarlaOpticalFlowCameraPublisherImpl_impl
 
std::shared_ptr< CarlaCameraInfoPublisherImpl_impl_info
 

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 19 of file CarlaOpticalFlowCameraPublisher.h.

Constructor & Destructor Documentation

◆ CarlaOpticalFlowCameraPublisher() [1/3]

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

Definition at line 422 of file CarlaOpticalFlowCameraPublisher.cpp.

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

+ Here is the call graph for this function:

◆ ~CarlaOpticalFlowCameraPublisher()

carla::ros2::CarlaOpticalFlowCameraPublisher::~CarlaOpticalFlowCameraPublisher ( )

Definition at line 429 of file CarlaOpticalFlowCameraPublisher.cpp.

References _impl, and _impl_info.

◆ CarlaOpticalFlowCameraPublisher() [2/3]

carla::ros2::CarlaOpticalFlowCameraPublisher::CarlaOpticalFlowCameraPublisher ( const CarlaOpticalFlowCameraPublisher other)

◆ CarlaOpticalFlowCameraPublisher() [3/3]

carla::ros2::CarlaOpticalFlowCameraPublisher::CarlaOpticalFlowCameraPublisher ( CarlaOpticalFlowCameraPublisher &&  other)

Member Function Documentation

◆ HasBeenInitialized()

bool carla::ros2::CarlaOpticalFlowCameraPublisher::HasBeenInitialized ( ) const

Definition at line 59 of file CarlaOpticalFlowCameraPublisher.cpp.

◆ Init()

bool carla::ros2::CarlaOpticalFlowCameraPublisher::Init ( )

Definition at line 69 of file CarlaOpticalFlowCameraPublisher.cpp.

◆ InitImage()

bool carla::ros2::CarlaOpticalFlowCameraPublisher::InitImage ( )
private

Definition at line 73 of file CarlaOpticalFlowCameraPublisher.cpp.

Referenced by type().

+ Here is the caller graph for this function:

◆ InitInfo()

bool carla::ros2::CarlaOpticalFlowCameraPublisher::InitInfo ( )
private

Definition at line 122 of file CarlaOpticalFlowCameraPublisher.cpp.

Referenced by type().

+ Here is the caller graph for this function:

◆ InitInfoData()

void carla::ros2::CarlaOpticalFlowCameraPublisher::InitInfoData ( uint32_t  x_offset,
uint32_t  y_offset,
uint32_t  height,
uint32_t  width,
float  fov,
bool  do_rectify 
)

Definition at line 63 of file CarlaOpticalFlowCameraPublisher.cpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ Publish()

bool carla::ros2::CarlaOpticalFlowCameraPublisher::Publish ( )

Definition at line 170 of file CarlaOpticalFlowCameraPublisher.cpp.

◆ PublishImage()

bool carla::ros2::CarlaOpticalFlowCameraPublisher::PublishImage ( )
private

Definition at line 174 of file CarlaOpticalFlowCameraPublisher.cpp.

Referenced by type().

+ Here is the caller graph for this function:

◆ PublishInfo()

bool carla::ros2::CarlaOpticalFlowCameraPublisher::PublishInfo ( )
private

Definition at line 236 of file CarlaOpticalFlowCameraPublisher.cpp.

Referenced by type().

+ Here is the caller graph for this function:

◆ SetCameraInfoData()

void carla::ros2::CarlaOpticalFlowCameraPublisher::SetCameraInfoData ( int32_t  seconds,
uint32_t  nanoseconds 
)

Definition at line 411 of file CarlaOpticalFlowCameraPublisher.cpp.

References std_msgs::msg::Header::frame_id(), builtin_interfaces::msg::Time::nanosec(), builtin_interfaces::msg::Time::sec(), and std_msgs::msg::Header::stamp().

+ Here is the call graph for this function:

◆ SetData()

void carla::ros2::CarlaOpticalFlowCameraPublisher::SetData ( int32_t  seconds,
uint32_t  nanoseconds,
size_t  height,
size_t  width,
std::vector< uint8_t > &&  data 
)
private

Definition at line 393 of file CarlaOpticalFlowCameraPublisher.cpp.

References std_msgs::msg::Header::frame_id(), builtin_interfaces::msg::Time::nanosec(), builtin_interfaces::msg::Time::sec(), and std_msgs::msg::Header::stamp().

Referenced by type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetImageData()

void carla::ros2::CarlaOpticalFlowCameraPublisher::SetImageData ( int32_t  seconds,
uint32_t  nanoseconds,
size_t  height,
size_t  width,
const float *  data 
)

Definition at line 298 of file CarlaOpticalFlowCameraPublisher.cpp.

References carla::logging::log().

+ Here is the call graph for this function:

◆ SetInfoRegionOfInterest()

void carla::ros2::CarlaOpticalFlowCameraPublisher::SetInfoRegionOfInterest ( uint32_t  x_offset,
uint32_t  y_offset,
uint32_t  height,
uint32_t  width,
bool  do_rectify 
)
private

Definition at line 383 of file CarlaOpticalFlowCameraPublisher.cpp.

References sensor_msgs::msg::RegionOfInterest::do_rectify(), sensor_msgs::msg::RegionOfInterest::height(), sensor_msgs::msg::RegionOfInterest::width(), sensor_msgs::msg::RegionOfInterest::x_offset(), and sensor_msgs::msg::RegionOfInterest::y_offset().

Referenced by type().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ type()

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

Implements carla::ros2::CarlaPublisher.

Definition at line 35 of file CarlaOpticalFlowCameraPublisher.h.

References InitImage(), InitInfo(), PublishImage(), PublishInfo(), SetData(), and SetInfoRegionOfInterest().

+ Here is the call graph for this function:

Member Data Documentation

◆ _impl

std::shared_ptr<CarlaOpticalFlowCameraPublisherImpl> carla::ros2::CarlaOpticalFlowCameraPublisher::_impl
private

◆ _impl_info

std::shared_ptr<CarlaCameraInfoPublisherImpl> carla::ros2::CarlaOpticalFlowCameraPublisher::_impl_info
private

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