Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
zivid_camera::ZividCamera Class Reference

#include <zivid_camera.h>

Public Member Functions

 ZividCamera (ros::NodeHandle &nh, ros::NodeHandle &priv)
 

Private Types

using Capture2DSettingsController = CaptureSettingsController< Zivid::Settings2D, Settings2DConfig, Settings2DAcquisitionConfig >
 
using Capture3DSettingsController = CaptureSettingsController< Zivid::Settings, SettingsConfig, SettingsAcquisitionConfig >
 

Private Member Functions

bool cameraInfoModelNameServiceHandler (CameraInfoModelName::Request &req, CameraInfoModelName::Response &res)
 
bool cameraInfoSerialNumberServiceHandler (CameraInfoSerialNumber::Request &req, CameraInfoSerialNumber::Response &res)
 
bool capture2DServiceHandler (Capture2D::Request &req, Capture2D::Response &res)
 
bool captureAssistantSuggestSettingsServiceHandler (CaptureAssistantSuggestSettings::Request &req, CaptureAssistantSuggestSettings::Response &res)
 
bool captureServiceHandler (Capture::Request &req, Capture::Response &res)
 
bool isConnectedServiceHandler (IsConnected::Request &req, IsConnected::Response &res)
 
sensor_msgs::CameraInfoConstPtr makeCameraInfo (const std_msgs::Header &header, std::size_t width, std::size_t height, const Zivid::CameraIntrinsics &intrinsics)
 
std_msgs::Header makeHeader ()
 
void onCameraConnectionKeepAliveTimeout (const ros::TimerEvent &event)
 
void publishColorImage (const std_msgs::Header &header, const sensor_msgs::CameraInfoConstPtr &camera_info, const Zivid::PointCloud &point_cloud)
 
void publishColorImage (const std_msgs::Header &header, const sensor_msgs::CameraInfoConstPtr &camera_info, const Zivid::Image< Zivid::ColorRGBA > &image)
 
void publishDepthImage (const std_msgs::Header &header, const sensor_msgs::CameraInfoConstPtr &camera_info, const Zivid::PointCloud &point_cloud)
 
void publishFrame (Zivid::Frame &&frame)
 
void publishPointCloudXYZ (const std_msgs::Header &header, const Zivid::PointCloud &point_cloud)
 
void publishPointCloudXYZRGBA (const std_msgs::Header &header, const Zivid::PointCloud &point_cloud)
 
void publishSnrImage (const std_msgs::Header &header, const sensor_msgs::CameraInfoConstPtr &camera_info, const Zivid::PointCloud &point_cloud)
 
void reconnectToCameraIfNecessary ()
 
void serviceHandlerHandleCameraConnectionLoss ()
 
void setCameraStatus (CameraStatus camera_status)
 
bool shouldPublishColorImg () const
 
bool shouldPublishDepthImg () const
 
bool shouldPublishPointsXYZ () const
 
bool shouldPublishPointsXYZRGBA () const
 
bool shouldPublishSnrImg () const
 

Private Attributes

Zivid::Camera camera_
 
ros::Timer camera_connection_keepalive_timer_
 
ros::ServiceServer camera_info_model_name_service_
 
ros::ServiceServer camera_info_serial_number_service_
 
CameraStatus camera_status_
 
ros::ServiceServer capture_2d_service_
 
std::unique_ptr< Capture2DSettingsControllercapture_2d_settings_controller_
 
ros::ServiceServer capture_assistant_suggest_settings_service_
 
ros::ServiceServer capture_service_
 
std::unique_ptr< Capture3DSettingsControllercapture_settings_controller_
 
image_transport::CameraPublisher color_image_publisher_
 
image_transport::CameraPublisher depth_image_publisher_
 
std::string frame_id_
 
unsigned int header_seq_
 
image_transport::ImageTransport image_transport_
 
ros::ServiceServer is_connected_service_
 
ros::NodeHandle nh_
 
ros::Publisher points_xyz_publisher_
 
ros::Publisher points_xyzrgba_publisher_
 
ros::NodeHandle priv_
 
image_transport::CameraPublisher snr_image_publisher_
 
bool use_latched_publisher_for_color_image_
 
bool use_latched_publisher_for_depth_image_
 
bool use_latched_publisher_for_points_xyz_
 
bool use_latched_publisher_for_points_xyzrgba_
 
bool use_latched_publisher_for_snr_image_
 
Zivid::Application zivid_
 

Detailed Description

Definition at line 33 of file zivid_camera.h.

Member Typedef Documentation

using zivid_camera::ZividCamera::Capture2DSettingsController = CaptureSettingsController<Zivid::Settings2D, Settings2DConfig, Settings2DAcquisitionConfig>
private

