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 #pragma once
38 
39 #include <visualization_msgs/InteractiveMarkerFeedback.h>
40 #include <visualization_msgs/InteractiveMarker.h>
43 #include <boost/function.hpp>
44 #include <boost/thread.hpp>
45 
46 namespace moveit
47 {
48 namespace core
49 {
50 class RobotState;
51 }
52 } // namespace moveit
53 
55 {
57 {
61 {
62  POSITION_ARROWS = 1, // arrows to change position
63  ORIENTATION_CIRCLES = 2, // circles to change orientation
64  POSITION_SPHERE = 4, // sphere: drag to change position
65  ORIENTATION_SPHERE = 8, // sphere: drag to change orientation
66  POSITION_EEF = 16, // drag end effector to change position
67  ORIENTATION_EEF = 32, // drag end effector to change orientation
68  FIXED = 64, // keep arrow and circle axis fixed
69 
77 };
78 } // namespace InteractionStyle
79 
87 typedef boost::function<bool(const moveit::core::RobotState& state, visualization_msgs::InteractiveMarker& marker)>
89 
101 typedef boost::function<bool(moveit::core::RobotState& state,
102  const visualization_msgs::InteractiveMarkerFeedbackConstPtr& feedback)>
104 
114 typedef boost::function<bool(const moveit::core::RobotState&, geometry_msgs::Pose&)> InteractiveMarkerUpdateFn;
115 
119 {
120  // Callback to construct interactive marker.
121  // See comment on typedef above.
123 
124  // Callback to handle interactive marker feedback messages.
125  // See comment on typedef above.
127 
128  // Callback to update marker pose when RobotState changes.
129  // See comment on typedef above.
131 
132  // Suffix added to name of markers.
133  // Automatically generated.
134  std::string marker_name_suffix;
135 };
136 
140 {
142  std::string parent_group;
143 
145  std::string parent_link;
146 
148  std::string eef_group;
149 
152 
154  double size;
155 };
156 
160 {
162  std::string connecting_link;
163 
165  std::string parent_frame;
166 
168  std::string joint_name;
169 
171  unsigned int dof;
172 
174  double size;
175 };
176 } // namespace robot_interaction
robot_interaction::InteractionStyle::FIXED
@ FIXED
Definition: interaction.h:68
robot_interaction::EndEffectorInteraction::eef_group
std::string eef_group
The name of the group that defines the group joints.
Definition: interaction.h:148
robot_interaction::GenericInteraction
Definition: interaction.h:118
robot_interaction::InteractionStyle::ORIENTATION_EEF
@ ORIENTATION_EEF
Definition: interaction.h:67
robot_interaction::InteractionStyle::POSITION_EEF
@ POSITION_EEF
Definition: interaction.h:66
robot_interaction::GenericInteraction::marker_name_suffix
std::string marker_name_suffix
Definition: interaction.h:134
robot_interaction::EndEffectorInteraction::size
double size
The size of the end effector group (diameter of enclosing sphere)
Definition: interaction.h:154
menu_handler.h
robot_interaction::InteractionStyle::POSITION
@ POSITION
Definition: interaction.h:70
robot_interaction::JointInteraction
Definition: interaction.h:159
moveit::core::RobotState
robot_state.h
robot_interaction::EndEffectorInteraction::parent_group
std::string parent_group
The name of the group that sustains the end-effector (usually an arm)
Definition: interaction.h:142
robot_interaction::InteractionStyle::POSITION_SPHERE
@ POSITION_SPHERE
Definition: interaction.h:64
robot_interaction::InteractionStyle::ORIENTATION_SPHERE
@ ORIENTATION_SPHERE
Definition: interaction.h:65
robot_interaction::InteractionStyle::SIX_DOF
@ SIX_DOF
Definition: interaction.h:72
robot_interaction::InteractiveMarkerUpdateFn
boost::function< bool(const moveit::core::RobotState &, geometry_msgs::Pose &)> InteractiveMarkerUpdateFn
Definition: interaction.h:114
robot_interaction::InteractionStyle::InteractionStyle
InteractionStyle
Definition: interaction.h:60
robot_interaction::InteractiveMarkerConstructorFn
boost::function< bool(const moveit::core::RobotState &state, visualization_msgs::InteractiveMarker &marker)> InteractiveMarkerConstructorFn
Definition: interaction.h:88
robot_interaction::EndEffectorInteraction::parent_link
std::string parent_link
The name of the link in the parent group that connects to the end-effector.
Definition: interaction.h:145
robot_interaction::InteractionStyle::POSITION_ARROWS
@ POSITION_ARROWS
Definition: interaction.h:62
robot_interaction::JointInteraction::joint_name
std::string joint_name
The name of the joint.
Definition: interaction.h:168
robot_interaction::EndEffectorInteraction::interaction
InteractionStyle::InteractionStyle interaction
Which degrees of freedom to enable for the end-effector.
Definition: interaction.h:151
robot_interaction::InteractionStyle::ORIENTATION
@ ORIENTATION
Definition: interaction.h:71
robot_interaction::EndEffectorInteraction
Definition: interaction.h:139
robot_interaction::InteractionStyle::POSITION_NOSPHERE
@ POSITION_NOSPHERE
Definition: interaction.h:74
robot_interaction::ProcessFeedbackFn
boost::function< bool(moveit::core::RobotState &state, const visualization_msgs::InteractiveMarkerFeedbackConstPtr &feedback)> ProcessFeedbackFn
Definition: interaction.h:103
robot_interaction::InteractionStyle::ORIENTATION_NOSPHERE
@ ORIENTATION_NOSPHERE
Definition: interaction.h:75
moveit
robot_interaction::InteractionStyle::SIX_DOF_NOSPHERE
@ SIX_DOF_NOSPHERE
Definition: interaction.h:76
robot_interaction::JointInteraction::size
double size
The size of the connecting link (diameter of enclosing sphere)
Definition: interaction.h:174
robot_interaction::InteractionStyle::SIX_DOF_SPHERE
@ SIX_DOF_SPHERE
Definition: interaction.h:73
robot_interaction
Definition: interaction.h:54
robot_interaction::JointInteraction::connecting_link
std::string connecting_link
The link in the robot model this joint is a parent of.
Definition: interaction.h:162
robot_interaction::GenericInteraction::process_feedback
ProcessFeedbackFn process_feedback
Definition: interaction.h:126
robot_interaction::GenericInteraction::update_pose
InteractiveMarkerUpdateFn update_pose
Definition: interaction.h:130
robot_interaction::JointInteraction::dof
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:171
robot_interaction::GenericInteraction::construct_marker
InteractiveMarkerConstructorFn construct_marker
Definition: interaction.h:122
robot_interaction::JointInteraction::parent_frame
std::string parent_frame
The name of the frame that is a parent of this joint.
Definition: interaction.h:165
robot_interaction::InteractionStyle::ORIENTATION_CIRCLES
@ ORIENTATION_CIRCLES
Definition: interaction.h:63


robot_interaction
Author(s): Ioan Sucan
autogenerated on Sat Mar 15 2025 02:26:54