NASA Astrobee Robot Software  Astrobee Version:
Flight software for the Astrobee robots operating inside the International Space Station.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
interactive_marker_teleop.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 INTERACTIVE_MARKER_TELEOP_H_
20 #define INTERACTIVE_MARKER_TELEOP_H_
21 
22 #include <ff_msgs/CommandStamped.h>
23 #include <ff_msgs/CommandConstants.h>
24 #include <ff_common/ff_names.h>
25 
26 #include <ros/ros.h>
27 #include <interactive_markers/interactive_marker_server.h>
28 #include <interactive_markers/menu_handler.h>
29 #include <tf2_ros/transform_listener.h>
30 #include <tf2_geometry_msgs/tf2_geometry_msgs.h>
31 
32 #include <string>
33 
35  public:
36  explicit InteractiveMarkerTeleop(ros::NodeHandle& nh);
37 
38  visualization_msgs::Marker makeMarker(const std::string marker_type);
39 
40  visualization_msgs::InteractiveMarkerControl& makeBoxControl(visualization_msgs::InteractiveMarker& msg);
41 
42  void sendMobilityCommand(std::string command, const geometry_msgs::Pose& desired_pose);
43 
44  void sendMobilityCommand(std::string command);
45 
46  void snapMarkerToAstrobee();
47 
48  void processFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback);
49 
50  void make6DofMarker(unsigned int interaction_mode);
51 
52  private:
53  ros::NodeHandle nh;
54 
55  std::shared_ptr<interactive_markers::InteractiveMarkerServer> server_;
56  interactive_markers::MenuHandler menu_handler_;
57 
58  ros::Publisher cmd_publisher_;
59  ros::Subscriber ack_subscriber_;
60 
61  tf2_ros::Buffer tfBuffer_;
62  std::shared_ptr<tf2_ros::TransformListener> tfListener_;
63 };
64 
65 #endif // INTERACTIVE_MARKER_TELEOP_H_
InteractiveMarkerTeleop::makeBoxControl
visualization_msgs::InteractiveMarkerControl & makeBoxControl(visualization_msgs::InteractiveMarker &msg)
Definition: interactive_marker_teleop.cpp:87
InteractiveMarkerTeleop::sendMobilityCommand
void sendMobilityCommand(std::string command, const geometry_msgs::Pose &desired_pose)
Definition: interactive_marker_teleop.cpp:98
InteractiveMarkerTeleop
Definition: interactive_marker_teleop.h:34
InteractiveMarkerTeleop::make6DofMarker
void make6DofMarker(unsigned int interaction_mode)
Definition: interactive_marker_teleop.cpp:230
InteractiveMarkerTeleop::makeMarker
visualization_msgs::Marker makeMarker(const std::string marker_type)
Definition: interactive_marker_teleop.cpp:54
InteractiveMarkerTeleop::InteractiveMarkerTeleop
InteractiveMarkerTeleop(ros::NodeHandle &nh)
Definition: interactive_marker_teleop.cpp:25
InteractiveMarkerTeleop::snapMarkerToAstrobee
void snapMarkerToAstrobee()
Definition: interactive_marker_teleop.cpp:161
ff_names.h
InteractiveMarkerTeleop::processFeedback
void processFeedback(const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)
Definition: interactive_marker_teleop.cpp:175