Commits

German Larrain committed 8242858

fourth example: it now has a screenshot recorder; new camera position changed.

  • Participants
  • Parent commits b91f00b
  • Branches dev-IROS

Comments (0)

Files changed (1)

File bin/IROS/example4_sinusoidal_terrain.py

 	
 	FPS = 50
 	STEPS_PER_FRAME = 80
+	CAMERA_POSITION = (0,8,30)
 
 	VEHICLE_OFFSET = (-1.05,-0.35,5)
 	TM_X, TM_Z = (40,20)
 	WHEELS_TORQUE = 4.0
 	MAX_SPEED = 2.0
 	
+	# arm controller
 	q1_SP = 0.0 # set point
 	R1_KP = 20.0 # controller proportional action
 	R1_KD = 15.0 # controller derivative action
 	R2_KP = 20.0
 	R2_KD = 15.0
 	
+	# screenshot recorder
+	RECORDER_BASE_FILENAME = 'sin'
+	RECORD_PERIODICALLY = True
+	
 	def __init__(self):
 		""" Constructor, calls first the superclass constructor. """
 		VehicleWithArm.__init__(self)
 		self.set_pre_step_callback(self.on_pre_step)
+		self.create_screenshot_recorder(
+			self.RECORDER_BASE_FILENAME, self.RECORD_PERIODICALLY)
 		
 		self.q1_previous_error = 0.0
 		self.q2_previous_error = 0.0