Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 VERBOSE = 1
00020
00021 class Grasp:
00022 def __init__(self):
00023 self.grasp_name = ""
00024 self.joints_and_positions = {}
00025
00026 def display_grasp(self):
00027 print self.grasp_name
00028 print self.joints_and_positions
00029
00030 def convert_to_xml(self):
00031 grasp = ' <grasp name="'+self.grasp_name+'">'+'\n'
00032 for key, value in self.joints_and_positions.items():
00033 grasp = grasp + ' <joint name="'+str(key)+'">'+str(value)+'</joint>\n'
00034 grasp = grasp + ' </grasp>'+'\n'
00035 return grasp