A few Myro users have wondered what it would take to make the Calico Myro simulator run faster than real time. This is possible in the current Myro (Calico version 2.4.4 and earlier). In addition, Calico 3.0.0 has a new method, called simulate:
This method will move the robot for duration (given in seconds), stepping stepTime units at a time, and then update the Simulation window.
Below you will find an example of using the simulator decoupled from real time. The following uses the new ICalico notebook interface.
Myro.init("sim") robot = Myro.getRobot()
You are using: Simulated Fluke, version 1.0.0 Simulated Scribbler 2, version 1.0.0 Hello, my name is 'Scribby'!
Myro.getSimulation().stop() # stop the simulation loop
robot.forward(1) # queues request to move
robot.update() # fires waiting requests
robot.setPose(100, 250, 0) # manually position robot
Myro.getSimulation().simulate(.1) # simulate some time
Myro.robot._getLocation() # normal robot.getLocation() would fire in robot.update()