parameters: (item,world)
return_statement: return itypes
docstring: Returns the default type for the given item in the current world
docstring_summary: Returns the default type for the given item in the current world
docstring_tokens: Returns the default type for the given item in the current world
function: def objectToVisType(item,world):
      """Returns the default type for the given item in the current world"""
      itypes = types.objectToTypes(item,world)
      if isinstance(itypes,(list,tuple)):
          #ambiguous, still need to figure out what to draw
          validtypes = []
          for t in itypes:
              if t == 'Config':
                  if world is not None and world.numRobots() > 0 and len(item) == world.robot(0).numLinks():
                      validtypes.append(t)
              elif t=='Vector3':
                  validtypes.append(t)
              elif t=='RigidTransform':
                  validtypes.append(t)
              elif t=='Geometry3D':
                  validtypes.append(t)
          if len(validtypes) > 1:
              print "Unable to draw item of ambiguous types",validtypes
              print "  (Try vis.setAttribute(item,'type',desired_type_str) to disambiguate)"
              return
          if len(validtypes) == 0:
              print "Unable to draw any of types",itypes
              return
          return validtypes[0]
      return itypes
function_tokens: def objectToVisType ( item , world ) : itypes = types . objectToTypes ( item , world ) if isinstance ( itypes , ( list , tuple ) ) : #ambiguous, still need to figure out what to draw validtypes = [ ] for t in itypes : if t == 'Config' : if world is not None and world . numRobots ( ) > 0 and len ( item ) == world . robot ( 0 ) . numLinks ( ) : validtypes . append ( t ) elif t == 'Vector3' : validtypes . append ( t ) elif t == 'RigidTransform' : validtypes . append ( t ) elif t == 'Geometry3D' : validtypes . append ( t ) if len ( validtypes ) > 1 : print "Unable to draw item of ambiguous types" , validtypes print "  (Try vis.setAttribute(item,'type',desired_type_str) to disambiguate)" return if len ( validtypes ) == 0 : print "Unable to draw any of types" , itypes return return validtypes [ 0 ] return itypes