Skip to content

Commit 20a1273

Browse files
Merge branch 'master' of https://github.com/david-cattermole/mayaMatchMoveSolver into 174-core-solver-add-ceres-solver
2 parents 2b21dd7 + 56f2c89 commit 20a1273

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/test/test_solver/test13.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ def do_solve(self, solver_name, solver_index, scene_graph_mode):
6161
maya.cmds.setAttr(cam_tfm + '.tz', -5.0)
6262

6363
bundle1_tfm, bundle1_shp = self.create_bundle('bundle1')
64-
maya.cmds.setAttr(bundle1_tfm + '.tx', 5.5)
64+
maya.cmds.setAttr(bundle1_tfm + '.tx', -5.5)
6565
maya.cmds.setAttr(bundle1_tfm + '.ty', 6.4)
6666
maya.cmds.setAttr(bundle1_tfm + '.tz', -25.0)
6767

6868
bundle2_tfm, bundle2_shp = self.create_bundle('bundle2')
69-
maya.cmds.setAttr(bundle2_tfm + '.tx', -5.5)
69+
maya.cmds.setAttr(bundle2_tfm + '.tx', 5.5)
7070
maya.cmds.setAttr(bundle2_tfm + '.ty', 6.4)
7171
maya.cmds.setAttr(bundle2_tfm + '.tz', -25.0)
7272

@@ -139,11 +139,13 @@ def do_solve(self, solver_name, solver_index, scene_graph_mode):
139139
self.assertEqual(result[0], 'success=1')
140140
rx = maya.cmds.getAttr(cam_tfm + '.rx')
141141
ry = maya.cmds.getAttr(cam_tfm + '.ry')
142+
rz = maya.cmds.getAttr(cam_tfm + '.rz')
142143
print('rx =', rx)
143144
print('ry =', ry)
144-
145-
self.assertApproxEqual(rx, 8.02, eps=0.02)
146-
self.assertApproxEqual(ry, -2.5, eps=0.02)
145+
print('rz =', rz)
146+
self.assertApproxEqual(rx, 7.72, eps=0.01)
147+
self.assertApproxEqual(ry, -2.377, eps=0.01)
148+
self.assertApproxEqual(rz, -0.636, eps=0.001)
147149

148150
def test_init_ceres_lmder_maya_dag(self):
149151
self.do_solve(

0 commit comments

Comments
 (0)