original_docstring: 
          Will handle the saving_map_area service call. This function will save the coordinates of each interactive marker in a JSON.
          Returns a text message as response
  
          :param req: input parameters of the service
          :type action: SavingMapArea
          
docstring: Will handle the saving_map_area service call. This function will save the coordinates of each interactive marker in a JSON.
  Returns a text message as response
docstring_tokens: Will handle the saving_map_area service call . This function will save the coordinates of each interactive marker in a JSON . Returns a text message as response
code: def handle_saving_map_area(self,req):
          """
          Will handle the saving_map_area service call. This function will save the coordinates of each interactive marker in a JSON.
          Returns a text message as response
  
          :param req: input parameters of the service
          :type action: SavingMapArea
          """
  
          file_path = os.path.join(self.current_dir,rospy.get_param("~map_file_path"))
  
          try:
              with open(file_path,'r+') as json_file:
                  data = json.load(json_file)
          except:
              data = {}
  
          if data == {}:
              with open(file_path,'w+') as json_file:
                  json.dump(self.coord_IMs, json_file, indent=4)
                  json_file.truncate()
  
          else:
              for key in self.coord_IMs.keys():
                  for id in self.coord_IMs[key].keys():
                      if key in data.keys():
                          data[key][id]=self.coord_IMs[key][id]
                      else:
  			data[key]={}
                          data[key][id]=self.coord_IMs[key][id]
  
              with open(file_path,'w+') as json_file:
                  json.dump(data, json_file, indent=4)
                  json_file.truncate()
  
          return SavingMapAreaResponse('OK')
code_tokens: def handle_saving_map_area ( self , req ) : file_path = os . path . join ( self . current_dir , rospy . get_param ( "~map_file_path" ) ) try : with open ( file_path , 'r+' ) as json_file : data = json . load ( json_file ) except : data = { } if data == { } : with open ( file_path , 'w+' ) as json_file : json . dump ( self . coord_IMs , json_file , indent = 4 ) json_file . truncate ( ) else : for key in self . coord_IMs . keys ( ) : for id in self . coord_IMs [ key ] . keys ( ) : if key in data . keys ( ) : data [ key ] [ id ] = self . coord_IMs [ key ] [ id ] else : data [ key ] = { } data [ key ] [ id ] = self . coord_IMs [ key ] [ id ] with open ( file_path , 'w+' ) as json_file : json . dump ( data , json_file , indent = 4 ) json_file . truncate ( ) return SavingMapAreaResponse ( 'OK' )
short_docstring: Will handle the saving_map_area service call.
short_docstring_tokens: Will handle the saving_map_area service call .
comment: """
          Will handle the saving_map_area service call. This function will save the coordinates of each interactive marker in a JSON.
          Returns a text message as response
  
          :param req: input parameters of the service
          :type action: SavingMapArea
          """