parameters: (item)
docstring: Returns a flattened version of the configuration of the given item.
      Nearly all Klamp't objects are recognized, including RobotModel's,
      RigidObjectModel's, WorldModel's, IKObjectives, and all variable types in the
      coordinates module.
  
      TODO: ContactPoint
docstring_summary: Returns a flattened version of the configuration of the given item.
      Nearly all Klamp't objects are recognized, including RobotModel's,
      RigidObjectModel's, WorldModel's, IKObjectives, and all variable types in the
      coordinates module.
docstring_tokens: Returns a flattened version of the configuration of the given item . Nearly all Klamp t objects are recognized including RobotModel s RigidObjectModel s WorldModel s IKObjectives and all variable types in the coordinates module .
function: def getConfig(item):
      """Returns a flattened version of the configuration of the given item.
      Nearly all Klamp't objects are recognized, including RobotModel's,
      RigidObjectModel's, WorldModel's, IKObjectives, and all variable types in the
      coordinates module.
  
      TODO: ContactPoint
      """
      if hasattr(item,'getConfig'):
          return item.getConfig()
      elif isinstance(item,RigidObjectModel):
          R,t = item.getTransform()
          return R+t
      elif isinstance(item,coordinates.Point):
          return item.localCoordinates()
      elif isinstance(item,coordinates.Direction):
          return item.localCoordinates()
      elif isinstance(item,coordinates.Frame):
          R,t = item.relativeCoordinates()
          return R+t
      elif isinstance(item,IKObjective):
          x = []
          if item.numPosDims() == 3 and item.numRotDims() == 3:
              #local position is irrelevant
              R,t = item.getTransform()
              return R + t
          if item.numPosDims() == 3:
              loc,wor = item.getPosition()
              x += loc + wor
          elif item.numPosDims() == 2:
              #linear constraint
              loc,wor = item.getPosition()
              axis = item.getPositionDirection()
              x += loc + wor + axis
          elif item.numPosDims() == 1:
              #planar constraint
              loc,wor = item.getPosition()
              axis = item.getPositionDirection()
              x += loc + axis + [vectorops.dot(axis,wor)]
          if item.numRotDims() == 3:
              x += item.getRotation()
          elif item.numRotDims() == 2:
              loc,wor = item.getRotationAxis()
              x += loc + wor
          return x
      elif isCompound(item):
          return sum([getConfig(v) for v in components(item)],[])
      elif hasattr(item,'__iter__'):
          if isinstance(item[0],(bool,int,float,str)):
              return item[:]
          else:
              return sum([getConfig(v) for v in item],[])
      else:
          return []
function_tokens: def getConfig ( item ) : if hasattr ( item , 'getConfig' ) : return item . getConfig ( ) elif isinstance ( item , RigidObjectModel ) : R , t = item . getTransform ( ) return R + t elif isinstance ( item , coordinates . Point ) : return item . localCoordinates ( ) elif isinstance ( item , coordinates . Direction ) : return item . localCoordinates ( ) elif isinstance ( item , coordinates . Frame ) : R , t = item . relativeCoordinates ( ) return R + t elif isinstance ( item , IKObjective ) : x = [ ] if item . numPosDims ( ) == 3 and item . numRotDims ( ) == 3 : #local position is irrelevant R , t = item . getTransform ( ) return R + t if item . numPosDims ( ) == 3 : loc , wor = item . getPosition ( ) x += loc + wor elif item . numPosDims ( ) == 2 : #linear constraint loc , wor = item . getPosition ( ) axis = item . getPositionDirection ( ) x += loc + wor + axis elif item . numPosDims ( ) == 1 : #planar constraint loc , wor = item . getPosition ( ) axis = item . getPositionDirection ( ) x += loc + axis + [ vectorops . dot ( axis , wor ) ] if item . numRotDims ( ) == 3 : x += item . getRotation ( ) elif item . numRotDims ( ) == 2 : loc , wor = item . getRotationAxis ( ) x += loc + wor return x elif isCompound ( item ) : return sum ( [ getConfig ( v ) for v in components ( item ) ] , [ ] ) elif hasattr ( item , '__iter__' ) : if isinstance ( item [ 0 ] , ( bool , int , float , str ) ) : return item [ : ] else : return sum ( [ getConfig ( v ) for v in item ] , [ ] ) else : return [ ]