interaction.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2014, SRI International
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* Author: Acorn Pooley */
36 
37 #ifndef MOVEIT_ROBOT_INTERACTION_INTERACTION_
38 #define MOVEIT_ROBOT_INTERACTION_INTERACTION_
39 
40 #include <visualization_msgs/InteractiveMarkerFeedback.h>
41 #include <visualization_msgs/InteractiveMarker.h>
44 #include <boost/function.hpp>
45 #include <boost/thread.hpp>
46 #include <tf/tf.h>
47 
48 namespace moveit
49 {
50 namespace core
51 {
52 class RobotState;
53 }
54 }
55 
57 {
59 {
63 {
64  POSITION_ARROWS = 1, // arrows to change position
65  ORIENTATION_CIRCLES = 2, // circles to change orientation
66  POSITION_SPHERE = 4, // sphere: drag to change position
67  ORIENTATION_SPHERE = 8, // sphere: drag to change orientation
68  POSITION_EEF = 16, // drag end effector to change position
69  ORIENTATION_EEF = 32, // drag end effector to change orientation
70  FIXED = 64, // keep arrow and circle axis fixed
71 
79 };
80 }
81 
89 typedef boost::function<bool(const robot_state::RobotState& state, visualization_msgs::InteractiveMarker& marker)>
91 
103 typedef boost::function<bool(robot_state::RobotState& state,
104  const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback)>
106 
116 typedef boost::function<bool(const robot_state::RobotState&, geometry_msgs::Pose&)> InteractiveMarkerUpdateFn;
117 
121 {
122  // Callback to construct interactive marker.
123  // See comment on typedef above.
125 
126  // Callback to handle interactive marker feedback messages.
127  // See comment on typedef above.
129 
130  // Callback to update marker pose when RobotState changes.
131  // See comment on typedef above.
132  InteractiveMarkerUpdateFn update_pose;
133 
134  // Suffix added to name of markers.
135  // Automatically generated.
136  std::string marker_name_suffix;
137 };
138 
142 {
144  std::string parent_group;
145 
147  std::string parent_link;
148 
150  std::string eef_group;
151 
154 
156  double size;
157 };
158 
162 {
164  std::string connecting_link;
165 
167  std::string parent_frame;
168 
170  std::string joint_name;
171 
173  unsigned int dof;
174 
176  double size;
177 };
178 }
179 
180 #endif
std::string parent_link
The name of the link in the parent group that connects to the end-effector.
Definition: interaction.h:147
InteractionStyle::InteractionStyle interaction
Which degrees of freedom to enable for the end-effector.
Definition: interaction.h:153
double size
The size of the end effector group (diameter of enclosing sphere)
Definition: interaction.h:156
double size
The size of the connecting link (diameter of enclosing sphere)
Definition: interaction.h:176
std::string eef_group
The name of the group that defines the group joints.
Definition: interaction.h:150
std::string parent_group
The name of the group that sustains the end-effector (usually an arm)
Definition: interaction.h:144
boost::function< bool(const robot_state::RobotState &, geometry_msgs::Pose &)> InteractiveMarkerUpdateFn
Definition: interaction.h:116
boost::function< bool(robot_state::RobotState &state, const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)> ProcessFeedbackFn
Definition: interaction.h:105
boost::function< bool(const robot_state::RobotState &state, visualization_msgs::InteractiveMarker &marker)> InteractiveMarkerConstructorFn
Definition: interaction.h:90
std::string connecting_link
The link in the robot model this joint is a parent of.
Definition: interaction.h:164
std::string parent_frame
The name of the frame that is a parent of this joint.
Definition: interaction.h:167
unsigned int dof
The type of joint disguised as the number of DOF it has. 3=PLANAR in X/Y; 6=FLOATING.
Definition: interaction.h:173
InteractiveMarkerConstructorFn construct_marker
Definition: interaction.h:124
std::string joint_name
The name of the joint.
Definition: interaction.h:170
InteractiveMarkerUpdateFn update_pose
Definition: interaction.h:132


robot_interaction
Author(s): Ioan Sucan
autogenerated on Sun Oct 18 2020 13:18:32