#include <CarlaDepthCameraPublisher.h>
Public Member Functions | |
CarlaDepthCameraPublisher (const char *ros_name="", const char *parent="") | |
CarlaDepthCameraPublisher (const CarlaDepthCameraPublisher &) | |
CarlaDepthCameraPublisher (CarlaDepthCameraPublisher &&) | |
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) |
CarlaDepthCameraPublisher & | operator= (const CarlaDepthCameraPublisher &) |
CarlaDepthCameraPublisher & | operator= (CarlaDepthCameraPublisher &&) |
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 uint8_t *data) |
const char * | type () const override |
~CarlaDepthCameraPublisher () | |
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< CarlaDepthCameraPublisherImpl > | _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 = "" |
Definition at line 19 of file CarlaDepthCameraPublisher.h.
carla::ros2::CarlaDepthCameraPublisher::CarlaDepthCameraPublisher | ( | const char * | ros_name = "" , |
const char * | parent = "" |
||
) |
Definition at line 340 of file CarlaDepthCameraPublisher.cpp.
References carla::ros2::CarlaPublisher::_name, carla::ros2::CarlaPublisher::_parent, and carla::ros2::CarlaPublisher::parent().
carla::ros2::CarlaDepthCameraPublisher::~CarlaDepthCameraPublisher | ( | ) |
Definition at line 347 of file CarlaDepthCameraPublisher.cpp.
References _impl, and _impl_info.
carla::ros2::CarlaDepthCameraPublisher::CarlaDepthCameraPublisher | ( | const CarlaDepthCameraPublisher & | other | ) |
Definition at line 379 of file CarlaDepthCameraPublisher.cpp.
References carla::ros2::CarlaPublisher::_frame_id, _impl, _impl_info, carla::ros2::CarlaPublisher::_name, and carla::ros2::CarlaPublisher::_parent.
carla::ros2::CarlaDepthCameraPublisher::CarlaDepthCameraPublisher | ( | CarlaDepthCameraPublisher && | other | ) |
Definition at line 397 of file CarlaDepthCameraPublisher.cpp.
References carla::ros2::CarlaPublisher::_frame_id, _impl, _impl_info, carla::ros2::CarlaPublisher::_name, and carla::ros2::CarlaPublisher::_parent.
bool carla::ros2::CarlaDepthCameraPublisher::HasBeenInitialized | ( | ) | const |
Definition at line 55 of file CarlaDepthCameraPublisher.cpp.
bool carla::ros2::CarlaDepthCameraPublisher::Init | ( | ) |
Definition at line 65 of file CarlaDepthCameraPublisher.cpp.
|
private |
Definition at line 69 of file CarlaDepthCameraPublisher.cpp.
Referenced by type().
|
private |
Definition at line 118 of file CarlaDepthCameraPublisher.cpp.
Referenced by type().
void carla::ros2::CarlaDepthCameraPublisher::InitInfoData | ( | uint32_t | x_offset, |
uint32_t | y_offset, | ||
uint32_t | height, | ||
uint32_t | width, | ||
float | fov, | ||
bool | do_rectify | ||
) |
Definition at line 59 of file CarlaDepthCameraPublisher.cpp.
CarlaDepthCameraPublisher & carla::ros2::CarlaDepthCameraPublisher::operator= | ( | const CarlaDepthCameraPublisher & | other | ) |
Definition at line 387 of file CarlaDepthCameraPublisher.cpp.
References carla::ros2::CarlaPublisher::_frame_id, _impl, _impl_info, carla::ros2::CarlaPublisher::_name, and carla::ros2::CarlaPublisher::_parent.
CarlaDepthCameraPublisher & carla::ros2::CarlaDepthCameraPublisher::operator= | ( | CarlaDepthCameraPublisher && | other | ) |
Definition at line 406 of file CarlaDepthCameraPublisher.cpp.
References carla::ros2::CarlaPublisher::_frame_id, _impl, _impl_info, carla::ros2::CarlaPublisher::_name, and carla::ros2::CarlaPublisher::_parent.
bool carla::ros2::CarlaDepthCameraPublisher::Publish | ( | ) |
Definition at line 166 of file CarlaDepthCameraPublisher.cpp.
|
private |
Definition at line 170 of file CarlaDepthCameraPublisher.cpp.
Referenced by type().
|
private |
Definition at line 232 of file CarlaDepthCameraPublisher.cpp.
Referenced by type().
void carla::ros2::CarlaDepthCameraPublisher::SetCameraInfoData | ( | int32_t | seconds, |
uint32_t | nanoseconds | ||
) |
Definition at line 329 of file CarlaDepthCameraPublisher.cpp.
References std_msgs::msg::Header::frame_id(), builtin_interfaces::msg::Time::nanosec(), builtin_interfaces::msg::Time::sec(), and std_msgs::msg::Header::stamp().
|
private |
Definition at line 311 of file CarlaDepthCameraPublisher.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().
void carla::ros2::CarlaDepthCameraPublisher::SetImageData | ( | int32_t | seconds, |
uint32_t | nanoseconds, | ||
size_t | height, | ||
size_t | width, | ||
const uint8_t * | data | ||
) |
Definition at line 294 of file CarlaDepthCameraPublisher.cpp.
|
private |
Definition at line 301 of file CarlaDepthCameraPublisher.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().
|
inlineoverridevirtual |
Implements carla::ros2::CarlaPublisher.
Definition at line 35 of file CarlaDepthCameraPublisher.h.
References InitImage(), InitInfo(), PublishImage(), PublishInfo(), SetData(), and SetInfoRegionOfInterest().
|
private |
Definition at line 47 of file CarlaDepthCameraPublisher.h.
Referenced by CarlaDepthCameraPublisher(), operator=(), and ~CarlaDepthCameraPublisher().
|
private |
Definition at line 48 of file CarlaDepthCameraPublisher.h.
Referenced by CarlaDepthCameraPublisher(), operator=(), and ~CarlaDepthCameraPublisher().