RobotsIO
Loading...
Searching...
No Matches
iCubCameraRelative.h
1/*
2 * Copyright (C) 2019 Istituto Italiano di Tecnologia (IIT)
3 *
4 * This software may be modified and distributed under the terms of the
5 * BSD 3-Clause license. See the accompanying LICENSE file for details.
6 */
7
8#ifndef ROBOTSIO_ICUBCAMERARELATIVE_H
9#define ROBOTSIO_ICUBCAMERARELATIVE_H
10
11#include <RobotsIO/Camera/iCubCamera.h>
12
13namespace RobotsIO {
14 namespace Camera {
15 class iCubCameraRelative;
16 }
17}
18
19
21{
22public:
23
24 iCubCameraRelative(const std::string& robot_name, const std::string& port_prefix, const bool& use_calibration = false, const std::string& calibration_path = "");
25
26 iCubCameraRelative(const std::string& data_path_left, const std::string& data_path_right, const std::size_t& width, const std::size_t& height, const double& fx_l, const double& cx_l, const double& fy_l, const double& cy_l, const double& fx_r, const double& cx_r, const double& fy_r, const double& cy_r, const bool& load_encoders_data, const bool& use_calibration = false, const std::string& calibration_path = "");
27
29
30 virtual bool status() const override;
31
36 std::pair<bool, Eigen::Transform<double, 3, Eigen::Affine>> pose(const bool& blocking) override;
37
42 bool step_frame() override;
43
44 bool set_frame_index(const std::int32_t& index) override;
45
46protected:
47 RobotsIO::Camera::iCubCamera& get_relative_camera();
48
49 const RobotsIO::Camera::iCubCamera& get_relative_camera() const;
50
51private:
55 const std::string log_name_ = "iCubCameraRelative";
56
60 std::unique_ptr<RobotsIO::Camera::iCubCamera> left_camera_;
61};
62
63#endif /* ROBOTSIO_ICUBCAMERARELATIVE_H */
std::pair< bool, Eigen::Transform< double, 3, Eigen::Affine > > pose(const bool &blocking) override