Definition at line 74 of file zivid_camera.h.

using zivid_camera::ZividCamera::Capture3DSettingsController = CaptureSettingsController<Zivid::Settings, SettingsConfig, SettingsAcquisitionConfig>
private

Definition at line 72 of file zivid_camera.h.

Constructor & Destructor Documentation

zivid_camera::ZividCamera::ZividCamera ( ros::NodeHandle nh,
ros::NodeHandle priv 
)

Definition at line 88 of file zivid_camera.cpp.

Member Function Documentation

bool zivid_camera::ZividCamera::cameraInfoModelNameServiceHandler ( CameraInfoModelName::Request &  req,
CameraInfoModelName::Response &  res 
)
private

Definition at line 303 of file zivid_camera.cpp.

bool zivid_camera::ZividCamera::cameraInfoSerialNumberServiceHandler ( CameraInfoSerialNumber::Request &  req,
CameraInfoSerialNumber::Response &  res 
)
private

Definition at line 310 of file zivid_camera.cpp.

bool zivid_camera::ZividCamera::capture2DServiceHandler ( Capture2D::Request &  req,
Capture2D::Response &  res 
)
private

Definition at line 336 of file zivid_camera.cpp.

bool zivid_camera::ZividCamera::captureAssistantSuggestSettingsServiceHandler ( CaptureAssistantSuggestSettings::Request &  req,
CaptureAssistantSuggestSettings::Response &  res 
)
private

Definition at line 362 of file zivid_camera.cpp.

bool zivid_camera::ZividCamera::captureServiceHandler ( Capture::Request &  req,
Capture::Response &  res 
)
private

Definition at line 317 of file zivid_camera.cpp.

bool zivid_camera::ZividCamera::isConnectedServiceHandler ( IsConnected::Request &  req,
IsConnected::Response &  res 
)
private

Definition at line 414 of file zivid_camera.cpp.

sensor_msgs::CameraInfoConstPtr zivid_camera::ZividCamera::makeCameraInfo ( const std_msgs::Header header,
std::size_t  width,
std::size_t  height,
const Zivid::CameraIntrinsics &  intrinsics 
)
private

Definition at line 583 of file zivid_camera.cpp.

std_msgs::Header zivid_camera::ZividCamera::makeHeader ( )
private

Definition at line 492 of file zivid_camera.cpp.

void zivid_camera::ZividCamera::onCameraConnectionKeepAliveTimeout ( const ros::TimerEvent event)
private

Definition at line 233 of file zivid_camera.cpp.

void zivid_camera::ZividCamera::publishColorImage ( const std_msgs::Header header,
const sensor_msgs::CameraInfoConstPtr &  camera_info,
const Zivid::PointCloud &  point_cloud 
)
private

Definition at line 547 of file zivid_camera.cpp.

void zivid_camera::ZividCamera::publishColorImage ( const std_msgs::Header header,
const sensor_msgs::CameraInfoConstPtr &  camera_info,
const Zivid::Image< Zivid::ColorRGBA > &  image 
)
private

Definition at line 555 of file zivid_camera.cpp.

void zivid_camera::ZividCamera::publishDepthImage ( const std_msgs::Header header,
const sensor_msgs::CameraInfoConstPtr &  camera_info,
const Zivid::PointCloud &  point_cloud 
)
private

Definition at line 567 of file zivid_camera.cpp.

void zivid_camera::ZividCamera::publishFrame ( Zivid::Frame &&  frame)
private

Definition at line 420 of file zivid_camera.cpp.

void zivid_camera::ZividCamera::publishPointCloudXYZ ( const std_msgs::Header header,
const Zivid::PointCloud &  point_cloud 
)
private

Definition at line 501 of file zivid_camera.cpp.

void zivid_camera::ZividCamera::publishPointCloudXYZRGBA ( const std_msgs::Header header,
const Zivid::PointCloud &  point_cloud 
)
private

Definition at line 524 of file zivid_camera.cpp.

void zivid_camera::ZividCamera::publishSnrImage ( const std_msgs::Header header,
const sensor_msgs::CameraInfoConstPtr &  camera_info,
const Zivid::PointCloud &  point_cloud 
)
private

Definition at line 575 of file zivid_camera.cpp.

void zivid_camera::ZividCamera::reconnectToCameraIfNecessary ( )
private

Definition at line 246 of file zivid_camera.cpp.

void zivid_camera::ZividCamera::serviceHandlerHandleCameraConnectionLoss ( )
private

Definition at line 404 of file zivid_camera.cpp.

void zivid_camera::ZividCamera::setCameraStatus ( CameraStatus  camera_status)
private

