def testPlanConstraints(): ikPlanner.planningMode = 'dummy' constraints = buildConstraints() poses = ce.getPlanPoses(constraints, ikPlanner) poseJsonStr = json.dumps(poses, indent=4) constraintsJsonStr = ce.encodeConstraints(constraints, indent=4) print poseJsonStr print constraintsJsonStr constraints = ce.decodeConstraints(constraintsJsonStr) pprint.pprint(constraints)
def testPlanConstraints(): # this is required for now, makes it avoid communication with matlab # inside the call to ikPlanner.addPose ikPlanner.pushToMatlab = False constraints = buildConstraints() poses = ce.getPlanPoses(constraints, ikPlanner) poseJsonStr = json.dumps(poses, indent=4) constraintsJsonStr = ce.encodeConstraints(constraints, indent=4) print poseJsonStr print constraintsJsonStr constraints = ce.decodeConstraints(constraintsJsonStr) pprint.pprint(constraints)
def testPlanConstraints(): ikPlanner.planningMode = 'dummy' constraints = buildConstraints() poses = ce.getPlanPoses(constraints, ikPlanner) poseJsonStr = json.dumps(poses, indent=4) constraintsJsonStr = ce.encodeConstraints(constraints, indent=4) print poseJsonStr print constraintsJsonStr print '--------------decoding--------------------' constraints = ce.decodeConstraints(constraintsJsonStr) pprint.pprint(constraints) print '--------------reconstructing--------------' constraints = reconstructConstraints(constraints) print '--------------matlab commands---------------' for c in constraints: c.printCommands()