Main Page
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Classes
Class List
Class Hierarchy
Class Members
All
_
a
c
d
e
f
g
l
n
o
p
r
s
Functions
Variables
a
c
e
f
g
n
p
r
s
Files
File List
src
actionlib_tools
dynamic_action.py
Go to the documentation of this file.
1
# **********************************************************
2
# Software License Agreement (BSD License)
3
#
4
# Copyright (c) 2009, Willow Garage, Inc.
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, Inc. 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
# Author: Eitan Marder-Eppstein
35
# **********************************************************
36
import
roslib
37
import
rospy
38
import
sys
39
40
41
class
DynamicAction
(object):
42
def
__init__
(self, name):
43
# remove "Action" string from name
44
assert(
"Action"
in
name)
45
self.
name
= name[0:len(name)-6]
46
self.
action
= self.
load_submsg
(
'Action'
)
47
self.
goal
= self.
load_submsg
(
'Goal'
)
48
self.
feedback
= self.
load_submsg
(
'Feedback'
)
49
self.
result
= self.
load_submsg
(
'Result'
)
50
51
def
load_submsg
(self, subname):
52
msgclass = roslib.message.get_message_class(self.
name
+ subname)
53
if
msgclass
is
None
:
54
rospy.logfatal(
'Could not load message for: %s'
% (self.
name
+ subname))
55
sys.exit(1)
56
return
msgclass
actionlib_tools.dynamic_action.DynamicAction.action
action
Definition:
dynamic_action.py:46
actionlib_tools.dynamic_action.DynamicAction.name
name
Definition:
dynamic_action.py:45
actionlib_tools.dynamic_action.DynamicAction.__init__
def __init__(self, name)
Definition:
dynamic_action.py:42
actionlib_tools.dynamic_action.DynamicAction.feedback
feedback
Definition:
dynamic_action.py:48
actionlib_tools.dynamic_action.DynamicAction.goal
goal
Definition:
dynamic_action.py:47
actionlib_tools.dynamic_action.DynamicAction.result
result
Definition:
dynamic_action.py:49
actionlib_tools.dynamic_action.DynamicAction
Definition:
dynamic_action.py:41
actionlib_tools.dynamic_action.DynamicAction.load_submsg
def load_submsg(self, subname)
Definition:
dynamic_action.py:51
actionlib_tools
Author(s): Eitan Marder-Eppstein, Vijay Pradeep, Mikael Arguedas
autogenerated on Thu Apr 10 2025 02:37:15