Commit e19cb87a authored by Thomas Moulard's avatar Thomas Moulard
Browse files

Fix examples.

parent 7390cd73
......@@ -24,8 +24,7 @@ from dynamic_graph.sot.dynamics.hrp2 import Hrp2
from dynamic_graph import enableTrace, plug
from tools import *
from dynamic_graph.sot.dynamics.tools import *
class HalfStep:
startX = 0.
......
......@@ -15,7 +15,7 @@
# received a copy of the GNU Lesser General Public License along with
# dynamic-graph. If not, see <http://www.gnu.org/licenses/>.
from tools import *
from dynamic_graph.sot.dynamics.tools import *
from dynamic_graph.sot.dynamics.feet_follower import FeetFollowerFromFile
feetFollower = FeetFollowerFromFile('feet-follower')
......
......@@ -21,8 +21,7 @@ from dynamic_graph.sot.dynamics.hrp2 import Hrp2
from dynamic_graph import enableTrace, plug
from tools import *
from dynamic_graph.sot.dynamics.tools import *
class QuasiStaticWalking:
leftFoot = 0
......@@ -155,13 +154,12 @@ class QuasiStaticWalking:
# Push tasks
# Feet tasks.
solver.sot.push(robot.name + '.task.right-ankle')
solver.sot.push(robot.name + '.task.left-ankle')
solver.sot.push(robot.tasks['right-ankle'].name)
solver.sot.push(robot.tasks['left-ankle'].name)
# Center of mass
# FIXME: trigger segv at exit.
solver.sot.push(robot.name + '.task.com')
solver.sot.push(robot.comTask.name)
# Main.
......
......@@ -16,7 +16,7 @@
# dynamic-graph. If not, see <http://www.gnu.org/licenses/>.
import sys
from tools import *
from dynamic_graph.sot.dynamics.tools import *
# Move left wrist
reach(robot, 'left-wrist', 0.25, 0.25, 0.5)
......@@ -24,13 +24,13 @@ reach(robot, 'right-wrist', 0.25, -0.25, 0.5)
# Push tasks
# Operational points tasks
solver.sot.push(robot.name + '.task.right-ankle')
solver.sot.push(robot.name + '.task.left-ankle')
solver.sot.push(robot.name + '.task.left-wrist')
solver.sot.push(robot.name + '.task.right-wrist')
solver.sot.push(robot.tasks['right-ankle'].name)
solver.sot.push(robot.tasks['left-ankle'].name)
solver.sot.push(robot.tasks['right-wrist'].name)
solver.sot.push(robot.tasks['left-wrist'].name)
# Center of mass
solver.sot.push(robot.name + '.task.com')
solver.sot.push(robot.comTask.name)
# Main.
# Main loop
......
......@@ -16,20 +16,20 @@
# dynamic-graph. If not, see <http://www.gnu.org/licenses/>.
import sys
from tools import *
from dynamic_graph.sot.dynamics.tools import *
# Move left wrist
reach(robot, 'left-wrist', 0.25, 0, 0.1)
# Push tasks
# Operational points tasks
solver.sot.push(robot.name + '.task.right-ankle')
solver.sot.push(robot.name + '.task.left-ankle')
solver.sot.push(robot.name + '.task.left-wrist')
solver.sot.push(robot.name + '.task.right-wrist')
solver.sot.push(robot.tasks['right-ankle'].name)
solver.sot.push(robot.tasks['left-ankle'].name)
solver.sot.push(robot.tasks['right-wrist'].name)
solver.sot.push(robot.tasks['left-wrist'].name)
# Center of mass
solver.sot.push(robot.name + '.task.com')
solver.sot.push(robot.comTask.name)
# Main.
# Main loop
......
......@@ -15,20 +15,20 @@
# received a copy of the GNU Lesser General Public License along with
# dynamic-graph. If not, see <http://www.gnu.org/licenses/>.
from tools import *
from dynamic_graph.sot.dynamics.tools import *
# Move right wrist
reach(robot, 'right-wrist', 0.25, 0, 0.1)
# Push tasks
# Operational points tasks
solver.sot.push(robot.name + '.task.right-ankle')
solver.sot.push(robot.name + '.task.left-ankle')
solver.sot.push(robot.name + '.task.left-wrist')
solver.sot.push(robot.name + '.task.right-wrist')
solver.sot.push(robot.tasks['right-ankle'].name)
solver.sot.push(robot.tasks['left-ankle'].name)
solver.sot.push(robot.tasks['right-wrist'].name)
solver.sot.push(robot.tasks['left-wrist'].name)
# Center of mass
solver.sot.push(robot.name + '.task.com')
solver.sot.push(robot.comTask.name)
# Main.
# Main loop
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment