Class trifinger_cameras::PylonDriver¶
- 
class PylonDriver : public robot_interfaces::SensorDriver<CameraObservation, CameraInfo>, public robot_interfaces::SensorDriver<CameraObservation, CameraInfo>¶
- Driver for interacting with a camera via Pylon and storing images using OpenCV. - Public Functions - 
PylonDriver(const std::string &device_user_id, bool downsample_images = false, Settings settings = Settings())¶
- Connect to camera based on name. - When using this constructor, the camera calibration coefficients returned by get_sensor_info will be set to zero. - Parameters:
- device_user_id – “DeviceUserID” of the camera. Pass empty string to connect to first camera found (useful if only one camera is connected). 
- downsample_images – Not supported anymore. Must be to - false.
- settings – Settings for the camera. 
 
 
 - 
PylonDriver(const std::filesystem::path &camera_calibration_file, bool downsample_images = false, Settings settings = Settings())¶
- Connect to camera based on calibration file. - The provided calibration file is expected to be in YAML format and contain the “camera_name” (= DeviceUserID) as well as calibration coefficients. The latter will be used in the CameraInfo returned by get_sensor_info. - Parameters:
- camera_calibration_file – Path to the camera calibration file. 
- downsample_images – Not supported anymore. Must be to - false.
- settings – Settings for the camera. 
 
 
 - 
~PylonDriver()¶
 - 
virtual CameraInfo get_sensor_info() override¶
- Get the camera parameters (image size and calibration coefficients). - Important: The calibration coefficients are only set if the driver is initialized with a calibration file (see constructor). Otherwise, they will be empty. 
 - 
virtual CameraObservation get_observation() override¶
- Get the latest observation (image frame + timestamp of when the frame’s grabbed). - Returns:
 
 - 
PylonDriver(const std::string &device_user_id, bool downsample_images = false, Settings settings = Settings())
- Connect to camera based on name. - When using this constructor, the camera calibration coefficients returned by get_sensor_info will be set to zero. - Parameters:
- device_user_id – “DeviceUserID” of the camera. Pass empty string to connect to first camera found (useful if only one camera is connected). 
- downsample_images – Not supported anymore. Must be to - false.
- settings – Settings for the camera. 
 
 
 - 
PylonDriver(const std::filesystem::path &camera_calibration_file, bool downsample_images = false, Settings settings = Settings())
- Connect to camera based on calibration file. - The provided calibration file is expected to be in YAML format and contain the “camera_name” (= DeviceUserID) as well as calibration coefficients. The latter will be used in the CameraInfo returned by get_sensor_info. - Parameters:
- camera_calibration_file – Path to the camera calibration file. 
- downsample_images – Not supported anymore. Must be to - false.
- settings – Settings for the camera. 
 
 
 - 
~PylonDriver()
 - 
virtual CameraInfo get_sensor_info() override
- Get the camera parameters (image size and calibration coefficients). - Important: The calibration coefficients are only set if the driver is initialized with a calibration file (see constructor). Otherwise, they will be empty. 
 - 
virtual CameraObservation get_observation() override
- Get the latest observation (image frame + timestamp of when the frame’s grabbed). - Returns:
 
 
- 
PylonDriver(const std::string &device_user_id, bool downsample_images = false, Settings settings = Settings())¶