
from dynamic_graph import plug
from dynamic_graph.sot.core import SOT

class Solver:
    robot = None
    sot = None

    def __init__(self, robot):
        self.robot = robot
        self.sot = SOT('solver')
        self.sot.signal('damping').value = 1e-6
        self.sot.setNumberDofs(self.robot.dimension)

        if robot.device:
            plug(self.sot.signal('control'), robot.device.signal('control'))
            plug(self.robot.device.state,
                 self.robot.dynamic.position)


from dynamic_graph import plug
from dynamic_graph.sot.core import SOT

class Solver:
    robot = None
    sot = None

    def __init__(self, robot):
        self.robot = robot
        self.sot = SOT('solver')
        self.sot.signal('damping').value = 1e-6
        self.sot.setNumberDofs(self.robot.dimension)

        if robot.device:
            plug(self.sot.signal('control'), robot.device.signal('control'))
            plug(self.robot.device.state,
                 self.robot.dynamic.position)
    def push(self, taskName):
        """
        Proxy method to push a task in the sot
        """
        self.sot.push(taskName)

Add a proxy method push in Solver -> Solver.sot.push.
Add a proxy method push in Solver -> Solver.sot.push.

  
  from dynamic_graph import plug
  from dynamic_graph.sot.core import SOT
  
  class Solver:
      robot = None
      sot = None
  
      def __init__(self, robot):
          self.robot = robot
          self.sot = SOT('solver')
          self.sot.signal('damping').value = 1e-6
          self.sot.setNumberDofs(self.robot.dimension)
  
          if robot.device:
              plug(self.sot.signal('control'), robot.device.signal('control'))
              plug(self.robot.device.state,
                   self.robot.dynamic.position)
+     def push(self, taskName):
+         """
+         Proxy method to push a task in the sot
+         """
+         self.sot.push(taskName)
  
Add a proxy method push in Solver -> Solver.sot.push.
## Code Before:

from dynamic_graph import plug
from dynamic_graph.sot.core import SOT

class Solver:
    robot = None
    sot = None

    def __init__(self, robot):
        self.robot = robot
        self.sot = SOT('solver')
        self.sot.signal('damping').value = 1e-6
        self.sot.setNumberDofs(self.robot.dimension)

        if robot.device:
            plug(self.sot.signal('control'), robot.device.signal('control'))
            plug(self.robot.device.state,
                 self.robot.dynamic.position)

## Instruction:
Add a proxy method push in Solver -> Solver.sot.push.
## Code After:

from dynamic_graph import plug
from dynamic_graph.sot.core import SOT

class Solver:
    robot = None
    sot = None

    def __init__(self, robot):
        self.robot = robot
        self.sot = SOT('solver')
        self.sot.signal('damping').value = 1e-6
        self.sot.setNumberDofs(self.robot.dimension)

        if robot.device:
            plug(self.sot.signal('control'), robot.device.signal('control'))
            plug(self.robot.device.state,
                 self.robot.dynamic.position)
    def push(self, taskName):
        """
        Proxy method to push a task in the sot
        """
        self.sot.push(taskName)
