interactive_frame_target.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
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 INTERACTIVE_FRAME_TARGET_H
19 #define INTERACTIVE_FRAME_TARGET_H
20 
21 #include <string>
22 #include <ros/ros.h>
23 
24 #include <std_srvs/Trigger.h>
25 #include <cob_srvs/SetString.h>
26 #include <geometry_msgs/PoseStamped.h>
27 
28 #include <tf/transform_listener.h>
30 #include <tf/transform_datatypes.h>
31 
34 
35 
36 
38 {
39 public:
42 
43  bool initialize();
44 
48 
49 private:
51  double update_rate_;
52 
53  std::string root_frame_;
54  std::string chain_tip_link_;
55  std::string tracking_frame_; // the frame tracking the target
56  std::string target_frame_; // the frame to be tracked
57 
60 
62  visualization_msgs::InteractiveMarker int_marker_;
63  visualization_msgs::InteractiveMarker int_marker_menu_;
65 
66  bool tracking_;
67  bool lookat_;
69  boost::mutex mutex_;
70 
74 
75  void updateMarker(const std::string& frame);
76  void sendTransform(const ros::TimerEvent& event);
77  void startTracking(const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
78  void startLookat(const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
79  void stop(const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
80  void menuFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
81  void markerFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
82 };
83 
84 #endif
void updateMarker(const std::string &frame)
interactive_markers::InteractiveMarkerServer * ia_server_
ros::ServiceClient start_lookat_client_
visualization_msgs::InteractiveMarker int_marker_menu_
tf::StampedTransform target_pose_
interactive_markers::MenuHandler menu_handler_
tf::TransformBroadcaster tf_broadcaster_
tf::TransformListener tf_listener_
void startTracking(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
void startLookat(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
ros::ServiceClient start_tracking_client_
void markerFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
void stop(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
visualization_msgs::InteractiveMarker int_marker_
void menuFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
void sendTransform(const ros::TimerEvent &event)


cob_frame_tracker
Author(s): Felix Messmer
autogenerated on Thu Apr 8 2021 02:39:38