parameters: (robot,holdList,fext=(0,0,-9.8),internalTorques=None,norm=0)
return_statement: return (res[0],[f[i*3:i*3+3] for i in range(len(f)//3)])
docstring: Solves for the torques / forces that keep the robot balanced against
      gravity.
  
      Specifically, solves for :math:`(\\tau,f)` in the equation:
  
      .. math::
  
          G(q;fext) + \\tau_{int} = \\tau + \\sum_i J_i(q)^T f_i
   
      where :math:`G(q;fext)` is the generalized gravity, :math:`\\tau_{int}` are
      the internal torques, and :math:`J_i(q)` is the Jacobian of the i'th
      contact point.  All forces are required to be in their friction cones.
  
      Args:
          robot (RobotModel): the robot, posed in its current configuration
          holdList (list of Hold): a list of Holds.
          fext (list of 3 floats, optional): the external force (e.g., gravity)
          internalTorques (list, optional): if given, a list of length
              ``robot.numDofs`` giving internal torques. For example, setting
              this to ``robot.accelToTorques(ddq)`` can incorporate dynamics
              into the solver.
          norm (float, optional): the torque norm to minimize.  If 0, minimizes
              the l-infinity norm (default).  If 1, minimizes the l-1 norm.  If
              2, minimizes the l-2 norm (experimental, may not get good results)
  
      Returns:
          tuple or None: A pair (t,f) giving the joint torques and a list of
          frictional contact forces, if a solution exists. The return value may
          be None if no solution exists.
docstring_summary: Solves for the torques / forces that keep the robot balanced against
      gravity.
docstring_tokens: Solves for the torques / forces that keep the robot balanced against gravity .
function: def equilibrium_torques(robot,holdList,fext=(0,0,-9.8),internalTorques=None,norm=0):
      """ Solves for the torques / forces that keep the robot balanced against
      gravity.
  
      Specifically, solves for :math:`(\\tau,f)` in the equation:
  
      .. math::
  
          G(q;fext) + \\tau_{int} = \\tau + \\sum_i J_i(q)^T f_i
   
      where :math:`G(q;fext)` is the generalized gravity, :math:`\\tau_{int}` are
      the internal torques, and :math:`J_i(q)` is the Jacobian of the i'th
      contact point.  All forces are required to be in their friction cones.
  
      Args:
          robot (RobotModel): the robot, posed in its current configuration
          holdList (list of Hold): a list of Holds.
          fext (list of 3 floats, optional): the external force (e.g., gravity)
          internalTorques (list, optional): if given, a list of length
              ``robot.numDofs`` giving internal torques. For example, setting
              this to ``robot.accelToTorques(ddq)`` can incorporate dynamics
              into the solver.
          norm (float, optional): the torque norm to minimize.  If 0, minimizes
              the l-infinity norm (default).  If 1, minimizes the l-1 norm.  If
              2, minimizes the l-2 norm (experimental, may not get good results)
  
      Returns:
          tuple or None: A pair (t,f) giving the joint torques and a list of
          frictional contact forces, if a solution exists. The return value may
          be None if no solution exists.
      """
      links = sum([[h.link]*len(h.contacts) for h in holdList],[])
      if internalTorques is None:
          res = robotsim.equilibrium_torques(robot,_toarray(holdList),links,fext,norm)
      else:
          res = robotsim.equilibrium_torques(robot,_toarray(holdList),links,fext,internalTorques,norm)
      if res is None: return res
      f = res[1]
      return (res[0],[f[i*3:i*3+3] for i in range(len(f)//3)])
function_tokens: def equilibrium_torques ( robot , holdList , fext = ( 0 , 0 , - 9.8 ) , internalTorques = None , norm = 0 ) : links = sum ( [ [ h . link ] * len ( h . contacts ) for h in holdList ] , [ ] ) if internalTorques is None : res = robotsim . equilibrium_torques ( robot , _toarray ( holdList ) , links , fext , norm ) else : res = robotsim . equilibrium_torques ( robot , _toarray ( holdList ) , links , fext , internalTorques , norm ) if res is None : return res f = res [ 1 ] return ( res [ 0 ] , [ f [ i * 3 : i * 3 + 3 ] for i in range ( len ( f ) // 3 ) ] )