mono_camera.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #include <ensenso_camera_msgs/RequestDataMonoAction.h>
6 #include <ensenso_camera_msgs/LocatePatternMonoAction.h>
7 
10 
11 class MonoCamera : public Camera
12 {
13 private:
14  sensor_msgs::CameraInfoPtr cameraInfo;
15  sensor_msgs::CameraInfoPtr rectifiedCameraInfo;
16 
17  std::unique_ptr<RequestDataMonoServer> requestDataServer;
18  std::unique_ptr<LocatePatternMonoServer> locatePatternServer;
19 
22 
23 public:
24  MonoCamera(ros::NodeHandle nh, std::string serial, std::string fileCameraPath, bool fixed, std::string cameraFrame,
25  std::string targetFrame, std::string linkFrame);
26 
27  bool open() override;
28 
29  void startServers() const override;
30 
34  void onRequestData(ensenso_camera_msgs::RequestDataMonoGoalConstPtr const& goal);
35 
36  void onLocatePattern(ensenso_camera_msgs::LocatePatternMonoGoalConstPtr const& goal);
37 
38  void onSetParameter(ensenso_camera_msgs::SetParameterGoalConstPtr const& goal) override;
39 
40  ros::Time capture() const override;
41 
42 private:
43  void updateCameraInfo() override;
44  void fillCameraInfoFromNxLib(sensor_msgs::CameraInfoPtr const& info, bool rectified = false);
45 
46  std::vector<MonoCalibrationPattern> collectPattern(bool clearBuffer = false) const;
47 
58  geometry_msgs::TransformStamped estimatePatternPose(ros::Time imageTimestamp = ros::Time::now(),
59  std::string const& targetFrame = "",
60  bool latestPatternOnly = false) const override;
61 
65  std::vector<geometry_msgs::TransformStamped> estimatePatternPoses(ros::Time imageTimestamp = ros::Time::now(),
66  std::string const& targetFrame = "") const override;
67 };
bool fixed
Definition: camera.h:197
std::string targetFrame
Definition: camera.h:201
void onRequestData(ensenso_camera_msgs::RequestDataMonoGoalConstPtr const &goal)
std::unique_ptr< LocatePatternMonoServer > locatePatternServer
Definition: mono_camera.h:18
MonoCamera(ros::NodeHandle nh, std::string serial, std::string fileCameraPath, bool fixed, std::string cameraFrame, std::string targetFrame, std::string linkFrame)
Definition: mono_camera.cpp:6
ros::NodeHandle nh
Definition: camera.h:203
ros::Time capture() const override
Definition: mono_camera.cpp:24
void fillCameraInfoFromNxLib(sensor_msgs::CameraInfoPtr const &info, bool rectified=false)
Definition: mono_camera.cpp:64
sensor_msgs::CameraInfoPtr rectifiedCameraInfo
Definition: mono_camera.h:15
image_transport::CameraPublisher rectifiedImagePublisher
Definition: mono_camera.h:21
std::string cameraFrame
Definition: camera.h:199
std::string serial
Definition: camera.h:190
void onSetParameter(ensenso_camera_msgs::SetParameterGoalConstPtr const &goal) override
std::vector< geometry_msgs::TransformStamped > estimatePatternPoses(ros::Time imageTimestamp=ros::Time::now(), std::string const &targetFrame="") const override
std::vector< MonoCalibrationPattern > collectPattern(bool clearBuffer=false) const
bool open() override
Definition: mono_camera.cpp:49
void onLocatePattern(ensenso_camera_msgs::LocatePatternMonoGoalConstPtr const &goal)
geometry_msgs::TransformStamped estimatePatternPose(ros::Time imageTimestamp=ros::Time::now(), std::string const &targetFrame="", bool latestPatternOnly=false) const override
std::string fileCameraPath
Definition: camera.h:183
std::unique_ptr< RequestDataMonoServer > requestDataServer
Definition: mono_camera.h:17
void startServers() const override
Definition: mono_camera.cpp:96
std::string linkFrame
Definition: camera.h:200
image_transport::CameraPublisher rawImagePublisher
Definition: mono_camera.h:20
static Time now()
sensor_msgs::CameraInfoPtr cameraInfo
Definition: mono_camera.h:14
void updateCameraInfo() override
Definition: mono_camera.cpp:58
Definition: camera.h:179


ensenso_camera
Author(s): Ensenso
autogenerated on Thu May 6 2021 02:50:06