parameters: (self,indices,q,frame)
docstring: Emulates cartesianPosition. Can also get link transforms.
  
          Args:
              indices (str, int, or tuple): if str or int, retrieves a link
                  transform, and ``frame`` must be "world".  If a tuple,
                  retrieves the position of the cartesian controller for the
                  given indices, in the given frame.
              q (Vector): the configuration of the full body
              frame (str): either "world", "base", "end effector", or "tool"
docstring_summary: Emulates cartesianPosition. Can also get link transforms.
docstring_tokens: Emulates cartesianPosition . Can also get link transforms .
function: def cartesianPosition(self,indices,q,frame):
          """
          Emulates cartesianPosition. Can also get link transforms.
  
          Args:
              indices (str, int, or tuple): if str or int, retrieves a link
                  transform, and ``frame`` must be "world".  If a tuple,
                  retrieves the position of the cartesian controller for the
                  given indices, in the given frame.
              q (Vector): the configuration of the full body
              frame (str): either "world", "base", "end effector", or "tool"
          """
          assert len(q) == len(self.jointData),"cartesianPosition: must use full-body configuration, {} != {}".format(len(q),len(self.jointData))
          if any(v is None for v in q):
              q = [0.0 if v is None else v for v in q]
          if isinstance(indices,(str,int)):  #single link 
              assert frame=='world','Can only retrieve world coordinates for single link'
              self.klamptModel.setConfig(self.klamptModel.configFromDrivers(q))
              return self.klamptModel.link(indices).getTransform()
          try:
              c = self.cartesianInterfaces[tuple(indices)]
              return c.cartesianPosition(q,frame)
          except KeyError:
              raise ValueError("Invalid Cartesian index set for emulator: no command currently set")
function_tokens: def cartesianPosition ( self , indices , q , frame ) : assert len ( q ) == len ( self . jointData ) , "cartesianPosition: must use full-body configuration, {} != {}" . format ( len ( q ) , len ( self . jointData ) ) if any ( v is None for v in q ) : q = [ 0.0 if v is None else v for v in q ] if isinstance ( indices , ( str , int ) ) : #single link  assert frame == 'world' , 'Can only retrieve world coordinates for single link' self . klamptModel . setConfig ( self . klamptModel . configFromDrivers ( q ) ) return self . klamptModel . link ( indices ) . getTransform ( ) try : c = self . cartesianInterfaces [ tuple ( indices ) ] return c . cartesianPosition ( q , frame ) except KeyError : raise ValueError ( "Invalid Cartesian index set for emulator: no command currently set" )