bugs fixed test cases
+from os.path import expanduser
+import sys
+sys.path.insert(0, expanduser('~/git/pymanoid'))
##########################################################################
# This file contains test suites for `PathConstraint` factory functions. #
##########################################################################
@@ -611,7 +614,7 @@ def pymanoid_fixture():
sim.schedule_extra(com_sync)
com_target.set_x(0)
com_target.set_y(0)
- robot.ik.solve(solver=cvx.CVXOPT)
+ robot.ik.solve()
ts = np.arange(0, 7, sim.dt)
ps = np.array(
[com_target.p + np.r_[0.1, 0.1, 0] * t for t in np.sin(ts)])
@@ -675,9 +678,14 @@ class Test_ContactStability(object):
assert pc_contact.nv == 0
def test_feasible_wrenches(self, pymanoid_fixture):
- """(u, x) pair that satisfies `pc_contact` must also return a
+ """Check consistency with `pymanoid`.
+
+ The pair `(u, x)` satisfyng `pc_contact` must also return a
feasible wrench from pymanoid.
+ Parameters
+ ----------
+ pymanoid_fixture : A Fixture. Data for this test case.
"""
data, pc_contact = pymanoid_fixture
path, ss, humanoid, stance, g = data
@@ -692,8 +700,8 @@ class Test_ContactStability(object):
u = cvx.Variable()
x = cvx.Variable()
for i in range(pc_contact.N + 1):
- constraints = [(pc_contact.a[i] * u + pc_contact.b[i] * x +
- pc_contact.c[i] <= 0), x > TINY]
+ constraints = [(pc_contact.a[i] * u + pc_contact.b[i] * x + pc_contact.c[i] <= 0),
+ x >= TINY]
res_pc = np.zeros((10, 2))
humanoid.set_dof_values(q[i])
