Example #1
0
            motion.robot.left_mq.setRamp(v,0.5);
            v[2] = -1.5
            v[3] = 2.0
            motion.robot.left_mq.appendCubic(2.0,v,[0.0]*7);
        elif c=='s':
            motion.robot.stopMotion();


if __name__ == '__main__':
    config.parse_args()
    print "motion_testing.py: various random tests of the motion module."""
    print "Press q to exit."
    print

    print "Loading Motion Module model",config.klampt_model
    motion.setup(mode=config.mode,klampt_model=config.klampt_model,libpath="./")
    res = motion.robot.startup()
    if not res:
        print "Error starting up Motion Module"
        exit(1)
    time.sleep(0.1)
    world = WorldModel()
    res = world.readFile(config.klampt_model)
    if not res:
        raise RuntimeError("Unable to load Klamp't model "+fn)
    program = MotionTestUIViewer(world)
    program.run()
    motion.robot.shutdown()