def run_gait(gait_name, time_scale = 1.0, run_time = 10.0): robot = RobotPi() gait_function = get_gait(gait_name) #scaled_gait_function = scaleTime(gait_function, 1.0 / gait_speed) robot.run(gait_function, runSeconds = run_time, resetFirst = False, #interpBegin = 2.0, #interpEnd = 2.0, interpBegin = 0.0, interpEnd = 0.0, timeScale = time_scale)
import sys sys.path.insert(0, '/home/eric/Documents/Aracna/WindowsClone') from RobotPi import * from PiConstants import POS_READY from math import * import copy ''' Created on Jan 31, 2013 @author: Eric Gold ''' def sinWave(): r = 300 p = .5 f = lambda t: (sin(t/p)*r+r,40,770,40,770,40,770,40) return f if __name__ == '__main__': robot = RobotPi() f = sinWave() print "Beginning run" robot.run(f,runSeconds=50)
import sys sys.path.insert(0, '/home/eric/Documents/Aracna/WindowsClone') from RobotPi import * from PiConstants import POS_READY from math import * import copy ''' Created on Jan 31, 2013 @author: Eric Gold ''' def sinWave(): r = 300 p = .5 f = lambda t: (sin(t / p) * r + r, 40, 770, 40, 770, 40, 770, 40) return f if __name__ == '__main__': robot = RobotPi() f = sinWave() print "Beginning run" robot.run(f, runSeconds=50)