6 #include <sensor_msgs/PointCloud2.h> 7 #include <sensor_msgs/Image.h> 11 #include <dynamic_reconfigure/server.h> 15 #include <Zivid/Application.h> 16 #include <Zivid/Camera.h> 17 #include <Zivid/Image.h> 40 void reconnectToCameraIfNecessary();
42 bool cameraInfoModelNameServiceHandler(CameraInfoModelName::Request& req, CameraInfoModelName::Response& res);
43 bool cameraInfoSerialNumberServiceHandler(CameraInfoSerialNumber::Request& req,
44 CameraInfoSerialNumber::Response& res);
45 bool captureServiceHandler(Capture::Request& req, Capture::Response& res);
46 bool capture2DServiceHandler(Capture2D::Request& req, Capture2D::Response& res);
47 bool captureAssistantSuggestSettingsServiceHandler(CaptureAssistantSuggestSettings::Request& req,
48 CaptureAssistantSuggestSettings::Response& res);
49 void serviceHandlerHandleCameraConnectionLoss();
50 bool isConnectedServiceHandler(IsConnected::Request& req, IsConnected::Response& res);
51 void publishFrame(Zivid::Frame&& frame);
52 bool shouldPublishPointsXYZ()
const;
53 bool shouldPublishPointsXYZRGBA()
const;
54 bool shouldPublishColorImg()
const;
55 bool shouldPublishDepthImg()
const;
56 bool shouldPublishSnrImg()
const;
57 std_msgs::Header makeHeader();
58 void publishPointCloudXYZ(
const std_msgs::Header& header,
const Zivid::PointCloud& point_cloud);
59 void publishPointCloudXYZRGBA(
const std_msgs::Header& header,
const Zivid::PointCloud& point_cloud);
60 void publishColorImage(
const std_msgs::Header& header,
const sensor_msgs::CameraInfoConstPtr& camera_info,
61 const Zivid::PointCloud& point_cloud);
62 void publishColorImage(
const std_msgs::Header& header,
const sensor_msgs::CameraInfoConstPtr& camera_info,
63 const Zivid::Image<Zivid::ColorRGBA>& image);
64 void publishDepthImage(
const std_msgs::Header& header,
const sensor_msgs::CameraInfoConstPtr& camera_info,
65 const Zivid::PointCloud& point_cloud);
66 void publishSnrImage(
const std_msgs::Header& header,
const sensor_msgs::CameraInfoConstPtr& camera_info,
67 const Zivid::PointCloud& point_cloud);
68 sensor_msgs::CameraInfoConstPtr makeCameraInfo(
const std_msgs::Header& header, std::size_t width, std::size_t height,
69 const Zivid::CameraIntrinsics& intrinsics);
std::unique_ptr< Capture2DSettingsController > capture_2d_settings_controller_
bool use_latched_publisher_for_color_image_
image_transport::ImageTransport image_transport_
CameraStatus camera_status_
ros::ServiceServer is_connected_service_
ros::ServiceServer capture_assistant_suggest_settings_service_
image_transport::CameraPublisher snr_image_publisher_
bool use_latched_publisher_for_depth_image_
bool use_latched_publisher_for_points_xyz_
ros::Publisher points_xyz_publisher_
Zivid::Application zivid_
bool use_latched_publisher_for_points_xyzrgba_
ros::ServiceServer capture_2d_service_
ros::ServiceServer capture_service_
image_transport::CameraPublisher depth_image_publisher_
Controller that manages dynamic_reconfigure nodes for Settings and Settings2D
std::unique_ptr< Capture3DSettingsController > capture_settings_controller_
ros::ServiceServer camera_info_model_name_service_
ros::Timer camera_connection_keepalive_timer_
bool use_latched_publisher_for_snr_image_
ros::ServiceServer camera_info_serial_number_service_
ros::Publisher points_xyzrgba_publisher_
image_transport::CameraPublisher color_image_publisher_