Commits

German Larrain committed 440db0f

new Vehicle2WithScreenshots demo, which subclasses Vehicle2, and sets up a screenshot recorder to write frames as PNG files every 0.01 seconds.

  • Participants
  • Parent commits c402ae1

Comments (0)

Files changed (1)

File bin/Vehicle2WithScreenshots.py

+#!/usr/bin/env python
+
+# Created on 2012.02.07
+#
+# @author: german
+
+"""
+Runs a simulation of a vehicle with two powered wheels and one
+free-rotating spherical wheel.
+"""
+
+from Vehicle2 import Vehicle2
+
+class Vehicle2WithScreenshots(Vehicle2):
+
+	RECORDER_BASE_FILENAME = 'test'
+	RECORDER_PERIOD = 0.01
+	
+	def __init__(self):
+		Vehicle2.__init__(self)
+		self.create_screenshot_recorder(
+			self.RECORDER_BASE_FILENAME, self.RECORDER_PERIOD)
+
+if __name__ == '__main__':
+	sim_program = Vehicle2WithScreenshots()
+	sim_program.start()