NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
lk_optical_flow_nodelet.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  */
18 
19 #ifndef LK_OPTICAL_FLOW_LK_OPTICAL_FLOW_NODELET_H_
20 #define LK_OPTICAL_FLOW_LK_OPTICAL_FLOW_NODELET_H_
21 
23 #include <nodelet/nodelet.h>
24 
25 #include <ff_msgs/SetBool.h>
26 #include <ff_util/ff_nodelet.h>
27 #include <image_transport/image_transport.h>
28 #include <ros/publisher.h>
29 #include <ros/subscriber.h>
30 
31 namespace lk_optical_flow {
32 
34  public:
36 
37  protected:
38  virtual void Initialize(ros::NodeHandle* nh);
39 
40  private:
41  void ReadParams(void);
42  void ImageCallback(const sensor_msgs::ImageConstPtr& msg);
43  bool EnableService(ff_msgs::SetBool::Request & req, ff_msgs::SetBool::Response & res);
44 
45  boost::shared_ptr<LKOpticalFlow> inst_;
46 
48  ros::Timer config_timer_;
49 
50  int camera_id_;
51 
52  image_transport::Publisher img_pub_;
53  image_transport::Subscriber img_sub_;
54  image_transport::CameraSubscriber cam_sub_;
55 
56  ros::Publisher feature_pub_, reg_pub_;
57  ros::Subscriber filtered_feature_sub_;
58  ros::ServiceServer enable_srv_;
59 
60  bool debug_view_;
61 };
62 } // namespace lk_optical_flow
63 
64 #endif // LK_OPTICAL_FLOW_LK_OPTICAL_FLOW_NODELET_H_
lk_optical_flow.h
lk_optical_flow::LKOpticalFlowNodelet::LKOpticalFlowNodelet
LKOpticalFlowNodelet()
Definition: lk_optical_flow_nodelet.cc:26
lk_optical_flow
Definition: lk_optical_flow.h:34
lk_optical_flow::LKOpticalFlowNodelet
Definition: lk_optical_flow_nodelet.h:33
ff_nodelet.h
ff_util::FreeFlyerNodelet
Definition: ff_nodelet.h:57
config_reader::ConfigReader
Definition: config_reader.h:48
lk_optical_flow::LKOpticalFlowNodelet::Initialize
virtual void Initialize(ros::NodeHandle *nh)
Definition: lk_optical_flow_nodelet.cc:28