NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
marker_tracker.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 #ifndef MARKER_TRACKING_NODE_MARKER_TRACKER_H_
19 #define MARKER_TRACKING_NODE_MARKER_TRACKER_H_
20 
23 
24 #include <camera/camera_params.h>
25 #include <ff_msgs/SetBool.h>
26 #include <ff_msgs/VisualLandmarks.h>
27 
28 #include <image_transport/image_transport.h>
29 #include <ros/publisher.h>
30 
31 #include <string>
32 
34 
36  public:
37  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
38  explicit MarkerTracker(ros::NodeHandle* nh, ros::NodeHandle* private_nh,
39  const std::string& nm);
41 
42  void PublishVO(struct timeval const& timestamp);
43 
44  private:
45  void VideoCallback(const sensor_msgs::ImageConstPtr& image_msg);
46  bool EnableService(ff_msgs::SetBool::Request& req,
47  ff_msgs::SetBool::Response& res);
48  void ReadParams(void);
49  int EstimatePose(ff_msgs::VisualLandmarks* msg);
50  bool IsMarkerValid(const alvar::MarkerData & marker);
51 
53  ros::Timer config_timer_;
54 
55  image_transport::ImageTransport it_;
56  image_transport::Subscriber image_sub_;
57  ros::ServiceServer enable_srv_;
58  ros::Publisher landmark_publisher_, reg_publisher_;
59 
61  const std::string& nodelet_name_;
62  camera::CameraParameters camera_param_;
63  std::shared_ptr<marker_tracking::MarkerCornerDetector> detector_;
64 
65  int x_min_, x_max_;
66 };
67 
68 }; // namespace marker_tracking_node
69 
70 #endif // MARKER_TRACKING_NODE_MARKER_TRACKER_H_
marker_tracking::ARTagMap
std::map< int, Eigen::Matrix< float, 4, 3 >, std::less< int >, Eigen::aligned_allocator< std::pair< int const, Eigen::Matrix< float, 4, 3 > > > > ARTagMap
Definition: arxmlio.h:40
marker_tracking_node::MarkerTracker::PublishVO
void PublishVO(struct timeval const &timestamp)
camera::CameraParameters
Definition: camera_params.h:58
marker_tracking_node::MarkerTracker::MarkerTracker
EIGEN_MAKE_ALIGNED_OPERATOR_NEW MarkerTracker(ros::NodeHandle *nh, ros::NodeHandle *private_nh, const std::string &nm)
Definition: marker_tracker.cc:40
arconfigio.h
marker_tracking_node
Definition: marker_tracker.h:33
marker_detector.h
config_reader::ConfigReader
Definition: config_reader.h:48
marker_tracking_node::MarkerTracker
Definition: marker_tracker.h:35
marker_tracking_node::MarkerTracker::~MarkerTracker
~MarkerTracker()
Definition: marker_tracker.cc:99
camera_params.h