#include <CarlaDVSCameraPublisher.h>
Public Member Functions | |
CarlaDVSCameraPublisher (const char *ros_name="", const char *parent="") | |
CarlaDVSCameraPublisher (const CarlaDVSCameraPublisher &) | |
CarlaDVSCameraPublisher (CarlaDVSCameraPublisher &&) | |
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) |
CarlaDVSCameraPublisher & | operator= (const CarlaDVSCameraPublisher &) |
CarlaDVSCameraPublisher & | operator= (CarlaDVSCameraPublisher &&) |
bool | Publish () |
void | SetCameraInfoData (int32_t seconds, uint32_t nanoseconds) |
void | SetImageData (int32_t seconds, uint32_t nanoseconds, size_t elements, size_t height, size_t width, const uint8_t *data) |
void | SetPointCloudData (size_t height, size_t width, size_t elements, const uint8_t *data) |
const char * | type () const override |
~CarlaDVSCameraPublisher () | |
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 | InitPointCloud () |
bool | PublishImage () |
bool | PublishInfo () |
bool | PublishPointCloud () |
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) |
void | SetPointCloudData (size_t height, size_t width, std::vector< uint8_t > &&data) |
Private Attributes | |
std::shared_ptr< CarlaDVSCameraPublisherImpl > | _impl |
std::shared_ptr< CarlaCameraInfoPublisherImpl > | _info |
std::shared_ptr< CarlaPointCloudPublisherImpl > | _point_cloud |
Additional Inherited Members | |
Protected Attributes inherited from carla::ros2::CarlaPublisher | |
std::string | _frame_id = "" |
std::string | _name = "" |
std::string | _parent = "" |
Definition at line 20 of file CarlaDVSCameraPublisher.h.
carla::ros2::CarlaDVSCameraPublisher::CarlaDVSCameraPublisher | ( | const char * | ros_name = "" , |
const char * | parent = "" |
||
) |
Definition at line 510 of file CarlaDVSCameraPublisher.cpp.
References carla::ros2::CarlaPublisher::_name, carla::ros2::CarlaPublisher::_parent, and carla::ros2::CarlaPublisher::parent().
carla::ros2::CarlaDVSCameraPublisher::~CarlaDVSCameraPublisher | ( | ) |
Definition at line 518 of file CarlaDVSCameraPublisher.cpp.
References _impl, _info, and _point_cloud.
carla::ros2::CarlaDVSCameraPublisher::CarlaDVSCameraPublisher | ( | const CarlaDVSCameraPublisher & | other | ) |
Definition at line 565 of file CarlaDVSCameraPublisher.cpp.
References carla::ros2::CarlaPublisher::_frame_id, _impl, _info, carla::ros2::CarlaPublisher::_name, carla::ros2::CarlaPublisher::_parent, and _point_cloud.
carla::ros2::CarlaDVSCameraPublisher::CarlaDVSCameraPublisher | ( | CarlaDVSCameraPublisher && | other | ) |
Definition at line 585 of file CarlaDVSCameraPublisher.cpp.
References carla::ros2::CarlaPublisher::_frame_id, _impl, _info, carla::ros2::CarlaPublisher::_name, carla::ros2::CarlaPublisher::_parent, and _point_cloud.
bool carla::ros2::CarlaDVSCameraPublisher::HasBeenInitialized | ( | ) | const |
Definition at line 68 of file CarlaDVSCameraPublisher.cpp.
bool carla::ros2::CarlaDVSCameraPublisher::Init | ( | ) |
Definition at line 78 of file CarlaDVSCameraPublisher.cpp.
|
private |
Definition at line 82 of file CarlaDVSCameraPublisher.cpp.
Referenced by type().
|
private |
Definition at line 131 of file CarlaDVSCameraPublisher.cpp.
Referenced by type().
void carla::ros2::CarlaDVSCameraPublisher::InitInfoData | ( | uint32_t | x_offset, |
uint32_t | y_offset, | ||
uint32_t | height, | ||
uint32_t | width, | ||
float | fov, | ||
bool | do_rectify | ||
) |
Definition at line 72 of file CarlaDVSCameraPublisher.cpp.
|
private |
Definition at line 179 of file CarlaDVSCameraPublisher.cpp.
Referenced by type().
CarlaDVSCameraPublisher & carla::ros2::CarlaDVSCameraPublisher::operator= | ( | const CarlaDVSCameraPublisher & | other | ) |
Definition at line 574 of file CarlaDVSCameraPublisher.cpp.
References carla::ros2::CarlaPublisher::_frame_id, _impl, _info, carla::ros2::CarlaPublisher::_name, carla::ros2::CarlaPublisher::_parent, and _point_cloud.
CarlaDVSCameraPublisher & carla::ros2::CarlaDVSCameraPublisher::operator= | ( | CarlaDVSCameraPublisher && | other | ) |
Definition at line 594 of file CarlaDVSCameraPublisher.cpp.
References carla::ros2::CarlaPublisher::_frame_id, _impl, _info, carla::ros2::CarlaPublisher::_name, carla::ros2::CarlaPublisher::_parent, and _point_cloud.
bool carla::ros2::CarlaDVSCameraPublisher::Publish | ( | ) |
Definition at line 228 of file CarlaDVSCameraPublisher.cpp.
|
private |
Definition at line 232 of file CarlaDVSCameraPublisher.cpp.
Referenced by type().
|
private |
Definition at line 294 of file CarlaDVSCameraPublisher.cpp.
Referenced by type().
|
private |
Definition at line 356 of file CarlaDVSCameraPublisher.cpp.
Referenced by type().
void carla::ros2::CarlaDVSCameraPublisher::SetCameraInfoData | ( | int32_t | seconds, |
uint32_t | nanoseconds | ||
) |
Definition at line 451 of file CarlaDVSCameraPublisher.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 431 of file CarlaDVSCameraPublisher.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::CarlaDVSCameraPublisher::SetImageData | ( | int32_t | seconds, |
uint32_t | nanoseconds, | ||
size_t | elements, | ||
size_t | height, | ||
size_t | width, | ||
const uint8_t * | data | ||
) |
Definition at line 418 of file CarlaDVSCameraPublisher.cpp.
References carla::sensor::data::DVSEvent::pol, carla::sensor::data::DVSEvent::x, and carla::sensor::data::DVSEvent::y.
|
private |
Definition at line 461 of file CarlaDVSCameraPublisher.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().
void carla::ros2::CarlaDVSCameraPublisher::SetPointCloudData | ( | size_t | height, |
size_t | width, | ||
size_t | elements, | ||
const uint8_t * | data | ||
) |
Definition at line 471 of file CarlaDVSCameraPublisher.cpp.
References sensor_msgs::msg::PointField::count(), sensor_msgs::msg::PointField::datatype(), sensor_msgs::msg::PointField::name(), sensor_msgs::msg::PointField::offset(), sensor_msgs::msg::PointField__FLOAT64, sensor_msgs::msg::PointField__INT8, and sensor_msgs::msg::PointField__UINT16.
Referenced by type().
|
private |
|
inlineoverridevirtual |
Implements carla::ros2::CarlaPublisher.
Definition at line 37 of file CarlaDVSCameraPublisher.h.
References InitImage(), InitInfo(), InitPointCloud(), PublishImage(), PublishInfo(), PublishPointCloud(), SetData(), SetInfoRegionOfInterest(), and SetPointCloudData().
|
private |
Definition at line 53 of file CarlaDVSCameraPublisher.h.
Referenced by CarlaDVSCameraPublisher(), operator=(), and ~CarlaDVSCameraPublisher().
|
private |
Definition at line 54 of file CarlaDVSCameraPublisher.h.
Referenced by CarlaDVSCameraPublisher(), operator=(), and ~CarlaDVSCameraPublisher().
|
private |
Definition at line 55 of file CarlaDVSCameraPublisher.h.
Referenced by CarlaDVSCameraPublisher(), operator=(), and ~CarlaDVSCameraPublisher().