parameters: (name)
docstring: Put name in canonical form. Extra slashes '//' are removed and
      name is returned without any trailing slash, e.g. /foo/bar
      @param name: ROS name
      @type  name: str
docstring_summary: Put name in canonical form. Extra slashes '//' are removed and
      name is returned without any trailing slash, e.g. /foo/bar
docstring_tokens: Put name in canonical form . Extra slashes // are removed and name is returned without any trailing slash e . g . / foo / bar
function: def canonicalize_name(name):
      """
      Put name in canonical form. Extra slashes '//' are removed and
      name is returned without any trailing slash, e.g. /foo/bar
      @param name: ROS name
      @type  name: str
      """
      if not name or name == SEP:
          return name
      elif name[0] == SEP:
          return '/' + '/'.join([x for x in name.split(SEP) if x])
      else:
          return '/'.join([x for x in name.split(SEP) if x])
function_tokens: def canonicalize_name ( name ) : if not name or name == SEP : return name elif name [ 0 ] == SEP : return '/' + '/' . join ( [ x for x in name . split ( SEP ) if x ] ) else : return '/' . join ( [ x for x in name . split ( SEP ) if x ] )