converters/camera.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2015 Aldebaran
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef CONVERTER_CAMERA_HPP
19 #define CONVERTER_CAMERA_HPP
20 
21 /*
22 * LOCAL includes
23 */
24 #include "converter_base.hpp"
26 
27 /*
28 * ROS includes
29 */
31 
32 namespace naoqi
33 {
34 namespace converter
35 {
36 
37 class CameraConverter : public BaseConverter<CameraConverter>
38 {
39 
40  typedef boost::function<void(sensor_msgs::ImagePtr, sensor_msgs::CameraInfo)> Callback_t;
41 
42 public:
44  const std::string& name,
45  const float& frequency,
46  const qi::SessionPtr& session,
47  const int& camera_source,
48  const int& resolution,
49  const bool& has_stereo=false);
50 
52 
53  void reset();
54 
55  void registerCallback( const message_actions::MessageAction action, Callback_t cb );
56 
57  void callAll( const std::vector<message_actions::MessageAction>& actions );
58 
59 private:
60  std::map<message_actions::MessageAction, Callback_t> callbacks_;
61 
63  qi::AnyObject p_video_;
67  std::string handle_;
68 
69  // string indicating image transport encoding
70  // goes along with colorspace_
71  std::string msg_colorspace_;
73  // msg frame id
74  std::string msg_frameid_;
75  sensor_msgs::CameraInfo camera_info_;
76  sensor_msgs::ImagePtr msg_;
77 };
78 
79 } //publisher
80 } //naoqi
81 
82 
83 #endif
void callAll(const std::vector< message_actions::MessageAction > &actions)
sensor_msgs::CameraInfo camera_info_
CameraConverter(const std::string &name, const float &frequency, const qi::SessionPtr &session, const int &camera_source, const int &resolution, const bool &has_stereo=false)
void registerCallback(const message_actions::MessageAction action, Callback_t cb)
boost::function< void(sensor_msgs::ImagePtr, sensor_msgs::CameraInfo)> Callback_t
std::map< message_actions::MessageAction, Callback_t > callbacks_


naoqi_driver
Author(s): Karsten Knese
autogenerated on Sat Feb 15 2020 03:24:26