Definition at line 285 of file zivid_camera.cpp.

bool zivid_camera::ZividCamera::shouldPublishColorImg ( ) const
private

Definition at line 477 of file zivid_camera.cpp.

bool zivid_camera::ZividCamera::shouldPublishDepthImg ( ) const
private

Definition at line 482 of file zivid_camera.cpp.

bool zivid_camera::ZividCamera::shouldPublishPointsXYZ ( ) const
private

Definition at line 472 of file zivid_camera.cpp.

bool zivid_camera::ZividCamera::shouldPublishPointsXYZRGBA ( ) const
private

Definition at line 467 of file zivid_camera.cpp.

bool zivid_camera::ZividCamera::shouldPublishSnrImg ( ) const
private

Definition at line 487 of file zivid_camera.cpp.

Member Data Documentation

Zivid::Camera zivid_camera::ZividCamera::camera_
private

Definition at line 100 of file zivid_camera.h.

ros::Timer zivid_camera::ZividCamera::camera_connection_keepalive_timer_
private

Definition at line 78 of file zivid_camera.h.

ros::ServiceServer zivid_camera::ZividCamera::camera_info_model_name_service_
private

Definition at line 92 of file zivid_camera.h.

ros::ServiceServer zivid_camera::ZividCamera::camera_info_serial_number_service_
private

Definition at line 91 of file zivid_camera.h.

CameraStatus zivid_camera::ZividCamera::camera_status_
private

Definition at line 79 of file zivid_camera.h.

ros::ServiceServer zivid_camera::ZividCamera::capture_2d_service_
private

Definition at line 94 of file zivid_camera.h.

std::unique_ptr<Capture2DSettingsController> zivid_camera::ZividCamera::capture_2d_settings_controller_
private

Definition at line 98 of file zivid_camera.h.

ros::ServiceServer zivid_camera::ZividCamera::capture_assistant_suggest_settings_service_
private

Definition at line 95 of file zivid_camera.h.

ros::ServiceServer zivid_camera::ZividCamera::capture_service_
private

Definition at line 93 of file zivid_camera.h.

std::unique_ptr<Capture3DSettingsController> zivid_camera::ZividCamera::capture_settings_controller_
private

Definition at line 97 of file zivid_camera.h.

image_transport::CameraPublisher zivid_camera::ZividCamera::color_image_publisher_
private

Definition at line 88 of file zivid_camera.h.

image_transport::CameraPublisher zivid_camera::ZividCamera::depth_image_publisher_
private

Definition at line 89 of file zivid_camera.h.

std::string zivid_camera::ZividCamera::frame_id_
private

Definition at line 101 of file zivid_camera.h.

unsigned int zivid_camera::ZividCamera::header_seq_
private

Definition at line 102 of file zivid_camera.h.

image_transport::ImageTransport zivid_camera::ZividCamera::image_transport_
private

Definition at line 87 of file zivid_camera.h.

ros::ServiceServer zivid_camera::ZividCamera::is_connected_service_
private

Definition at line 96 of file zivid_camera.h.

ros::NodeHandle zivid_camera::ZividCamera::nh_
private

Definition at line 76 of file zivid_camera.h.

ros::Publisher zivid_camera::ZividCamera::points_xyz_publisher_
private

Definition at line 85 of file zivid_camera.h.

ros::Publisher zivid_camera::ZividCamera::points_xyzrgba_publisher_
private

Definition at line 86 of file zivid_camera.h.

ros::NodeHandle zivid_camera::ZividCamera::priv_
private

Definition at line 77 of file zivid_camera.h.

image_transport::CameraPublisher zivid_camera::ZividCamera::snr_image_publisher_
private

Definition at line 90 of file zivid_camera.h.

bool zivid_camera::ZividCamera::use_latched_publisher_for_color_image_
private

Definition at line 82 of file zivid_camera.h.

bool zivid_camera::ZividCamera::use_latched_publisher_for_depth_image_
private

Definition at line 83 of file zivid_camera.h.

bool zivid_camera::ZividCamera::use_latched_publisher_for_points_xyz_
private

Definition at line 80 of file zivid_camera.h.

bool zivid_camera::ZividCamera::use_latched_publisher_for_points_xyzrgba_
private

Definition at line 81 of file zivid_camera.h.

bool zivid_camera::ZividCamera::use_latched_publisher_for_snr_image_
private

Definition at line 84 of file zivid_camera.h.

Zivid::Application zivid_camera::ZividCamera::zivid_
private

Definition at line 99 of file zivid_camera.h.


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


zivid_camera
Author(s): Zivid
autogenerated on Sat Apr 17 2021 02:51:05