Commit 92f75f2d authored by Olivier Stasse's avatar Olivier Stasse Committed by olivier stasse

[python] Update python files + add python test capabilities.

The tests NEED to be updated.
parent fc8d007a
......@@ -133,7 +133,7 @@ def checkFinalConfiguration(position, finalPosition):
if 'argv' in sys.__dict__:
from optparse import OptionParser
from dynamic_graph.sot.dynamics.solver import Solver
from dynamic_graph.sot.dynamic_pinocchio.solver import Solver
# Parse options and enable robotviewer client if wanted.
clt = None
......
......@@ -42,3 +42,8 @@ FOREACH(test ${tests})
waist-attitude-from-sensor
)
ENDFOREACH(test)
IF(BUILD_PYTHON_INTERFACE)
ADD_SUBDIRECTORY(python)
ENDIF(BUILD_PYTHON_INTERFACE)
SET(${PROJECT_NAME}_PYTHON_TESTS
)
FOREACH(TEST ${${PROJECT_NAME}_PYTHON_TESTS})
ADD_PYTHON_UNIT_TEST("py-${TEST}" "tests/python/${TEST}.py")
ENDFOREACH(TEST ${${PROJECT_NAME}_PYTHON_TESTS})
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST
import os
print(os.environ)
from dynamic_graph.sot.dynamics.feet_follower import FeetFollowerFromFile
from dynamic_graph.sot.dynamics.tools import checkFinalConfiguration, clt, plug, robot, solver, timeStep
from dynamic_graph.sot.dynamic_pinocchio.feet_follower import FeetFollowerFromFile
from dynamic_graph.sot.dynamic_pinocchio.tools import checkFinalConfiguration, clt, plug, robot, solver, timeStep
feetFollower = FeetFollowerFromFile('feet-follower')
......
......@@ -4,7 +4,7 @@
import unittest
from dynamic_graph.sot.dynamics.humanoid_robot import HumanoidRobot
from dynamic_graph.sot.dynamic_pinocchio.humanoid_robot import HumanoidRobot
class HumanoidRobotTest(unittest.TestCase):
......
......@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST
from dynamic_graph.sot.dynamics.tools import checkFinalConfiguration, clt, reach, robot, solver, timeStep
from dynamic_graph.sot.dynamic_pinocchio.tools import checkFinalConfiguration, clt, reach, robot, solver, timeStep
# Move left wrist
reach(robot, 'left-wrist', 0.25, 0.25, 0.5)
......
......@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST
from dynamic_graph.sot.dynamics.tools import checkFinalConfiguration, clt, reach, robot, solver, timeStep
from dynamic_graph.sot.dynamic_pinocchio.tools import checkFinalConfiguration, clt, reach, robot, solver, timeStep
# Move left wrist
reach(robot, 'left-wrist', 0.25, 0, 0.1)
......
......@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST
from dynamic_graph.sot.dynamics.tools import checkFinalConfiguration, clt, reach, robot, solver, timeStep
from dynamic_graph.sot.dynamic_pinocchio.tools import checkFinalConfiguration, clt, reach, robot, solver, timeStep
# Move right wrist
reach(robot, 'right-wrist', 0.25, 0, 0.1)
......
Markdown is supported
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